Reference for the Mosaic class Graphics::ArcPath

The class Graphics::ArcPath provides a convenient version of Graphics::Path class intended to calculate paths for elliptical arcs, segments, pies or rings. The arc is configured with the properties StartAngle, EndAngle, RadiusX and RadiusY. With the property Style the particular variant (Arc, Segment, Pie, etc.) of the resulting path is determined. If the style 'Pie', 'PieRounded', 'PieRoundedStart' or 'PieRoundedEnd' is selected, the the additional properties InnerRadiusX and InnerRadiusY can be used to construct a ring or segment of a ring.

With the path information the curves can be displayed on the screen. The view Views::FillPath displays the path as filled polygon. The view Views::StrokePath displays the path as a line with specified width.

property float EndAngle = 360.0;

The property 'EndAngle' determines the angle for the end position of the arc expressed in degree and measured clockwise relative to the positive X-axis of the coordinate system.

property float InnerRadius = 0.0;

The property 'InnerRadius' determines the inner radius of a circular arc within a path configured with Style == Graphics::ArcStyle.Pie, Style == Graphics::ArcStyle.PieRoundedStart, Style == Graphics::ArcStyle.PieRoundedEnd or Style == Graphics::ArcStyle.PieRounded. Changes of this property will be immediately reflected in the properties InnerRadiusX and InnerRadiusY.

property float InnerRadiusX = 0.0;

The property 'InnerRadiusX' determines the inner radius of the arc in horizontal direction used when constructing a path configured with Style == Graphics::ArcStyle.Pie, Style == Graphics::ArcStyle.PieRoundedStart, Style == Graphics::ArcStyle.PieRoundedEnd or Style == Graphics::ArcStyle.PieRounded.

property float InnerRadiusY = 0.0;

The property 'InnerRadiusY' determines the inner radius of the arc in vertical direction used when constructing a path configured with Style == Graphics::ArcStyle.Pie, Style == Graphics::ArcStyle.PieRoundedStart, Style == Graphics::ArcStyle.PieRoundedEnd or Style == Graphics::ArcStyle.PieRounded.

property int32 NoOfEdges = 0;

The property 'NoOfEdges' determines from how many line segments the arc should be composed of. The more segments the more smooth the resulting arc. Specifying the value 0 in this property will cause the class to automatically calculate the optimal number of segments depending on the arc angle (StartAngle, EndAngle) and radius (RadiusX and RadiusY.).

property float Radius = 0.0;

The property 'Radius' determines the radius of a circular arc. Changes of this property will be immediately reflected in the properties RadiusX and RadiusY.

property float RadiusX = 0.0;

The property 'RadiusX' determines the radius of the arc in horizontal direction.

property float RadiusY = 0.0;

The property 'RadiusY' determines the radius of the arc in vertical direction.

property float StartAngle = 0.0;

The property 'StartAngle' determines the angle for the start position of the arc expressed in degree and measured clockwise relative to the positive X-axis of the coordinate system.

property Graphics::ArcStyle Style = Graphics::ArcStyle.Arc;

The property 'Style' determines the resulting shape of the calculated path. The property can assume following values:

- Arc: Simple elliptical arc. The both arc ends remain opened unless the angle of the arc is equal to or greater than 360.0 degree.
- Segment: Segment of an ellipse with the start and the end positions of the arc being connected together by a straight line segment. If the arc forms a closed ellipse (the angle of the arc is equal to or greater than 360.0 degree), no line segment is added.
- Pie: Shape typical for displaying pie charts. Here the start and the end positions of the arc are connected with the center of the ellipse by additional straight line segments. If the arc forms a closed ellipse (the angle of the arc is equal to or greater than 360.0 degree), no line segments are added as connections with the center position. This style can be used together with the properties InnerRadiusX and InnerRadiusY permitting the construction of ring segments.
- PieRounded: Shape typical for displaying circular bar diagrams with rounded start and end edges. Here the start and the end positions of the arc are connected with the center of the ellipse by additional semi-circles. If the arc forms a closed ellipse (the angle of the arc is equal to or greater than 360.0 degree), no connections with the center position is added. This style can be used together with the properties InnerRadiusX and InnerRadiusY permitting the construction of ring segments with rounded edges.
- PieRoundedStart: Shape typical for displaying circular bar diagrams with rounded start edges. Here the start position of the arc is connected with the center of the ellipse by additional semi-circle. The end position, in turn, is connected by a straight line segment. If the arc forms a closed ellipse (the angle of the arc is equal to or greater than 360.0 degree), no connections with the center position is added. This style can be used together with the properties InnerRadiusX and InnerRadiusY permitting the construction of ring segments with rounded edges.
- PieRoundedEnd: Shape typical for displaying circular bar diagrams with rounded end edges. Here the start position of the arc is connected with the center of the ellipse by additional straight line segment. The end position, in turn, is connected with the center by a semi-circle. If the arc forms a closed ellipse (the angle of the arc is equal to or greater than 360.0 degree), no connections with the center position is added. This style can be used together with the properties InnerRadiusX and InnerRadiusY permitting the construction of ring segments with rounded edges.