Is there a quick way if supplied with a System.Drawing.Rectangle or RectangleF and a closed System.Drawing.Drawing2d.GraphicsPath (comprised only of lines), to derive the path (or paths) that an intersection of the two would create?
If you look at the attached file, Path.Jpg you see a closed path. Looking at the file Clipping.jpg shows that path being intersected by a rectangle and Result.Jpg shows the resulting paths created by the intersection.
So, if the function declaration looked like:
Private Function CropPath(ByVal SrcPath As GraphicsPath, ByVal Rect As RectangleF) As PathIntersection
...and the returned structure looked like:
Public Structure PathIntersection
Is there a quick way to impliment this?
If you look at the attached file, Path.Jpg you see a closed path. Looking at the file Clipping.jpg shows that path being intersected by a rectangle and Result.Jpg shows the resulting paths created by the intersection.
So, if the function declaration looked like:
Private Function CropPath(ByVal SrcPath As GraphicsPath, ByVal Rect As RectangleF) As PathIntersection
...and the returned structure looked like:
Public Structure PathIntersection
Public PathCount As Integer
Public Paths() As System.Drawing.Drawing2D.GraphicsPath
End StructurePublic Paths() As System.Drawing.Drawing2D.GraphicsPath
Is there a quick way to impliment this?