Ipelib
|
Subpath consisting of a sequence of CurveSegment's. More...
#include <ipeshape.h>
Inherits ipe::SubPath.
Subpath consisting of a sequence of CurveSegment's.
Curve::Curve | ( | ) |
Create an empty, open subpath.
SubPath::Type Curve::type | ( | ) | const [virtual] |
Return type of this subpath.
Implements ipe::SubPath.
virtual bool ipe::Curve::closed | ( | ) | const [inline, virtual] |
const Curve * Curve::asCurve | ( | ) | const [virtual] |
Return this object as an Curve, or else 0.
Reimplemented from ipe::SubPath.
void Curve::save | ( | Stream & | stream | ) | const [virtual] |
Save subpath to XML stream.
Implements ipe::SubPath.
void Curve::draw | ( | Painter & | painter | ) | const [virtual] |
Draw subpath (does not call drawPath()).
Implements ipe::SubPath.
Add subpath to box.
Implements ipe::SubPath.
Return distance from v to subpath transformed by m.
Implements ipe::SubPath.
void Curve::snapVtx | ( | const Vector & | mouse, |
const Matrix & | m, | ||
Vector & | pos, | ||
double & | bound | ||
) | const [virtual] |
Snap to vertex.
Implements ipe::SubPath.
void Curve::snapBnd | ( | const Vector & | mouse, |
const Matrix & | m, | ||
Vector & | pos, | ||
double & | bound | ||
) | const [virtual] |
Snap to boundary of subpath.
Implements ipe::SubPath.
int ipe::Curve::countSegments | ( | ) | const [inline] |
Return number of segments. This does not include the closing segment for a closed path.
CurveSegment Curve::segment | ( | int | i | ) | const |
Return segment.
If i is negative, elements from the end are returned. The closing segment of a closed path is not accessible this way (use closingSegment() instead)!
CurveSegment Curve::closingSegment | ( | Vector | u[2] | ) | const |
Returns the closing segment of a closed path.
Since the closing segment isn't actually stored inside this object, you have to provide a length-2 vector for the control points.
This method panics if the Curve is not closed.
Append a straight segment to the subpath.
Append elliptic arc to the subpath.
Append quadratic Bezier spline.
void Curve::appendBezier | ( | const Vector & | v0, |
const Vector & | v1, | ||
const Vector & | v2, | ||
const Vector & | v3 | ||
) |
Append cubic Bezier spline.
void Curve::appendSpline | ( | const std::vector< Vector > & | v | ) |
Append B-spline curve.
void Curve::setClosed | ( | bool | closed | ) |
Set whether subpath is closed or not.