wxArt2D
|
Vector Path. More...
#include <polyver.h>
Public Member Functions | |
a2dVpath (a2dVertexArray &vertexArray, bool moveToFirst=true, bool closeLast=false) | |
a2dVpath (a2dVertexList &vertexList, bool moveToFirst=true, bool closeLast=false) | |
~a2dVpath () | |
destructor | |
a2dVpath & | operator= (const a2dVpath &other) |
operator = | |
double | Length () |
calculate length of path, assuming continues path. | |
bool | IsPolygon (bool allowArc=true) |
test if closed polygon ( a2dPATHSEG_MOVETO, a2dPATHSEG_LINETO, a2dPATHSEG_ARCTO ) | |
bool | IsPolyline (bool allowArc=true) |
test if polyline ( a2dPATHSEG_MOVETO, a2dPATHSEG_LINETO, a2dPATHSEG_ARCTO ) | |
void | Add (a2dVpathSegment *seg) |
add a segment | |
void | Add (a2dVertexArray &vertexArray, bool moveToFirst=true, bool closeLast=false) |
add a vertexArray to an existing path | |
void | Add (a2dVertexList &vertexList, bool moveToFirst=true, bool closeLast=false) |
add a vertexlist to an existing path | |
a2dVpathSegmentPtr | Item (wxUint32 index) |
a2dVpathSegmentPtr | Item (wxUint32 index) const |
void | RemoveAt (size_t index) |
void | Insert (a2dVpathSegment *segment, size_t index) |
void | MoveTo (double x, double y) |
add a MoveTo command to the path More... | |
void | LineTo (double x, double y, bool withStroke=true) |
add a LineTo command to the path More... | |
void | QBCurveTo (double x1, double y1, double x2, double y2, bool withStroke=true) |
add a quadratic bezier segment to the path More... | |
void | QBCurveTo (double x1, double y1, bool withStroke=true) |
add a quadratic bezier segment to the path, using the previous segment. More... | |
void | CBCurveTo (double x1, double y1, double x2, double y2, double x3, double y3, bool withStroke=true) |
add a quadratic bezier segment to the path More... | |
void | CBCurveTo (double x1, double y1, double x3, double y3, bool withStroke=true) |
add a quadratic bezier segment to the path, using the previous segment. More... | |
void | ArcTo (double x1, double y1, double x2, double y2, bool withStroke=true) |
add an arc segment to the path More... | |
void | ArcTo (double xc, double yc, double angle, bool withStroke=true) |
add an arc segment to the path, using the previous segment More... | |
void | ArcTo (double xc, double yc, double x1, double y1, double x2, double y2, bool withStroke=true) |
add an arc segment to the path, using the previous segment More... | |
void | Close (bool withStroke=true) |
Closing the path as a filled area. More... | |
void | ConvertToLines () |
Convert complex segments to line segments. | |
void | ConvertToPolygon (a2dListOfa2dVertexList &addTo, bool arc=true) |
void | Contour (double distance, a2dPATH_END_TYPE pathtype) |
create an offset contour at distance More... | |
void | Transform (const a2dAffineMatrix &world) |
transform all segments with given matrix More... | |
a2dBoundingBox | GetBbox (const a2dAffineMatrix &lworld=a2dIDENTITY_MATRIX) |
return a boundingbox of a transformed a2dVpath | |
Vector Path.
Holds a wxArray of a2dVpathSegment objects. Drawing the sequence of segments, represents the form of the shape. Shape depends on the type of segment and style of that segment.
With Vpath very complex shapes can be generated, also disjoint. e.g. polygons with holes, donuts.
a2dVpathSegment is the baseclass for several types of segments.
void a2dVpath::ArcTo | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
bool | withStroke = true |
||
) |
add an arc segment to the path
Begin point of arc is position/endpoint of previous segment
x1 | x of arc endpoint |
y1 | y of arc endpoint |
x2 | x of arc midpoint |
y2 | y of arc midpoint |
withStroke | Do stroke or not this line segment |
Definition at line 3950 of file polyver.cpp.
void a2dVpath::ArcTo | ( | double | xc, |
double | yc, | ||
double | angle, | ||
bool | withStroke = true |
||
) |
add an arc segment to the path, using the previous segment
Begin point of arc is position/endpoint of previous segment
\param xc x of arc center \param yc y of arc center \param angle angle of arc in degrees relative from the previous segment endpoint (negatif for clockwise) \param withStroke Do stroke or not this line segment
Definition at line 3958 of file polyver.cpp.
void a2dVpath::ArcTo | ( | double | xc, |
double | yc, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
bool | withStroke = true |
||
) |
add an arc segment to the path, using the previous segment
Begin point of arc is position/endpoint of previous segment
xc | x of arc center |
yc | y of arc center |
x1 | x of arc endpoint |
y1 | y of arc endpoint |
x2 | x (xc,yc) ( x2,y2) define a line which the arc will cross |
y2 | y (xc,yc) ( x2,y2) define a line which the arc will cross |
withStroke | Do stroke or not this line segment |
Definition at line 3966 of file polyver.cpp.
void a2dVpath::CBCurveTo | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | x3, | ||
double | y3, | ||
bool | withStroke = true |
||
) |
add a quadratic bezier segment to the path
x1 | endpoint of curve |
y1 | endpoint of curve |
x2 | first control point coming from previous segment in path |
y2 | first control point coming from previous segment in path |
x3 | second control point coming from previous segment in path |
y3 | second control point coming from previous segment in path |
withStroke | Do stroke or not this line segment |
Definition at line 3934 of file polyver.cpp.
void a2dVpath::CBCurveTo | ( | double | x1, |
double | y1, | ||
double | x3, | ||
double | y3, | ||
bool | withStroke = true |
||
) |
add a quadratic bezier segment to the path, using the previous segment.
x1 | endpoint of curve |
y1 | endpoint of curve |
x3 | second control point coming from previous segment in path |
y3 | second control point coming from previous segment in path |
withStroke | Do stroke or not this line segment |
Definition at line 3942 of file polyver.cpp.
void a2dVpath::Close | ( | bool | withStroke = true | ) |
Closing the path as a filled area.
The part sinve the last move is close to that move vertex.
withStroke | Do stroke or not this line segment |
Definition at line 3974 of file polyver.cpp.
void a2dVpath::Contour | ( | double | distance, |
a2dPATH_END_TYPE | pathtype | ||
) |
create an offset contour at distance
From all path parts a version is created that surrounds the original part at the given distance.
Definition at line 4429 of file polyver.cpp.
void a2dVpath::ConvertToPolygon | ( | a2dListOfa2dVertexList & | addTo, |
bool | arc = true |
||
) |
Convert to a a2dVertexList, taking and assuming it has only closed contours in path. Replacing non line (and arc segments if arc is true) with line segments.
Definition at line 4313 of file polyver.cpp.
void a2dVpath::LineTo | ( | double | x, |
double | y, | ||
bool | withStroke = true |
||
) |
add a LineTo command to the path
x | endpoint of line |
y | endpoint of line |
withStroke | Do stroke or not this line segment |
Definition at line 3911 of file polyver.cpp.
void a2dVpath::MoveTo | ( | double | x, |
double | y | ||
) |
add a MoveTo command to the path
x | point to move to |
y | point to move to |
Definition at line 3905 of file polyver.cpp.
void a2dVpath::QBCurveTo | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
bool | withStroke = true |
||
) |
add a quadratic bezier segment to the path
x1 | endpoint of curve |
y1 | endpoint of curve |
x2 | first control point coming from previous segment in path |
y2 | first control point coming from previous segment in path |
withStroke | Do stroke or not this line segment |
Definition at line 3918 of file polyver.cpp.
void a2dVpath::QBCurveTo | ( | double | x1, |
double | y1, | ||
bool | withStroke = true |
||
) |
add a quadratic bezier segment to the path, using the previous segment.
x1 | endpoint of curve |
y1 | endpoint of curve |
withStroke | Do stroke or not this line segment |
Definition at line 3926 of file polyver.cpp.
void a2dVpath::Transform | ( | const a2dAffineMatrix & | world | ) |
transform all segments with given matrix
Definition at line 4075 of file polyver.cpp.