wxArt2D
|
Arc Segment. More...
#include <polyver.h>
Public Member Functions | |
a2dVpathArcSegment (double x1, double y1, double x2, double y2, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN) | |
create arc segment More... | |
a2dVpathArcSegment (a2dVpathSegmentPtr prev, double xc, double yc, double angle, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN) | |
create arc segment More... | |
a2dVpathArcSegment (a2dVpathSegmentPtr prev, double xc, double yc, double x1, double y1, double x2, double y2, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN) | |
create arc segment More... | |
a2dVpathArcSegment (const a2dVpathArcSegment &other) | |
constructor | |
~a2dVpathArcSegment () | |
destructor | |
virtual a2dVpathSegment * | Clone () |
create exact copy | |
bool | CalcR (a2dVpathSegmentPtr prev, double &radius, double ¢er_x, double ¢er_y, double &beginrad, double &midrad, double &endrad, double &phit) |
Calculation of center for the Arc. More... | |
virtual double | Length (a2dVpathSegmentPtr prev) |
calculate length | |
![]() | |
a2dVpathSegment (double x, double y, a2dPATHSEG type=a2dPATHSEG_LINETO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN) | |
constructor More... | |
a2dVpathSegment (const a2dVpathSegment &other) | |
constructor | |
virtual | ~a2dVpathSegment () |
destructor | |
a2dPATHSEG | GetType () const |
easy way to test type of segment | |
bool | GetBin () const |
used in processing | |
void | SetBin (bool bin) |
used in processing | |
a2dPATHSEG_END | GetClose () const |
is this segment the closing a part since the last move | |
void | SetClose (a2dPATHSEG_END close) |
set this segment is closing a part since the last move | |
Public Attributes | |
double | m_x2 |
second control point | |
double | m_y2 |
second control point | |
![]() | |
double | m_x1 |
x endpoint of line | |
double | m_y1 |
y endpoint of line | |
bool | m_bin: 1 |
Marker for walking over the segments. | |
a2dPATHSEG | m_type: 5 |
easy way to test type of segment | |
a2dPATHSEG_END | m_close: 3 |
is the path closing here or not | |
Arc Segment.
Create an circular Arc segment. From the previous segment to this segment position, create an arc passing through a thrid point. The Third point defines the Arc segment going clockwise or anticlockwise from begin to end point.
a2dVpathArcSegment::a2dVpathArcSegment | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
a2dPATHSEG | type = a2dPATHSEG_ARCTO , |
||
a2dPATHSEG_END | close = a2dPATHSEG_END_OPEN |
||
) |
create arc segment
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 |
type | draw or move towards point |
close | if true close this path with the last move command/segment |
Definition at line 3737 of file polyver.cpp.
a2dVpathArcSegment::a2dVpathArcSegment | ( | a2dVpathSegmentPtr | prev, |
double | xc, | ||
double | yc, | ||
double | angle, | ||
a2dPATHSEG | type = a2dPATHSEG_ARCTO , |
||
a2dPATHSEG_END | close = a2dPATHSEG_END_OPEN |
||
) |
create arc segment
Begin point of arc is position/endpoint of previous segment
prev | previous segment |
xc | x of arc center |
yc | y of arc center |
angle | angle of arc in degrees relative from the previous segment endpoint (negatif for clockwise) |
type | draw or move towards point |
close | if true close this path with the last move command/segment |
Definition at line 3749 of file polyver.cpp.
a2dVpathArcSegment::a2dVpathArcSegment | ( | a2dVpathSegmentPtr | prev, |
double | xc, | ||
double | yc, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
a2dPATHSEG | type = a2dPATHSEG_ARCTO , |
||
a2dPATHSEG_END | close = a2dPATHSEG_END_OPEN |
||
) |
create arc segment
Begin point of arc is position/endpoint of previous segment
prev | 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 |
type | draw or move towards point |
close | if true close this path with the last move command/segment |
Definition at line 3770 of file polyver.cpp.
bool a2dVpathArcSegment::CalcR | ( | a2dVpathSegmentPtr | prev, |
double & | radius, | ||
double & | center_x, | ||
double & | center_y, | ||
double & | beginrad, | ||
double & | midrad, | ||
double & | endrad, | ||
double & | phit | ||
) |
Calculation of center for the Arc.
output :
prev | the previous segment, to get start point of arc. |
radius | radius of the circle calculated |
center_x | x of the center calculated |
center_y | y of the center calculated |
beginrad | calculated starting angle in radians |
midrad | calculated middle angle in radians |
endrad | calculated end angle in radians |
phit | total calculated in radians (AntiClockwise positif, else negatif ) |
Definition at line 3820 of file polyver.cpp.