### Path and Area Geometry

Path and area geometry contains primitives that divide space. Path geometry includes lines, polylines and curves. They may be framed, but not filled.

### IGline2D

The IGLine2D class defines line segments that are defined by two endpoints with an implied direction that moves from the start point to the endpoint.

### IGCurve2D

The IGCurve2D class is the general curve primitive in the 2D Graphics framework. Use this to implement free-form curves, arcs, and path geometry containing discontinuities. The IGCurve2D class can represent the geometry of all other primitives (lines, polygons, ellipses).

The curve classes let you implement free-form curves, arcs, and path geometry that contain discontinuities (breaks or kinks in the smoothness of the curve) and that can be joined to form long, continuous curves. IGLoop2D derives from IGCurve2D. IGCurve2D and IGLoop2D can represent the geometry of all other 2D geometry classes.

Curves are defined by Non-Uniform Rational B-Splines (NURBs). Non-uniform means that the parameterization of the curve can be changed to allow kinks, gaps, and smooth joins. Rational means that rational polynomials are used to allow exact representations of circles, ellipses, and other conic sections. B-Spline stands for Basis spline, which is a spline curve very similar to the Bézier curve, but provides more local control and continuity to give you better curve fitting and modeling.

IGCurve2D has derived classes, listed in the table, that you can use to instantiate a IGCurve2D. These classes serve to clarify different types of arcs that have similar arguments.

### Class | ### Description
--- | ---
IGConicEndCenterEnd | This class creates a conic curve from a start point, endpoint, center point, and a Boolean value. The points create an elliptical shape. The conic curve tangents are perpendicular to the vectors between p0 and centerPoint, and centerPoint and p2. When the vectors are equal, a circular arc is generated that is less than 180 degrees.
IGCardinalSpline | This class creates a parametric curve that interpolates a set of control points passed to it in the array. The fit is accomplished by interpolating the middle two control points and finding the tangent at those points that are parallel to the line between the previous control point and the next control point. The tension parameter controls how tightly the curve interpolates the control polyline. The tension parameter values range from 0.0 to 1.0 where 0.0 is very tight and 1.0 is very loose. The number of points in the array must be a multiple of four.
IGArcThrough3Points | This class creates an arc that passes through three points.
IGHermiteSpline | This class generates a parametric spline by interpolating between the two endpoints passed to it in the array and their tangents. The number of points in the array must be a multiple of four.
IGTensionSpline | This class creates a parametric spline from an array of points that are interpolated by tension and bias values. The tension controls how close the curve is to the control polyline. The number of points in the array must be a multiple of four.

### IGLoop2D

IGLoop2D is a subclass of IGCurve2D that draws filled shapes. All of the functions supplied for IGCurve2D also apply for IGLoop2D. IGPie2D, a subclass of IGLoop2D, creates a pie-shaped wedge.

Loops are closed curves for drawing filled curves. Loops derive from curves. IGCurve2D and IGLoop2D can represent the geometry of all other 2D geometry classes because they have constructors that accept any 2D geometry. To fill a loop, use one of the fill algorithms described in "Filling loops and polygons."

Discontinuities (breaks) in the curves of a loop are closed when the loop is drawn. For hit detection, the direction of each loop segment is used to determine whether a point is inside or outside the loop. For example, the letter "O" can be created from two concentric circles with the inner circle running in the opposite parametric direction from the outer circle. This way, points that lie between the two circles are found to be on the letter.

### IGEllipse2D

The ellipse classes let you implement elliptical shapes that are inscribed inside a bounding rectangle. The bounding rectangle can be passed as the following:

- An IGRect2D.
- An IGEllipse2D.
- Dimensions for a center and radius.
- Dimensions for a center, height, and width.

The enclosed ellipse touches the midpoint of each edge of the bounding rectangle. When the height and width of the bounding rectangle are equal, the enclosed ellipse is a perfect circle. IEllipse2D has an internal matrix for transforming the ellipse without altering the original points of the ellipse. When you call a transformation function on an ellipse, the values are concatenated to the matrix.

### IGPolygon2D

A polygon is a set of points that are connected by straight line segments and closed automatically. Polygons derive from polylines. You should not specify the same starting and ending points to close the polygon because the last point gets connected to the first point automatically. Polygons are closed line segments for drawing filled shapes. The polygons use the fill algorithms described in "Filling loops and polygons " for filling the polygon.