Diagram for .NET > User's Guide > Document Object Model > Models > Primitives > Paths 
The NPathPrimitive class adds support for the following common features shared by all paths:
C# 
Copy Code


// get the path points NPointF[] points = path.Points; // get only the path points count int pointCount = path.PointsCount; // create a bezier curve and alter its first control point NBezierCurve bezierCurve = new NBezierCurvePath(new NPointF(0, 0), new NPointF(10, 10), new NPointF(20, 0), new NPointF(30, 10)); bezierCurve.SetPointAt(1, new NPointF(10, 30)); 
Visual Basic 
Copy Code


' get the path points Dim points As NPointF() = path.Points ' get only the path points count Dim pointCount As Int32 = path.PointsCount ' create a bezier curve and alter its first control point Dim bezierCurve As New NBezierCurvePath(New NPointF(0, 0), New NPointF(10, 10), New NPointF(20, 0), New NPointF(30, 10)) bezierCurve.SetPointAt(1, New NPointF(10, 30)) 
In addition of the INPoints interface some paths also implement the INPolyPoints interface, which allows you to dynamically insert and remove points from their path model. The root class for all such paths is the NPolyPathPrimitive abstract class. For example:
C# 
Copy Code


// create a polyline with 3 points NPolylinePath polyline = new NPolylinePath(new NPointF[] {new NPointF(0, 0), new NPointF(10, 10), new NPointF(20, 15)}); // add a new point polyline.AddPoint(new NPointF(40, 35)); // remove the second point polyline.RemovePointAt(1); 
Visual Basic 
Copy Code


' create a polyline with 3 points Dim polyline As New NPolylinePath(New NPointF() {New NPointF(0, 0), New NPointF(10, 10), New NPointF(20, 15)}) ' add a new point polyline.AddPoint(New NPointF(40, 35)) ' remove the second point polyline.RemovePointAt(1) 
The NPolyPathPrimitive class also adds core implementation of the INSegments interface, which allows you to treat each two adjacent points as a single segment. Segments can be split and moved.
The following table summarizes the currently available instancable paths:
Path class  Description 

NLinePath  Represents a line  you can control the start and end points of a line. 
NBezierCurvePath  Represents a bezier curve  you can control the start, end, first control and second control points of a bezier curve. 
NRectanglePath  Represents a rectangle  you can control the corners of a rectangle (actually a quadrangle). 
NEllipsePath  Represents an ellipse  an can control the ellipse X and Y radius, as well as the ellipse model angle. 
NCircularArcPath  Represents an arc of a circle  the circular arc is defined by three points (start point, end point and control point) 
NEllipticalArcPath  Represents an arc of an ellipse  the elliptical arc is defined by three points (start point, end point and control point) and two additional parameters  ratio between the X and Y radiuses and angle of the ellipse Xaxis). 
NCustomPath  Represents a custom graphics path 
NArrowPath  Represents the path of a single or double arrow. 
Poly paths  
NPolygonPath  Represents a polygon  the polygon is defined by a set of points. You can insert and remove points from a polygon. 
NClosedCurvePath  Represents a closed curve  the closed curve is defined by a set of points and curve tension. You can insert and remove points from a closed curve. 
NCurvePath  Represents a curve  the curve is defined by a set of points and curve tension. You can insert and remove points from a curve. 
NPolylinePath  Represents a polyline  the polyline is defined by a set of points. You can insert and remove points from a polyline. 
NHVPolylinePath  Represents a polyline, which strives to retain the orthogonality of its segments in scene coordinates. 