#include <vcomposite.h>
Public Member Functions | |
| VPath (VObject *parent, VState state=normal) | |
| VPath (const VPath &path) | |
| virtual DCOPObject * | dcopObject () |
| const KoPoint & | currentPoint () const |
| bool | moveTo (const KoPoint &p) |
| bool | lineTo (const KoPoint &p) |
| bool | curveTo (const KoPoint &p1, const KoPoint &p2, const KoPoint &p3) |
| bool | curve1To (const KoPoint &p2, const KoPoint &p3) |
| bool | curve2To (const KoPoint &p1, const KoPoint &p3) |
| bool | arcTo (const KoPoint &p1, const KoPoint &p2, double r) |
| void | close () |
| bool | isClosed () const |
| void | combine (const VPath &path) |
| void | combinePath (const VSubpath &path) |
| bool | pointIsInside (const KoPoint &p) const |
| bool | intersects (const VSegment &segment) const |
| const VSubpathList & | paths () const |
| virtual const KoRect & | boundingBox () const |
| VFillRule | fillMode () const |
| VFillRule | fillRule () const |
| void | setFillRule (VFillRule fillRule) |
| virtual void | draw (VPainter *painter, const KoRect *rect=0L) const |
| bool | drawCenterNode () const |
| void | setDrawCenterNode (bool drawCenterNode=true) |
| virtual void | save (TQDomElement &element) const |
| virtual void | saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const |
| virtual void | load (const TQDomElement &element) |
| virtual bool | loadOasis (const TQDomElement &element, KoOasisLoadingContext &context) |
| virtual VPath * | clone () const |
| virtual void | accept (VVisitor &visitor) |
| void | transform (const TQString &transform) |
| void | transformOasis (const TQString &transform) |
| void | transform (const TQWMatrix &mat) |
| void | loadSvgPath (const TQString &) |
| void | saveSvgPath (TQString &) const |
| Public Member Functions inherited from VObject | |
| VObject (VObject *parent, VState state=edit) | |
| VObject (const VObject &obj) | |
| virtual | ~VObject () |
| bool | boundingBoxIsInvalid () const |
| void | invalidateBoundingBox () |
| void | setParent (VObject *parent) |
| VObject * | parent () const |
| VState | state () const |
| virtual void | setState (const VState state) |
| virtual VStroke * | stroke () const |
| virtual VFill * | fill () const |
| virtual void | setStroke (const VStroke &stroke) |
| virtual void | setFill (const VFill &fill) |
| virtual void | insertInfrontOf (VObject *newObject, VObject *oldObject) |
| virtual TQString | name () const |
| void | setName (const TQString &s) |
| VDocument * | document () const |
Static Public Member Functions | |
| static TQWMatrix | parseTransform (const TQString &transform) |
Protected Member Functions | |
| TQString | buildSvgTransform () const |
| TQString | buildSvgTransform (const TQWMatrix &mat) const |
| TQString | buildOasisTransform () const |
| TQString | buildOasisTransform (const TQWMatrix &mat) const |
| void | transformByViewbox (const TQDomElement &element, TQString viewbox) |
| virtual void | svgMoveTo (double x1, double y1, bool abs=true) |
| virtual void | svgLineTo (double x1, double y1, bool abs=true) |
| virtual void | svgCurveToCubic (double x1, double y1, double x2, double y2, double x, double y, bool abs=true) |
| virtual void | svgClosePath () |
| virtual void | saveOasisFill (KoGenStyles &mainStyles, KoGenStyle &stylesojectauto) const |
| TQWMatrix | parseOasisTransform (const TQString &transform) |
| Protected Member Functions inherited from VObject | |
| void | addStyles (const TQDomElement *style, KoOasisLoadingContext &context) |
Protected Attributes | |
| TQWMatrix | m_matrix |
| Protected Attributes inherited from VObject | |
| KoRect | m_boundingBox |
| VState | m_state: 8 |
| bool | m_boundingBoxIsInvalid: 1 |
| VStroke * | m_stroke |
| VFill * | m_fill |
| DCOPObject * | m_dcop |
Additional Inherited Members | |
| Public Types inherited from VObject | |
| enum | VState { normal = 0 , normal_locked = 1 , hidden = 2 , hidden_locked = 3 , deleted = 4 , selected = 5 , edit = 6 } |
Detailed Description
A composite path consists of one or many subpaths.
Definition at line 47 of file vcomposite.h.
Constructor & Destructor Documentation
◆ VPath() [1/2]
Definition at line 47 of file vcomposite.cpp.
◆ VPath() [2/2]
| VPath::VPath | ( | const VPath & | path | ) |
Definition at line 62 of file vcomposite.cpp.
◆ ~VPath()
|
virtual |
Definition at line 88 of file vcomposite.cpp.
Member Function Documentation
◆ accept()
|
virtual |
◆ arcTo()
| bool VPath::arcTo | ( | const KoPoint & | p1, |
| const KoPoint & | p2, | ||
| double | r ) |
A convenience function to aproximate a circular arc with a bezier curve.
Input: 2 tangent vectors and a radius (same as in PostScript).
Definition at line 218 of file vcomposite.cpp.
◆ boundingBox()
|
virtual |
Calculates the tightest bounding box around the object.
- Returns
- the bounding box.
Reimplemented from VObject.
Definition at line 309 of file vcomposite.cpp.
◆ buildOasisTransform() [1/2]
|
protected |
Definition at line 756 of file vcomposite.cpp.
◆ buildOasisTransform() [2/2]
|
protected |
Definition at line 762 of file vcomposite.cpp.
◆ buildSvgTransform() [1/2]
|
protected |
Definition at line 734 of file vcomposite.cpp.
◆ buildSvgTransform() [2/2]
|
protected |
Definition at line 740 of file vcomposite.cpp.
◆ clone()
|
virtual |
Create an exact copy of this object.
- Returns
- the exact object copy
Implements VObject.
Reimplemented in VStar.
Definition at line 337 of file vcomposite.cpp.
◆ close()
| void VPath::close | ( | ) |
Closes the current subpath.
Definition at line 224 of file vcomposite.cpp.
◆ combine()
| void VPath::combine | ( | const VPath & | path | ) |
Combines two composite paths.
For example, the letter "O" is a combination of a larger and a smaller ellipitical path.
Definition at line 241 of file vcomposite.cpp.
◆ combinePath()
| void VPath::combinePath | ( | const VSubpath & | path | ) |
Adds a path to the composite path.
Definition at line 251 of file vcomposite.cpp.
◆ currentPoint()
| const KoPoint & VPath::currentPoint | ( | ) | const |
Returns the knot of the last segment of the last subpath.
Definition at line 174 of file vcomposite.cpp.
◆ curve1To()
| bool VPath::curve1To | ( | const KoPoint & | p2, |
| const KoPoint & | p3 ) |
Definition at line 206 of file vcomposite.cpp.
◆ curve2To()
| bool VPath::curve2To | ( | const KoPoint & | p1, |
| const KoPoint & | p3 ) |
Definition at line 212 of file vcomposite.cpp.
◆ curveTo()
| bool VPath::curveTo | ( | const KoPoint & | p1, |
| const KoPoint & | p2, | ||
| const KoPoint & | p3 ) |
Definition at line 199 of file vcomposite.cpp.
◆ dcopObject()
|
virtual |
Returns pointer to internal DCOP object.
If no internal DCOP object exist yet, it is created.
Reimplemented from VObject.
Definition at line 92 of file vcomposite.cpp.
◆ draw()
|
virtual |
Draw the object to a painting device.
- Parameters
-
painter abstraction that is used to render to a painting device. rect represents the visible rectangular area. If this object doesn't intersect with this area it is not drawn.
Reimplemented from VObject.
Definition at line 102 of file vcomposite.cpp.
◆ drawCenterNode()
|
inline |
Definition at line 179 of file vcomposite.h.
◆ fillMode()
| VFillRule VPath::fillMode | ( | ) | const |
Definition at line 303 of file vcomposite.cpp.
◆ fillRule()
|
inline |
Definition at line 166 of file vcomposite.h.
◆ intersects()
| bool VPath::intersects | ( | const VSegment & | segment | ) | const |
Returns true if the segment intersects this composite.
Definition at line 283 of file vcomposite.cpp.
◆ isClosed()
| bool VPath::isClosed | ( | ) | const |
Definition at line 235 of file vcomposite.cpp.
◆ lineTo()
| bool VPath::lineTo | ( | const KoPoint & | p | ) |
Definition at line 193 of file vcomposite.cpp.
◆ load()
|
virtual |
Load this object's state from xml and initialize this object accordingly.
- Parameters
-
element the DOM element from which the attributes are read
Reimplemented from VObject.
Reimplemented in VStar.
Definition at line 492 of file vcomposite.cpp.
◆ loadOasis()
|
virtual |
Load this object's state from OpenDocument and initialize this object accordingly.
- Parameters
-
element the DOM element to read attributes from context FIXME
Reimplemented from VObject.
Definition at line 441 of file vcomposite.cpp.
◆ loadSvgPath()
| void VPath::loadSvgPath | ( | const TQString & | d | ) |
Definition at line 531 of file vcomposite.cpp.
◆ moveTo()
| bool VPath::moveTo | ( | const KoPoint & | p | ) |
Definition at line 180 of file vcomposite.cpp.
◆ parseOasisTransform()
|
protected |
Definition at line 660 of file vcomposite.cpp.
◆ parseTransform()
|
static |
Definition at line 595 of file vcomposite.cpp.
◆ paths()
|
inline |
Definition at line 155 of file vcomposite.h.
◆ pointIsInside()
| bool VPath::pointIsInside | ( | const KoPoint & | p | ) | const |
Returns true if point p is located inside the composite.
Definition at line 264 of file vcomposite.cpp.
◆ save()
|
virtual |
Save this object's state to xml.
- Parameters
-
element the DOM element to which the attributes are saved
Reimplemented from VObject.
Reimplemented in VStar.
Definition at line 343 of file vcomposite.cpp.
◆ saveOasis()
|
virtual |
Save this object's state to OpenDocument.
- Parameters
-
store FIXME docWriter FIXME mainStyles FIXME
Reimplemented from VObject.
Definition at line 365 of file vcomposite.cpp.
◆ saveOasisFill()
|
protectedvirtual |
Reimplemented from VObject.
Definition at line 401 of file vcomposite.cpp.
◆ saveSvgPath()
| void VPath::saveSvgPath | ( | TQString & | d | ) | const |
Definition at line 539 of file vcomposite.cpp.
◆ setDrawCenterNode()
|
inline |
Definition at line 184 of file vcomposite.h.
◆ setFillRule()
|
inline |
Definition at line 171 of file vcomposite.h.
◆ svgClosePath()
|
protectedvirtual |
Definition at line 569 of file vcomposite.cpp.
◆ svgCurveToCubic()
|
protectedvirtual |
Definition at line 563 of file vcomposite.cpp.
◆ svgLineTo()
|
protectedvirtual |
Definition at line 557 of file vcomposite.cpp.
◆ svgMoveTo()
|
protectedvirtual |
For svg path data parsing.
Definition at line 551 of file vcomposite.cpp.
◆ transform() [1/2]
| void VPath::transform | ( | const TQString & | transform | ) |
Definition at line 581 of file vcomposite.cpp.
◆ transform() [2/2]
|
inline |
Definition at line 204 of file vcomposite.h.
◆ transformByViewbox()
|
protected |
Definition at line 420 of file vcomposite.cpp.
◆ transformOasis()
| void VPath::transformOasis | ( | const TQString & | transform | ) |
Definition at line 588 of file vcomposite.cpp.
Member Data Documentation
◆ m_matrix
|
protected |
Definition at line 231 of file vcomposite.h.
The documentation for this class was generated from the following files:
