Public Member Functions | |
BezierCurve (const QList< QPointF > &pointList, bool smooth=true) | |
BezierCurve (const QList< QPointF > &pointList, const QList< qreal > &pressureList, double tol, bool smooth=true) | |
Status | createDomElement (QXmlStreamWriter &xmlStream) |
void | loadDomElement (const QDomElement &element) |
qreal | getWidth () const |
qreal | getFeather () const |
bool | getVariableWidth () const |
int | getColorNumber () const |
void | decreaseColorNumber () |
int | getVertexSize () const |
QPointF | getOrigin () const |
QPointF | getVertex (int i) const |
QPointF | getC1 (int i) const |
QPointF | getC2 (int i) const |
qreal | getPressure (int i) const |
bool | isSelected (int vertex) const |
bool | isSelected () const |
bool | isPartlySelected () const |
bool | isInvisible () const |
bool | intersects (QPointF point, qreal distance) |
bool | intersects (QRectF rectangle) |
bool | isFilled () const |
void | setOrigin (const QPointF &point) |
void | setOrigin (const QPointF &point, const qreal &pressureValue, const bool &trueOrFalse) |
void | setC1 (int i, const QPointF &point) |
void | setC2 (int i, const QPointF &point) |
void | setVertex (int i, const QPointF &point) |
void | setLastVertex (const QPointF &point) |
void | setWidth (qreal desiredWidth) |
void | setFeather (qreal desiredFeather) |
void | setVariableWidth (bool YesOrNo) |
void | setInvisibility (bool YesOrNo) |
void | setColorNumber (int colorNumber) |
void | setSelected (bool YesOrNo) |
void | setSelected (int i, bool YesOrNo) |
void | setFilled (bool yesOrNo) |
BezierCurve::setFilled. | |
BezierCurve | transformed (QTransform transformation) const |
void | transform (QTransform transformation) |
void | appendCubic (const QPointF &c1Point, const QPointF &c2Point, const QPointF &vertexPoint, qreal pressureValue) |
void | addPoint (int position, const QPointF point) |
void | addPoint (int position, const qreal fraction) |
QPointF | getPointOnCubic (int i, qreal t) |
void | removeVertex (int i) |
QPainterPath | getStraightPath () |
QPainterPath | getSimplePath () |
QPainterPath | getStrokedPath () |
QPainterPath | getStrokedPath (qreal width) |
QPainterPath | getStrokedPath (qreal width, bool pressure) |
QRectF | getBoundingRect () |
void | drawPath (QPainter &painter, const Object &object, QTransform transformation, bool simplified, bool showThinLines) |
void | createCurve (const QList< QPointF > &pointList, const QList< qreal > &pressureList, bool smooth) |
void | smoothCurve () |
Static Public Member Functions | |
static void | simplify (double tol, const QList< QPointF > &inputList, int j, int k, QList< bool > &markList) |
static qreal | eLength (const QPointF point) |
static qreal | mLength (const QPointF point) |
static void | normalise (QPointF &point) |
static qreal | findDistance (BezierCurve curve, int i, QPointF P, QPointF &nearestPoint, qreal &t) |
static bool | findIntersection (BezierCurve curve1, int i1, BezierCurve curve2, int i2, QList< Intersection > &intersections) |
Private Attributes | |
QPointF | origin |
QList< QPointF > | c1 |
QList< QPointF > | c2 |
QList< QPointF > | vertex |
QList< float > | pressure |
int | colorNumber = 0 |
float | width = 0.f |
float | feather = 0.f |
bool | variableWidth = 0.f |
bool | invisible = false |
bool | mFilled = false |
QList< bool > | selected |
Definition at line 33 of file beziercurve.h.
|
explicit |
Definition at line 30 of file beziercurve.cpp.
Definition at line 34 of file beziercurve.cpp.
|
explicit |
Definition at line 44 of file beziercurve.cpp.
void BezierCurve::addPoint | ( | int | position, |
const QPointF | point | ||
) |
Definition at line 339 of file beziercurve.cpp.
void BezierCurve::addPoint | ( | int | position, |
const qreal | fraction | ||
) |
Definition at line 365 of file beziercurve.cpp.
void BezierCurve::appendCubic | ( | const QPointF & | c1Point, |
const QPointF & | c2Point, | ||
const QPointF & | vertexPoint, | ||
qreal | pressureValue | ||
) |
Definition at line 330 of file beziercurve.cpp.
void BezierCurve::createCurve | ( | const QList< QPointF > & | pointList, |
const QList< qreal > & | pressureList, | ||
bool | smooth | ||
) |
Definition at line 628 of file beziercurve.cpp.
Status BezierCurve::createDomElement | ( | QXmlStreamWriter & | xmlStream | ) |
Definition at line 87 of file beziercurve.cpp.
|
inline |
Definition at line 47 of file beziercurve.h.
void BezierCurve::drawPath | ( | QPainter & | painter, |
const Object & | object, | ||
QTransform | transformation, | ||
bool | simplified, | ||
bool | showThinLines | ||
) |
Definition at line 432 of file beziercurve.cpp.
|
static |
Definition at line 757 of file beziercurve.cpp.
|
static |
Definition at line 780 of file beziercurve.cpp.
|
static |
Definition at line 838 of file beziercurve.cpp.
QRectF BezierCurve::getBoundingRect | ( | ) |
Definition at line 622 of file beziercurve.cpp.
|
inline |
Definition at line 51 of file beziercurve.h.
|
inline |
Definition at line 52 of file beziercurve.h.
|
inline |
Definition at line 46 of file beziercurve.h.
|
inline |
Definition at line 44 of file beziercurve.h.
|
inline |
Definition at line 49 of file beziercurve.h.
QPointF BezierCurve::getPointOnCubic | ( | int | i, |
qreal | t | ||
) |
Definition at line 805 of file beziercurve.cpp.
|
inline |
Definition at line 53 of file beziercurve.h.
QPainterPath BezierCurve::getSimplePath | ( | ) |
Definition at line 529 of file beziercurve.cpp.
QPainterPath BezierCurve::getStraightPath | ( | ) |
Definition at line 517 of file beziercurve.cpp.
QPainterPath BezierCurve::getStrokedPath | ( | ) |
Definition at line 540 of file beziercurve.cpp.
QPainterPath BezierCurve::getStrokedPath | ( | qreal | width | ) |
Definition at line 545 of file beziercurve.cpp.
QPainterPath BezierCurve::getStrokedPath | ( | qreal | width, |
bool | pressure | ||
) |
Definition at line 551 of file beziercurve.cpp.
|
inline |
Definition at line 45 of file beziercurve.h.
|
inline |
Definition at line 50 of file beziercurve.h.
|
inline |
Definition at line 48 of file beziercurve.h.
|
inline |
Definition at line 43 of file beziercurve.h.
bool BezierCurve::intersects | ( | QPointF | point, |
qreal | distance | ||
) |
Definition at line 814 of file beziercurve.cpp.
bool BezierCurve::intersects | ( | QRectF | rectangle | ) |
Definition at line 825 of file beziercurve.cpp.
|
inline |
Definition at line 60 of file beziercurve.h.
|
inline |
Definition at line 57 of file beziercurve.h.
|
inline |
Definition at line 56 of file beziercurve.h.
|
inline |
Definition at line 55 of file beziercurve.h.
|
inline |
Definition at line 54 of file beziercurve.h.
void BezierCurve::loadDomElement | ( | const QDomElement & | element | ) |
Definition at line 147 of file beziercurve.cpp.
|
static |
Definition at line 764 of file beziercurve.cpp.
|
static |
Definition at line 771 of file beziercurve.cpp.
void BezierCurve::removeVertex | ( | int | i | ) |
Definition at line 400 of file beziercurve.cpp.
void BezierCurve::setC1 | ( | int | i, |
const QPointF & | point | ||
) |
Definition at line 193 of file beziercurve.cpp.
void BezierCurve::setC2 | ( | int | i, |
const QPointF & | point | ||
) |
Definition at line 205 of file beziercurve.cpp.
|
inline |
Definition at line 72 of file beziercurve.h.
void BezierCurve::setFeather | ( | qreal | desiredFeather | ) |
Definition at line 251 of file beziercurve.cpp.
void BezierCurve::setFilled | ( | bool | YesOrNo | ) |
BezierCurve::setFilled.
YesOrNo | bool setFilled doesn't do anything on its own, but we use it to see if a curve has been filled with an BezierArea. |
Definition at line 277 of file beziercurve.cpp.
void BezierCurve::setInvisibility | ( | bool | YesOrNo | ) |
Definition at line 261 of file beziercurve.cpp.
void BezierCurve::setLastVertex | ( | const QPointF & | point | ) |
Definition at line 233 of file beziercurve.cpp.
void BezierCurve::setOrigin | ( | const QPointF & | point | ) |
Definition at line 181 of file beziercurve.cpp.
void BezierCurve::setOrigin | ( | const QPointF & | point, |
const qreal & | pressureValue, | ||
const bool & | trueOrFalse | ||
) |
Definition at line 186 of file beziercurve.cpp.
|
inline |
Definition at line 73 of file beziercurve.h.
void BezierCurve::setSelected | ( | int | i, |
bool | YesOrNo | ||
) |
Definition at line 266 of file beziercurve.cpp.
void BezierCurve::setVariableWidth | ( | bool | YesOrNo | ) |
Definition at line 256 of file beziercurve.cpp.
void BezierCurve::setVertex | ( | int | i, |
const QPointF & | point | ||
) |
Definition at line 217 of file beziercurve.cpp.
void BezierCurve::setWidth | ( | qreal | desiredWidth | ) |
Definition at line 246 of file beziercurve.cpp.
|
static |
Definition at line 707 of file beziercurve.cpp.
void BezierCurve::smoothCurve | ( | ) |
Definition at line 662 of file beziercurve.cpp.
void BezierCurve::transform | ( | QTransform | transformation | ) |
Definition at line 315 of file beziercurve.cpp.
BezierCurve BezierCurve::transformed | ( | QTransform | transformation | ) | const |
Definition at line 282 of file beziercurve.cpp.
Definition at line 107 of file beziercurve.h.
Definition at line 108 of file beziercurve.h.
|
private |
Definition at line 111 of file beziercurve.h.
|
private |
Definition at line 113 of file beziercurve.h.
|
private |
Definition at line 115 of file beziercurve.h.
|
private |
Definition at line 116 of file beziercurve.h.
|
private |
Definition at line 106 of file beziercurve.h.
|
private |
Definition at line 110 of file beziercurve.h.
|
private |
Definition at line 117 of file beziercurve.h.
|
private |
Definition at line 114 of file beziercurve.h.
Definition at line 109 of file beziercurve.h.
|
private |
Definition at line 112 of file beziercurve.h.