20#ifndef __VCOMPOSITE_H__
21#define __VCOMPOSITE_H__
29#include "svgpathparser.h"
31#include <koffice_export.h>
39typedef TQPtrList<VSubpath> VSubpathList;
40typedef TQPtrListIterator<VSubpath> VSubpathListIterator;
59 const KoPoint& currentPoint() const;
62 bool moveTo( const KoPoint& p );
63 bool lineTo( const KoPoint& p );
77 const KoPoint& p1, const KoPoint& p2, const KoPoint& p3 );
90 bool curve1To( const KoPoint& p2, const KoPoint& p3 );
103 bool curve2To( const KoPoint& p1, const KoPoint& p3 );
123 bool arcTo( const KoPoint& p1, const KoPoint& p2, double r );
130 bool isClosed() const;
135 void combine( const VPath& path );
140 void combinePath( const VSubpath& path );
146 bool pointIsInside( const KoPoint& p ) const;
152 bool intersects( const VSegment& segment ) const;
155 const VSubpathList& paths() const
163 VFillRule fillMode() const;
166 VFillRule fillRule() const
171 void setFillRule( VFillRule fillRule )
173 m_fillRule = fillRule;
177 virtual void draw( VPainter *painter, const KoRect* rect = 0L ) const;
179 bool drawCenterNode() const
181 return m_drawCenterNode;
184 void setDrawCenterNode( bool drawCenterNode = true )
186 m_drawCenterNode = drawCenterNode;
190 virtual void save( TQDomElement& element ) const;
191 virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
192 virtual void load( const TQDomElement& element );
193 virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
199 void transform( const TQString &transform );
200 void transformOasis( const TQString &transform );
202 static TQWMatrix parseTransform( const TQString &transform );
204 void transform( const TQWMatrix &mat )
210 void loadSvgPath( const TQString & );
211 void saveSvgPath( TQString & ) const;
214 TQString buildSvgTransform() const;
215 TQString buildSvgTransform( const TQWMatrix &mat ) const;
216 TQString buildOasisTransform() const;
217 TQString buildOasisTransform( const TQWMatrix &mat ) const;
219 void transformByViewbox( const TQDomElement &element, TQString viewbox );
222 virtual void svgMoveTo( double x1, double y1, bool abs = true );
223 virtual void svgLineTo( double x1, double y1, bool abs = true );
224 virtual void svgCurveToCubic( double x1, double y1, double x2, double y2, double x, double y, bool abs = true );
225 virtual void svgClosePath();
227 virtual void saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesojectauto ) const;
228 TQWMatrix parseOasisTransform( const TQString &transform );
237 VSubpathList m_paths;
240 bool m_drawCenterNode;
241 VFillRule m_fillRule : 1;
The base class for all karbon objects.
virtual VObject * clone() const =0 Create an exact copy of this object.
virtual void accept(VVisitor &) Accept a VVisitor.
virtual void saveOasis(KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const Save this object's state to OpenDocument.
virtual DCOPObject * dcopObject() Returns pointer to internal DCOP object.
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.
virtual void save(TQDomElement &element) const Save this object's state to xml.
virtual bool loadOasis(const TQDomElement &element, KoOasisLoadingContext &context) Load this object's state from OpenDocument and initialize this object accordingly.
virtual void draw(VPainter *painter, const KoRect *rect=0L) const Draw the object to a painting device.
A composite path consists of one or many subpaths.
A class representing lines and beziers.
VSubpath provides a sophisticated list of VSegment.
The abstract visitor class.
|