Represents a segment as part of a GraphicsPath.
More...
|
abstract Segment | Clone () |
| Creates a copy of the Segment. More...
|
|
abstract double | Measure (Point previousPoint) |
| Computes the length of the Segment. More...
|
|
abstract Point | GetPointAt (Point previousPoint, double position) |
| Gets the point on the Segment at the specified (relative) position ). More...
|
|
abstract Point | GetTangentAt (Point previousPoint, double position) |
| Gets the tangent to the Segment at the specified (relative) position ). More...
|
|
abstract IEnumerable< Segment > | Linearise (Point? previousPoint, double resolution) |
| Transform the segment into a series of linear segments. Segments that are already linear are not changed. More...
|
|
abstract IEnumerable< Point > | GetLinearisationTangents (Point? previousPoint, double resolution) |
| Gets the tanget at the points at which the segment would be linearised. More...
|
|
abstract IEnumerable< Segment > | Transform (Func< Point, Point > transformationFunction) |
| Applies an arbitrary transformation to all of the points of the Segment. More...
|
|
abstract IEnumerable< Segment > | Flatten (Point? previousPoint, double flatness) |
| Flattens the Segment, replacing curve segments with series of line segments that approximate them, ensuring the specified maximum deviation from the original path. More...
|
|
abstract IEnumerable<(Point point, Point tangent)> | FlattenForOffsetAndGetTangents (Point? previousPoint, double offset, double flatness) |
| Flattens the Segment, replacing curve segments with series of line segments that approximate them, ensuring the specified maximum deviation from the original path, assuming that the Segment will be drawn with the specified offset . More...
|
|
Represents a segment as part of a GraphicsPath.
Definition at line 29 of file Segment.cs.
◆ Clone()
abstract Segment VectSharp.Segment.Clone |
( |
| ) |
|
|
pure virtual |
◆ Flatten()
abstract IEnumerable< Segment > VectSharp.Segment.Flatten |
( |
Point? |
previousPoint, |
|
|
double |
flatness |
|
) |
| |
|
pure virtual |
Flattens the Segment, replacing curve segments with series of line segments that approximate them, ensuring the specified maximum deviation from the original path.
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
flatness | The maximum deviation from the original path. |
- Returns
- A collection of Segments composed only of linear segments that approximates the current Segment.
◆ FlattenForOffsetAndGetTangents()
abstract IEnumerable<(Point point, Point tangent)> VectSharp.Segment.FlattenForOffsetAndGetTangents |
( |
Point? |
previousPoint, |
|
|
double |
offset, |
|
|
double |
flatness |
|
) |
| |
|
pure virtual |
Flattens the Segment, replacing curve segments with series of line segments that approximate them, ensuring the specified maximum deviation from the original path, assuming that the Segment will be drawn with the specified offset .
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
offset | The offset that will be used to draw the Segment (e.g., the line width of the stroke). |
flatness | The maximum deviation from the original path. |
- Returns
- A collection of tuples where the first element is a Point representing the end-point of a linear segment, and the second element is a Point containing the value of the tangent to the original Segment at that point.
◆ GetLinearisationTangents()
abstract IEnumerable< Point > VectSharp.Segment.GetLinearisationTangents |
( |
Point? |
previousPoint, |
|
|
double |
resolution |
|
) |
| |
|
pure virtual |
Gets the tanget at the points at which the segment would be linearised.
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
resolution | The absolute length between successive samples in curve segments. |
- Returns
- A collection of tangents at the points in which the segment would be linearised.
◆ GetPointAt()
abstract Point VectSharp.Segment.GetPointAt |
( |
Point |
previousPoint, |
|
|
double |
position |
|
) |
| |
|
pure virtual |
Gets the point on the Segment at the specified (relative) position ).
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
position | The relative position on the Segment (0 is the start of the Segment, 1 is the end of the Segment). |
- Returns
- The point at the specified position.
◆ GetTangentAt()
abstract Point VectSharp.Segment.GetTangentAt |
( |
Point |
previousPoint, |
|
|
double |
position |
|
) |
| |
|
pure virtual |
Gets the tangent to the Segment at the specified (relative) position ).
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
position | The relative position on the Segment (0 is the start of the Segment, 1 is the end of the Segment). |
- Returns
- The tangent to the point at the specified position.
◆ Linearise()
abstract IEnumerable< Segment > VectSharp.Segment.Linearise |
( |
Point? |
previousPoint, |
|
|
double |
resolution |
|
) |
| |
|
pure virtual |
Transform the segment into a series of linear segments. Segments that are already linear are not changed.
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
resolution | The absolute length between successive samples in curve segments. |
- Returns
- A collection of linear segments that approximate the current segment.
◆ Measure()
abstract double VectSharp.Segment.Measure |
( |
Point |
previousPoint | ) |
|
|
pure virtual |
Computes the length of the Segment.
- Parameters
-
previousPoint | The point from which the Segment starts (i.e. the endpoint of the previous Segment). |
- Returns
- The length of the segment.
◆ Transform()
abstract IEnumerable< Segment > VectSharp.Segment.Transform |
( |
Func< Point, Point > |
transformationFunction | ) |
|
|
pure virtual |
Applies an arbitrary transformation to all of the points of the Segment.
- Parameters
-
transformationFunction | An arbitrary transformation function. |
- Returns
- A collection of Segments that have been transformed according to the transformationFunction .
◆ Point
virtual Point VectSharp.Segment.Point |
|
get |
◆ Points
Point [] VectSharp.Segment.Points |
|
get |
◆ Type
The documentation for this class was generated from the following file: