kig
#include <bezier_imp.h>
Public Types | |
typedef CurveImp | Parent |
Public Types inherited from CurveImp | |
typedef ObjectImp | Parent |
Public Member Functions | |
BezierImp (const std::vector< Coordinate > &points) | |
~BezierImp () | |
Coordinate | attachPoint () const |
const Coordinate | centerOfMass () const |
bool | contains (const Coordinate &p, int width, const KigWidget &) const |
bool | containsPoint (const Coordinate &p, const KigDocument &doc) const |
BezierImp * | copy () const |
void | draw (KigPainter &p) const |
bool | equals (const ObjectImp &rhs) const |
const Coordinate | getPoint (double param, const KigDocument &) const |
const char * | iconForProperty (int which) const |
const ObjectImpType * | impRequirementForProperty (int which) const |
bool | inRect (const Rect &r, int width, const KigWidget &) const |
bool | internalContainsPoint (const Coordinate &p, double threshold, const KigDocument &doc) const |
bool | isPropertyDefinedOnOrThroughThisImp (int which) const |
uint | npoints () const |
int | numberOfProperties () const |
const std::vector< Coordinate > | points () const |
const QByteArrayList | properties () const |
const QByteArrayList | propertiesInternalNames () const |
ObjectImp * | property (int which, const KigDocument &w) const |
Rect | surroundingRect () const |
ObjectImp * | transform (const Transformation &) const |
const ObjectImpType * | type () const |
bool | valid () const |
void | visit (ObjectImpVisitor *vtor) const |
Public Member Functions inherited from CurveImp | |
Coordinate | attachPoint () const |
QString | cartesianEquationString (const KigDocument &w) const |
virtual double | getParam (const Coordinate &point, const KigDocument &) const |
Public Member Functions inherited from ObjectImp | |
virtual | ~ObjectImp () |
virtual bool | canFillInNextEscape () const |
virtual void | fillInNextEscape (QString &s, const KigDocument &) const |
int | getPropGid (const char *pname) const |
int | getPropLid (int propgid) const |
const char * | getPropName (int propgid) const |
bool | inherits (const ObjectImpType *t) const |
virtual bool | isCache () const |
bool | valid () const |
Static Public Member Functions | |
static const ObjectImpType * | stype () |
static const ObjectImpType * | stype2 () |
static const ObjectImpType * | stype3 () |
Static Public Member Functions inherited from CurveImp | |
static const ObjectImpType * | stype () |
Static Public Member Functions inherited from ObjectImp | |
static const ObjectImpType * | stype () |
Additional Inherited Members | |
Protected Member Functions inherited from CurveImp | |
double | getDist (double param, const Coordinate &p, const KigDocument &doc) const |
double | getParamofmin (double a, double b, const Coordinate &p, const KigDocument &doc) const |
Protected Member Functions inherited from ObjectImp | |
ObjectImp () | |
Detailed Description
An ObjectImp representing polynomial Bézier Curve.
Definition at line 31 of file bezier_imp.h.
Member Typedef Documentation
typedef CurveImp BezierImp::Parent |
Definition at line 41 of file bezier_imp.h.
Constructor & Destructor Documentation
BezierImp::BezierImp | ( | const std::vector< Coordinate > & | points | ) |
Constructs a Bézier curve.
Definition at line 43 of file bezier_imp.cc.
BezierImp::~BezierImp | ( | ) |
Definition at line 57 of file bezier_imp.cc.
Member Function Documentation
|
virtual |
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachment is either not done at all, or done in a specific way (like for curves, or for points) The treatment of points could also take advantage of this attachment mechanism.
If this method returns a valid Coordinate, then this is interpreted as a pivot point for the label, which can still be moved relative to that point, but follows the object when the object changes. In practice a new RelativePointType is created (position of the string), this type in turn depends on the object (to get its attachPoint) and two DoubleImp that are interpreted as relative displacement (x and y)
Implements ObjectImp.
Definition at line 61 of file bezier_imp.cc.
const Coordinate BezierImp::centerOfMass | ( | ) | const |
Returns the center of mass of the control polygon.
|
virtual |
Implements ObjectImp.
Definition at line 299 of file bezier_imp.cc.
|
virtual |
Return whether this Curve contains the given point.
This is implemented as a numerical approximation. Implementations can/should use the value test_threshold in common.h as a threshold value.
Implements CurveImp.
Definition at line 304 of file bezier_imp.cc.
|
virtual |
Returns a copy of this ObjectImp.
The copy is an exact copy. Changes to the copy don't affect the original.
Implements CurveImp.
Definition at line 199 of file bezier_imp.cc.
|
virtual |
Implements ObjectImp.
Definition at line 87 of file bezier_imp.cc.
|
virtual |
Returns true if this ObjectImp is equal to rhs.
This function checks whether rhs is of the same ObjectImp type, and whether it contains the same data as this ObjectImp.
It is used e.g. by the KigCommand stuff to see what the user has changed during a move.
Implements ObjectImp.
Definition at line 209 of file bezier_imp.cc.
|
virtual |
Implements CurveImp.
Definition at line 323 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 150 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 143 of file bezier_imp.cc.
Implements ObjectImp.
Definition at line 92 of file bezier_imp.cc.
bool BezierImp::internalContainsPoint | ( | const Coordinate & | p, |
double | threshold, | ||
const KigDocument & | doc | ||
) | const |
Definition at line 309 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 281 of file bezier_imp.cc.
uint BezierImp::npoints | ( | ) | const |
Returns the number of control points.
Definition at line 194 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 118 of file bezier_imp.cc.
const std::vector< Coordinate > BezierImp::points | ( | ) | const |
Returns the vector with control points.
Definition at line 189 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 133 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 123 of file bezier_imp.cc.
|
virtual |
Reimplemented from ObjectImp.
Definition at line 165 of file bezier_imp.cc.
|
static |
Returns the ObjectImpType representing the BezierImp type.
Definition at line 218 of file bezier_imp.cc.
|
static |
Definition at line 236 of file bezier_imp.cc.
|
static |
Definition at line 254 of file bezier_imp.cc.
|
virtual |
Implements ObjectImp.
Definition at line 289 of file bezier_imp.cc.
|
virtual |
Return this ObjectImp, transformed by the transformation t.
Implements ObjectImp.
Definition at line 66 of file bezier_imp.cc.
|
virtual |
Returns the lowermost ObjectImpType that this object is an instantiation of.
E.g. if you want to get a string containing the internal name of the type of an object, you can do:
Implements ObjectImp.
Definition at line 272 of file bezier_imp.cc.
bool BezierImp::valid | ( | ) | const |
Definition at line 110 of file bezier_imp.cc.
|
virtual |
Implements ObjectImp.
Definition at line 204 of file bezier_imp.cc.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.