Helper class for generating stroke paths.
Public Member Functions | |
void | Generate (VectorPath path) |
Generates a stroke now using these settings. Note that the given path may be modified. More... | |
void | MoveTo (float x, float y) |
void | AddPoint (float x, float y, float c) |
Public Attributes | |
float | Accuracy =1f |
The curve sampling accuracy (in terms of pixels). More... | |
int | LineCapMode |
The line cap mode. More... | |
int | LineJoinMode |
The line join mode. More... | |
float | Width |
The width of the stroke. More... | |
float | MiterLimit =4f |
The miter limit. More... | |
CurveSampler | WidthFunction |
A width function. Varies the width of the stroke (between 1 and 0). It's multiplied by Width. More... | |
Protected Member Functions | |
virtual void | StartMesh (bool closed, int lineCount) |
Called when we're starting to emit a mesh. More... | |
virtual void | EmitLine (StrokePoint inner, StrokePoint outer) |
Called when we're emitting a line segment. More... | |
virtual void | EndMesh () |
Called when we're done emitting a mesh. More... | |
Properties | |
bool | IncludeFirstNode [get] |
float | SampleDistance [get, set] |
Properties inherited from Blaze.PointReceiverStepped | |
bool | IncludeFirstNode [get] |
float | SampleDistance [get, set] |
Private Member Functions | |
void | CompleteContour (bool closed) |
Called when a contour is completed. More... | |
void | DrawCircle (List< StrokePoint > set, ref int count, float angle, float pX, float pY, float c, Vector2 center) |
Adds points to the given set for a circle of the given angle, starting at a point about a center. More... | |
Private Attributes | |
VectorLine | CurrentLine |
The current line. More... | |
float | OuterLength |
The current line length used when computing UV's. More... | |
float | InnerLength |
The current line length used when computing UV's. More... | |
int | InnerCount |
The number of verts on the inner edge. Not necessarily equal to InnerSet.Count. More... | |
int | OuterCount |
The number of verts on the outer edge. Not necessarily equal to OuterSet.Count. More... | |
bool | Outer =false |
True if we're sampling the outer curve. More... | |
bool | ApplyLineJoinNow |
True when we just started a new line. Used to detect when to apply linejoin. More... | |
Vector2 | EndNormal |
The end normal of the current line. Used to detect where to apply linejoin. More... | |
Vector2 | StartNormal |
The start normal of the current line. Used to detect where to apply linejoin. More... | |
bool | AtLeastOneLine |
True when we've seen at least one line on this contour.</summray> More... | |
float | MiterLength |
The computed miter length, after applying the miter limit. More... | |
Vector2 | OriginalLinePoint |
Used during linejoin. More... | |
float | LineAngle |
The angle between the two lines. Used by linejoin. More... | |
List< StrokePoint > | OuterSet =new List<StrokePoint>() |
The computed set of verts. More... | |
List< StrokePoint > | InnerSet =new List<StrokePoint>() |
The computed set of verts. More... | |
|
inline |
Implements Blaze.PointReceiverStepped.
|
inlineprivate |
Called when a contour is completed.
|
inlineprivate |
Adds points to the given set for a circle of the given angle, starting at a point about a center.
|
inlineprotectedvirtual |
Called when we're emitting a line segment.
Reimplemented in Loonim.StrokePathMesh.
|
inlineprotectedvirtual |
Called when we're done emitting a mesh.
Reimplemented in Loonim.StrokePathMesh.
|
inline |
Generates a stroke now using these settings. Note that the given path may be modified.
|
inline |
Implements Blaze.PointReceiverStepped.
|
inlineprotectedvirtual |
Called when we're starting to emit a mesh.
Reimplemented in Loonim.StrokePathMesh.
float Loonim.StrokePath.Accuracy =1f |
The curve sampling accuracy (in terms of pixels).
|
private |
True when we just started a new line. Used to detect when to apply linejoin.
|
private |
True when we've seen at least one line on this contour.</summray>
|
private |
The current line.
|
private |
The end normal of the current line. Used to detect where to apply linejoin.
|
private |
The number of verts on the inner edge. Not necessarily equal to InnerSet.Count.
|
private |
The current line length used when computing UV's.
|
private |
The computed set of verts.
|
private |
The angle between the two lines. Used by linejoin.
int Loonim.StrokePath.LineCapMode |
The line cap mode.
int Loonim.StrokePath.LineJoinMode |
The line join mode.
|
private |
The computed miter length, after applying the miter limit.
float Loonim.StrokePath.MiterLimit =4f |
The miter limit.
|
private |
Used during linejoin.
|
private |
True if we're sampling the outer curve.
|
private |
The number of verts on the outer edge. Not necessarily equal to OuterSet.Count.
|
private |
The current line length used when computing UV's.
|
private |
The computed set of verts.
|
private |
The start normal of the current line. Used to detect where to apply linejoin.
float Loonim.StrokePath.Width |
The width of the stroke.
CurveSampler Loonim.StrokePath.WidthFunction |
A width function. Varies the width of the stroke (between 1 and 0). It's multiplied by Width.
|
get |
|
getset |