Piccolo.NET

PPath Class

PPath is a wrapper around a System.Drawing.Drawing2D.GraphicsPath.

For a list of all members of this type, see PPath Members.

System.Object
   PNode
      PPath

public class PPath : PNode

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The SetBounds method works by scaling the path to fit into the specified bounds. This normally works well, but if the specified base bounds get too small then it is impossible to expand the path shape again since all its numbers have tended to zero, so application code may need to take this into consideration.

One option that applications have is to call StartResizeBounds before starting an interaction that may make the bounds very small, and calling EndResizeBounds when this interaction is finished. When this is done PPath will use a copy of the original path to do the resizing so the numbers in the path wont loose resolution.

This class also provides methods for constructing common shapes using a GraphicsPath.

Performance Note: Checking for intersections between some paths and rectangles can be very slow. This is due to the way .NET implements the IsVisible method. The problem generally occurs in extreme cases, when the path consists of numerous lines joined at very steep angles, which exhausts the intersection algorithm. One simple workaround is to break the figure up into several PPath nodes. Also, remember to set the Brush to null if you do not want to a fill a path. Otherwise, the path will be filled with a white brush, and picking will be more expensive.

Requirements

Namespace: UMD.HCIL.Piccolo.Nodes

Assembly: UMD.HCIL.Piccolo (in UMD.HCIL.Piccolo.dll)

See Also

PPath Members | UMD.HCIL.Piccolo.Nodes Namespace