wxArt2D
|
general vertexlist and array and vector path functions and classes. More...
#include "wx/geometry.h"
#include "wx/general/gen.h"
#include "wx/artbase/artglob.h"
#include "wx/artbase/afmatrix.h"
#include "wx/artbase/liner.h"
#include "wx/artbase/bbox.h"
#include <vector>
#include <wx/listimpl.cpp>
Go to the source code of this file.
Classes | |
struct | a2dHit |
struct for how a single object on one layer was hit More... | |
class | a2dLineSegment |
Normal straight line segment in a2dVertexList and a2dVertexArray. More... | |
class | a2dArcSegment |
Arc Segment in a2dVertexList. More... | |
class | a2dVertexArray |
vertex array of line and arc segments. More... | |
class | a2dVertexList |
vertex list of line and arc segments. More... | |
class | a2dVpathSegment |
Normal straight line segment in a2dVpath. More... | |
class | a2dVpathQBCurveSegment |
Quadratic Bezier curve. More... | |
class | a2dVpathCBCurveSegment |
Cubic Bezier curve. More... | |
class | a2dVpathArcSegment |
Arc Segment. More... | |
class | a2dVpath |
Vector Path. More... | |
Typedefs | |
typedef a2dSmrtPtr < a2dLineSegment > | a2dLineSegmentPtr |
smart pointer to line segment | |
typedef a2dSmrtPtr< a2dVertexList > | a2dVertexListPtr |
typedef a2dVertexList::iterator | a2dVertexListIter |
typedef a2dSmrtPtrList < a2dVertexList > | a2dListOfa2dVertexList |
typedef a2dSmrtPtr < a2dVpathSegment > | a2dVpathSegmentPtr |
smart pointer to path segment | |
Enumerations | |
enum | a2dPATH_END_TYPE { a2dPATH_END_SQAURE, a2dPATH_END_ROUND, a2dPATH_END_SQAURE_EXT } |
defines the way a polyline with a contour width is ended. | |
enum | a2dSegType { a2dNORMAL_SEG = 0x0000, a2dLINK_SEG = 0x0001, a2dHOLE_SEG = 0x0002 } |
defines the type of a segment in a a2dLineSegment More... | |
enum | a2dPATHSEG { a2dPATHSEG_MOVETO, a2dPATHSEG_LINETO, a2dPATHSEG_LINETO_NOSTROKE, a2dPATHSEG_QBCURVETO, a2dPATHSEG_QBCURVETO_NOSTROKE, a2dPATHSEG_CBCURVETO, a2dPATHSEG_CBCURVETO_NOSTROKE, a2dPATHSEG_ARCTO, a2dPATHSEG_ARCTO_NOSTROKE } |
how do we move to the point of the segment More... | |
enum | a2dPATHSEG_END { a2dPATHSEG_END_OPEN, a2dPATHSEG_END_CLOSED, a2dPATHSEG_END_CLOSED_NOSTROKE } |
end of a segment type More... | |
Functions | |
bool | InArc (double angle, double start, double end, bool clockwise) |
double | ClclDistSqrPntPnt (const a2dPoint2D &a, const a2dPoint2D &b) |
Calculate the square distance between two points. | |
double | ClclDistSqrPntLine (const a2dPoint2D &p, const a2dPoint2D &p1, const a2dPoint2D &p2) |
Calculate the square distance between a point and a line. More... | |
bool | CalcR (double begin_x, double begin_y, double middle_x, double middle_y, double end_x, double end_y, double &radius, a2dPoint2D ¢er_p) |
Calculation of center for the Arc. More... | |
bool | CalcR (double begin_x, double begin_y, double middle_x, double middle_y, double end_x, double end_y, double &radius, double ¢er_x, double ¢er_y, double &beginrad, double &midrad, double &endrad, double &phit) |
Calculation of center for the Arc. More... | |
general vertexlist and array and vector path functions and classes.
All ways to have polygons and polylines stored and drawn by a drawing context are placed here. Polygon or polylines can be list based or array based. The vector path is the structure which can be used to drawn almost anything. Basic primtives can always be converted to a vector path, and drawn that way.
Copyright: 2001-2004 (C) Klaas Holwerda, Michael Sögtrop
Licence: wxWidgets licence
RCS-ID:
Definition in file polyver.h.
enum a2dSegType |
defines the type of a segment in a a2dLineSegment
Enumerator | |
---|---|
a2dNORMAL_SEG |
not specific or part of outer contour |
a2dLINK_SEG |
links an outside contour with a hole |
a2dHOLE_SEG |
this segmnet is part of a hole |
bool CalcR | ( | double | begin_x, |
double | begin_y, | ||
double | middle_x, | ||
double | middle_y, | ||
double | end_x, | ||
double | end_y, | ||
double & | radius, | ||
a2dPoint2D & | center_p | ||
) |
Calculation of center for the Arc.
begin_x | x start point of arc. |
begin_y | y start point of arc. |
middle_x | x middle point of arc. |
middle_y | y middle point of arc. |
end_x | x end point of arc. |
end_y | y end point of arc. |
radius | radius of the circle calculated |
center_p | the center calculated |
Definition at line 4786 of file polyver.cpp.
bool CalcR | ( | double | begin_x, |
double | begin_y, | ||
double | middle_x, | ||
double | middle_y, | ||
double | end_x, | ||
double | end_y, | ||
double & | radius, | ||
double & | center_x, | ||
double & | center_y, | ||
double & | beginrad, | ||
double & | midrad, | ||
double & | endrad, | ||
double & | phit | ||
) |
Calculation of center for the Arc.
begin_x | x start point of arc. |
begin_y | y start point of arc. |
middle_x | x middle point of arc. |
middle_y | y middle point of arc. |
end_x | x end point of arc. |
end_y | y end 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 4797 of file polyver.cpp.
double ClclDistSqrPntLine | ( | const a2dPoint2D & | p, |
const a2dPoint2D & | p1, | ||
const a2dPoint2D & | p2 | ||
) |
Calculate the square distance between a point and a line.
This returns DBL_MAX if the point is beyond the edges
Definition at line 103 of file polyver.cpp.
bool InArc | ( | double | angle, |
double | start, | ||
double | end, | ||
bool | clockwise | ||
) |
is the angle within the arc segment taking into account drawing from start to end in clockwise or anti clocwise direction.
Definition at line 148 of file polyver.cpp.