43 void curveTo(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3 ) {
curveTo(
Vec2f( x1, y1 ),
Vec2f( x2, y2 ),
Vec2f( x3, y3 ) ); }
44 void arc(
const Vec2f ¢er,
float radius,
float startRadians,
float endRadians,
bool forward =
true );
45 void arc(
float centerX,
float centerY,
float radius,
float startRadians,
float endRadians,
bool forward =
true ) {
arc(
Vec2f( centerX, centerY ), radius, startRadians, endRadians, forward ); }
47 void arcTo(
float x,
float y,
float tanX,
float tanY,
float radius) {
arcTo(
Vec2f( x, y ),
Vec2f( tanX, tanY ), radius ); }
50 bool empty()
const {
return mContours.empty(); }
51 void clear() { mContours.clear(); }
56 const std::vector<Path2d>&
getContours()
const {
return mContours; }
64 void removeContour(
size_t i ) { mContours.erase( mContours.begin() + i ); }
91 for( std::vector<Path2d>::const_iterator contourIt = mContours.begin(); contourIt != mContours.end(); ++contourIt ) {
95 for( std::vector<Path2d::SegmentType>::const_iterator segIt = contourIt->mSegments.begin(); segIt != contourIt->mSegments.end(); ++segIt ) {
97 it( *segIt, &contourIt->mPoints[0], &contourIt->mPoints[pt-1] );
98 else if( ! it( *segIt, &contourIt->mPoints[pt], ( pt > 0 ) ? &contourIt->mPoints[pt-1] : 0 ) ) {
113 std::vector<Path2d> mContours;
GLuint GLenum matrix
Definition: GLee.h:10032
GLenum GLint GLint y
Definition: GLee.h:987
void lineTo(float x, float y)
Definition: Shape2d.h:39
Rectf calcBoundingBox() const
Returns the bounding box of the Shape's control points. Note that this is not necessarily the boundin...
Definition: Shape2d.cpp:95
bool empty() const
Definition: Shape2d.h:50
Shape2d transformCopy(const MatrixAffine2f &matrix) const
Returns a copy transformed by matrix.
Definition: Shape2d.cpp:87
void appendContour(const Path2d &contour)
Definition: Shape2d.h:63
Vec2< float > Vec2f
Definition: Vector.h:1314
void arcTo(float x, float y, float tanX, float tanY, float radius)
Definition: Shape2d.h:47
void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
Definition: Shape2d.h:43
const Vec2f & getCurrentPoint() const
Definition: Shape2d.h:59
static Vec2< float > zero()
Definition: Vector.h:295
void transform(const MatrixAffine2f &matrix)
Transforms the Shape2d by matrix.
Definition: Shape2d.cpp:81
size_t getNumContours() const
Definition: Shape2d.h:52
void append(const Shape2d &shape)
Appends the contours of shape to this shape.
Definition: Shape2d.cpp:69
const Path2d & getContour(size_t i) const
Definition: Shape2d.h:54
void scale(const Vec2f &amount, Vec2f scaleCenter=Vec2f::zero())
Scales the Shape2d by amount.x on X and amount.y on Y around the center scaleCenter.
Definition: Shape2d.cpp:75
void close()
Definition: Shape2d.cpp:64
void lineTo(const Vec2f &p)
Definition: Shape2d.cpp:37
Rectf calcPreciseBoundingBox() const
Returns the precise bounding box of the Shape's curves. Slower to calculate than calcBoundingBox().
Definition: Shape2d.cpp:115
void removeContour(size_t i)
Definition: Shape2d.h:64
void clear()
Definition: Shape2d.h:51
bool contains(const Vec2f &pt) const
Returns whether the point pt is contained within the boundaries of the shape.
Definition: Shape2d.cpp:135
Path2d & getContour(size_t i)
Definition: Shape2d.h:55
GLenum GLint x
Definition: GLee.h:987
void arc(float centerX, float centerY, float radius, float startRadians, float endRadians, bool forward=true)
Definition: Shape2d.h:45
const std::vector< Path2d > & getContours() const
Definition: Shape2d.h:56
void iterate(IT &it)
Iterates all of the contours and points of a Shape2d.
Definition: Shape2d.h:88
void quadTo(const Vec2f &p1, const Vec2f &p2)
Definition: Shape2d.cpp:42
GLfloat GLfloat p
Definition: GLee.h:8473
std::vector< Path2d > & getContours()
Definition: Shape2d.h:57
void moveTo(const Vec2f &p)
Definition: Shape2d.cpp:31
void arc(const Vec2f ¢er, float radius, float startRadians, float endRadians, bool forward=true)
Definition: Shape2d.cpp:52
void curveTo(const Vec2f &p1, const Vec2f &p2, const Vec2f &p3)
Definition: Shape2d.cpp:47
void moveTo(float x, float y)
Definition: Shape2d.h:37
void quadTo(float x1, float y1, float x2, float y2)
Definition: Shape2d.h:41
void arcTo(const Vec2f &p, const Vec2f &t, float radius)
Definition: Shape2d.cpp:59
GLdouble GLdouble t
Definition: GLee.h:1426
static const int sSegmentTypePointCounts[]
Definition: Path2d.h:97