Public Member Functions | |
void | ToStraightLines () |
Converts this path to straight lines only. Assumes values range from 0-1 and uses an accuracy of 0.05 (roughly 20 segments). More... | |
void | ToStraightLines (float accuracy) |
Converts this path to straight lines only. Accuracy is the approx average length of each line segment. More... | |
void | Transform (Matrix4x4 mat) |
List< PathSegment > | GetContours () |
Finds all the separate contours in this path. More... | |
void | HoleSort () |
Sorts this path such that any holes it contains begin closest to it's containing contour. This essentially allows paths with holes (think hole in o!) to be correctly triangulated. More... | |
VectorPoint | Nearest (float x, float y) |
Gets the nearest node in this shape to the given point. More... | |
VectorPoint | Nearest (float x, float y, VectorPoint from, VectorPoint to) |
Gets the nearest node in the given section of this shape to the given point. More... | |
bool | Contains (float x, float y) |
Does this path contain the given point? More... | |
bool | Contains (float x, float y, VectorPoint from, VectorPoint to) |
Does the given section of this path contain the given point? More... | |
void | GetVertices (Vector3[] vertices, Vector3[] normals, float accuracy, float offsetX, float offsetY, float scale, ref int index, List< int > contourStarts) |
int | GetVertexCount (float accuracy) |
void | MoveTo (float x, float y) |
Moves the current pen location to the given point. Used when drawing paths. More... | |
void | SimplifyCurve () |
"Simplifies" the curve values ensuring that it's possible to offset the parts of the path. Used by the path stroke system. More... | |
VectorPoint | SelectPoint (int index) |
Selects the point at the given index of this path. More... | |
float | Length () |
The length of this path. More... | |
VectorPath | CopySection (VectorPoint p1, float c1, VectorPoint p2, float c2) |
Copies a section of this path. Note that if p2 is before p1, it will safely loop over a closed node. More... | |
void | Append (VectorPath path) |
Adds the given path onto the end of this one. More... | |
VectorPath | CopyPath () |
Copies this path. More... | |
void | CopyInto (VectorPath path) |
Copies this vector path into the given one. More... | |
void | Clear () |
Clears this path. More... | |
void | AddPathNode (VectorPoint point) |
Adds the given node to the end of path. See AddPathNodeStart to add to the start. More... | |
void | AddPathNodeStart (VectorPoint point) |
Adds the given node to the start of the path. Must be a moveTo unless it's a temp thing. See AddPathNode to add to the end. More... | |
void | ClosePathFast () |
Closes the path quickly and safely. More... | |
void | CheckClosed () |
Closes the shape if the last point is the same as the close node. More... | |
void | ClosePath () |
A full path close. More... | |
void | CloseLast () |
Marks the last node as a close. More... | |
StraightLinePoint | LineTo (float x, float y) |
QuadLinePoint | QuadraticCurveTo (float cx, float cy, float x, float y) |
void | CurveTo (float c1x, float c1y, float c2x, float c2y, float x, float y) |
void | CountNodes () |
Recomputes path node count. More... | |
void | Arc (float centerX, float centerY, float radius, float sAngle, float eAngle, bool counterClockwise) |
Creates an arc around the given circle center. Note that nothing will be seen until you call a fill or stroke method. More... | |
void | EllipseArc (float rx, float ry, float xAxisRotation, float p1x, float p1y, bool largeArcFlag, bool sweepFlag) |
Handles SVG arcs. More... | |
void | RecalculateMeta () |
Recalculates bounds and normals. More... | |
void | RecalculateBounds () |
Recalculates the minimum values and width/height of this path, taking curves into account. More... | |
void | Replace (VectorPoint point, VectorPoint with) |
Replaces one node with another. More... | |
void | Remove (VectorPoint point) |
Remove a point. More... | |
void | Sheer (float by) |
Sheers this path. Note that it's assumed to be at most 1 unit tall. More... | |
void | Scale (float by) |
Scales this path by the given value. More... | |
void | Scale (float x, float y) |
Scales this path by the given value. More... | |
void | Flip () |
Axis flip. More... | |
void | Move (float byX, float byY) |
Scales this path by the given value. More... | |
float | GetSignedArea () |
Gets the signed area of the "major" contour (the first one). It's signed as this can identify the winding order. More... | |
override string | ToString () |
Public Attributes | |
float | MinX |
The minimum X value. More... | |
float | MinY |
The minimum Y value. More... | |
float | Width |
The width of this path. More... | |
float | Height =1f |
The height of this path. More... | |
int | PathNodeCount |
The number of points in this vector path. More... | |
MoveToPoint | CloseNode |
The current node which will be used when the path is closed. More... | |
VectorPoint | FirstPathNode |
When creating a path its nodes are stored as a linked list. The first node created. More... | |
VectorPoint | LatestPathNode |
When creating a path its nodes are stored as a linked list. The latest node created. More... | |
Protected Attributes | |
bool | HoleSorted =false |
True if any holes in this path have been sorted. More... | |
Properties | |
bool | WasHoleSorted [get] |
True if any holes in this path have been sorted. Read only. More... | |
bool | Closed [get] |
Is this path closed? More... | |
bool | Unclosed [get] |
True if this path is currently unclosed. More... | |
Static Private Member Functions | |
static float | AngleBetween (UnityEngine.Vector2 a, UnityEngine.Vector2 b) |
Signed angle between vectors. More... | |
Private Attributes | |
const float | TwoPI =(float)(Math.PI)*2f |
The value 2*PI. More... | |
|
inline |
Adds the given node to the end of path. See AddPathNodeStart to add to the start.
|
inline |
Adds the given node to the start of the path. Must be a moveTo unless it's a temp thing. See AddPathNode to add to the end.
|
inlinestaticprivate |
Signed angle between vectors.
|
inline |
Adds the given path onto the end of this one.
|
inline |
Creates an arc around the given circle center. Note that nothing will be seen until you call a fill or stroke method.
|
inline |
Closes the shape if the last point is the same as the close node.
|
inline |
Clears this path.
|
inline |
Marks the last node as a close.
|
inline |
A full path close.
|
inline |
Closes the path quickly and safely.
|
inline |
Does this path contain the given point?
|
inline |
Does the given section of this path contain the given point?
|
inline |
Copies this vector path into the given one.
|
inline |
Copies this path.
|
inline |
Copies a section of this path. Note that if p2 is before p1, it will safely loop over a closed node.
|
inline |
Recomputes path node count.
|
inline |
|
inline |
Handles SVG arcs.
|
inline |
Axis flip.
|
inline |
Finds all the separate contours in this path.
|
inline |
Gets the signed area of the "major" contour (the first one). It's signed as this can identify the winding order.
|
inline |
|
inline |
|
inline |
Sorts this path such that any holes it contains begin closest to it's containing contour. This essentially allows paths with holes (think hole in o!) to be correctly triangulated.
|
inline |
The length of this path.
|
inline |
|
inline |
Scales this path by the given value.
|
inline |
Moves the current pen location to the given point. Used when drawing paths.
|
inline |
Gets the nearest node in this shape to the given point.
|
inline |
Gets the nearest node in the given section of this shape to the given point.
|
inline |
|
inline |
Recalculates the minimum values and width/height of this path, taking curves into account.
|
inline |
Recalculates bounds and normals.
|
inline |
Remove a point.
|
inline |
Replaces one node with another.
|
inline |
Scales this path by the given value.
|
inline |
Scales this path by the given value.
|
inline |
Selects the point at the given index of this path.
|
inline |
Sheers this path. Note that it's assumed to be at most 1 unit tall.
|
inline |
"Simplifies" the curve values ensuring that it's possible to offset the parts of the path. Used by the path stroke system.
|
inline |
Converts this path to straight lines only. Assumes values range from 0-1 and uses an accuracy of 0.05 (roughly 20 segments).
|
inline |
Converts this path to straight lines only. Accuracy is the approx average length of each line segment.
|
inline |
|
inline |
MoveToPoint Blaze.VectorPath.CloseNode |
The current node which will be used when the path is closed.
VectorPoint Blaze.VectorPath.FirstPathNode |
When creating a path its nodes are stored as a linked list. The first node created.
float Blaze.VectorPath.Height =1f |
The height of this path.
|
protected |
True if any holes in this path have been sorted.
VectorPoint Blaze.VectorPath.LatestPathNode |
When creating a path its nodes are stored as a linked list. The latest node created.
float Blaze.VectorPath.MinX |
The minimum X value.
float Blaze.VectorPath.MinY |
The minimum Y value.
int Blaze.VectorPath.PathNodeCount |
The number of points in this vector path.
|
private |
The value 2*PI.
float Blaze.VectorPath.Width |
The width of this path.
|
get |
Is this path closed?
|
get |
True if this path is currently unclosed.
|
get |
True if any holes in this path have been sorted. Read only.