Is there anyway to change the coordinates of some of the points within a GraphicsPath object while leaving the other points where they are?
The GraphicsPath object that gets passed into my method will contain a mixture of polygons and lines. My method would want to look something like:
void UpdateGraphicsPath(GraphicsPath gPath, RectangleF regionToBeChanged, PointF delta)
{
// Find the points in gPath that are inside regionToBeChanged
// and move them by delta.
// gPath.PathPoints[i].X += delta.X; // Compiles but doesn't work
}
GraphicsPath.PathPoints seems to be readonly, so does GraphicsPath.PathData.Points. So I am wondering if this is even possible.
Perhaps generating a new GraphicsPath object with an updated set of points? How can I know if a point is part of a line or a polygon?
If anyone has any suggestions then I would be grateful.