PurplePen.TopologyDropTargetCourseObj.Highlight C# (CSharp) Method

Highlight() public method

public Highlight ( Graphics g, Matrix xformWorldToPixel, Brush brush, bool erasing ) : void
g System.Drawing.Graphics
xformWorldToPixel Matrix
brush System.Drawing.Brush
erasing bool
return void
        public override void Highlight(Graphics g, Matrix xformWorldToPixel, Brush brush, bool erasing)
        {
            // Get the world coordinates of the object.
            PointF[] coords = OffsetCoords(ScaleCoords((PointF[])outlineCoordsLeft.Clone()), location.X, location.Y);

            // Transform to pixel coordinates.
            xformWorldToPixel.TransformPoints(coords);

            // Draw the object.
            g.FillPolygon(brush, coords);

            // Get the world coordinates of the object.
            coords = OffsetCoords(ScaleCoords((PointF[])outlineCoordsRight.Clone()), location.X, location.Y);

            // Transform to pixel coordinates.
            xformWorldToPixel.TransformPoints(coords);

            // Draw the object.
            g.FillPolygon(brush, coords);
        }