27#include <koffice_export.h>
31class VSubpathIteratorList;
42class KARBONBASE_EXPORT VSubpath :
public VObject
44 friend class VSubpathIterator;
48 VSubpath(
const VSubpath& list );
52 const KoPoint& currentPoint()
const;
54 bool moveTo(
const KoPoint& p );
55 bool lineTo(
const KoPoint& p );
57 const KoPoint& p1,
const KoPoint& p2,
const KoPoint& p3 );
59 const KoPoint& p2,
const KoPoint& p3 );
61 const KoPoint& p1,
const KoPoint& p3 );
63 const KoPoint& p1,
const KoPoint& p2,
const double r );
109 virtual void save( TQDomElement& )
const
113 virtual void load(
const TQDomElement& element );
115 void saveSvgPath( TQString & )
const;
126 bool insert(
const VSegment* segment );
127 bool insert( uint i,
const VSegment* segment );
128 void prepend(
const VSegment* segment );
129 void append(
const VSegment* segment );
137 VSegment* current()
const
142 VSegment* getFirst()
const
147 VSegment* getLast()
const
158 VSegment* locate( uint index );
169 VSubpathIteratorList* m_iteratorList;
179class KARBONBASE_EXPORT VSubpathIterator
181 friend class VSubpathIteratorList;
184 VSubpathIterator(
const VSubpath& list );
185 VSubpathIterator(
const VSubpathIterator& itr );
188 VSubpathIterator& operator=(
const VSubpathIterator& itr );
VObject(VObject *parent, VState state=edit)
Constructs a new object that is child of parent and has the given state.
virtual VObject * clone() const =0
Create an exact copy of this object.
VObject * parent() const
Returns pointer to current parent object.
virtual void accept(VVisitor &)
Accept a VVisitor.
virtual const KoRect & boundingBox() const
Calculates the tightest bounding box around the object.
virtual void load(const TQDomElement &element)
Load this object's state from xml and initialize this object accordingly.
A class representing lines and beziers.
VSubpath provides a sophisticated list of VSegment.
virtual void save(TQDomElement &) const
Save this object's state to xml.
bool counterClockwise() const
Returns false if segmentlist is oriented clockwise.
void revert()
Reverts the winding orientation.
bool pointIsInside(const KoPoint &p) const
Returns true if point p is located inside the path.
bool isEmpty() const
Returns true if the current path is "emtpy".
bool intersects(const VSegment &segment) const
Returns true if the segment intersects this path.
The abstract visitor class.