NPlot.Windows.PlotSurface2D.DrawHorizontalSelection C# (CSharp) Method

DrawHorizontalSelection() private method

private DrawHorizontalSelection ( Point start, Point end, UserControl ctr ) : void
start Point
end Point
ctr System.Windows.Forms.UserControl
return void
        private void DrawHorizontalSelection(Point start, Point end, UserControl ctr)
        {
            // the clipping rectangle in screen coordinates
            Rectangle clip = ctr.RectangleToScreen(
                new Rectangle(
                    (int)ps_.PlotAreaBoundingBoxCache.X,
                    (int)ps_.PlotAreaBoundingBoxCache.Y,
                    (int)ps_.PlotAreaBoundingBoxCache.Width,
                    (int)ps_.PlotAreaBoundingBoxCache.Height));

            start = ctr.PointToScreen(start);
            end = ctr.PointToScreen(end);

            ControlPaint.FillReversibleRectangle(
                new Rectangle((int)Math.Min(start.X, end.X), (int)clip.Y, (int)Math.Abs(end.X - start.X), (int)clip.Height),
                Color.White);
        }