VectSharp  2.2.1
A light library for C# vector graphics
VectSharp.Segment Class Referenceabstract

Represents a segment as part of a GraphicsPath. More...

Public Member Functions

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< SegmentLinearise (Point? previousPoint, double resolution)
 Transform the segment into a series of linear segments. Segments that are already linear are not changed. More...
 
abstract IEnumerable< PointGetLinearisationTangents (Point? previousPoint, double resolution)
 Gets the tanget at the points at which the segment would be linearised. More...
 
abstract IEnumerable< SegmentTransform (Func< Point, Point > transformationFunction)
 Applies an arbitrary transformation to all of the points of the Segment. More...
 

Properties

abstract SegmentType Type [get]
 The type of the Segment. More...
 
Point[] Points [get]
 The points used to define the Segment. More...
 
virtual Point Point [get]
 The end point of the Segment. More...
 

Detailed Description

Represents a segment as part of a GraphicsPath.

Definition at line 28 of file Segment.cs.

Member Function Documentation

◆ Clone()

abstract Segment VectSharp.Segment.Clone ( )
pure virtual

Creates a copy of the Segment.

Returns
A copy of the Segment.

◆ 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
previousPointThe point from which the Segment starts (i.e. the endpoint of the previous Segment).
resolutionThe 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
previousPointThe point from which the Segment starts (i.e. the endpoint of the previous Segment).
positionThe 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
previousPointThe point from which the Segment starts (i.e. the endpoint of the previous Segment).
positionThe 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
previousPointThe point from which the Segment starts (i.e. the endpoint of the previous Segment).
resolutionThe 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
previousPointThe 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
transformationFunctionAn arbitrary transformation function.
Returns
A collection of Segments that have been transformed according to the transformationFunction .

Property Documentation

◆ Point

virtual Point VectSharp.Segment.Point
get

The end point of the Segment.

Definition at line 44 of file Segment.cs.

◆ Points

Point [] VectSharp.Segment.Points
get

The points used to define the Segment.

Definition at line 39 of file Segment.cs.

◆ Type

abstract SegmentType VectSharp.Segment.Type
get

The type of the Segment.

Definition at line 34 of file Segment.cs.


The documentation for this class was generated from the following file: