karbon

VPath Class Reference

#include <vcomposite.h>

Inheritance diagram for VPath:

VObject VEllipse VPolygon VPolyline VRectangle VSinus VSpiral VStar List of all members.

Detailed Description

A composite path consists of one or many subpaths.

Definition at line 47 of file vcomposite.h.


Public Member Functions

 VPath (VObject *parent, VState state=normal)
 VPath (const VPath &path)
virtual ~VPath ()
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 (QDomElement &element) const
virtual void saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const
virtual void load (const QDomElement &element)
virtual bool loadOasis (const QDomElement &element, KoOasisLoadingContext &context)
virtual VPathclone () const
virtual void accept (VVisitor &visitor)
void transform (const QString &transform)
void transformOasis (const QString &transform)
void transform (const QWMatrix &mat)
void loadSvgPath (const QString &)
void saveSvgPath (QString &) const

Static Public Member Functions

static QWMatrix parseTransform (const QString &transform)

Protected Member Functions

QString buildSvgTransform () const
QString buildSvgTransform (const QWMatrix &mat) const
QString buildOasisTransform () const
QString buildOasisTransform (const QWMatrix &mat) const
void transformByViewbox (const QDomElement &element, QString 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
QWMatrix parseOasisTransform (const QString &transform)

Protected Attributes

QWMatrix m_matrix

Member Function Documentation

void VPath::accept ( VVisitor visitor  )  [virtual]

Accept a VVisitor.

Reimplemented from VObject.

Definition at line 575 of file vcomposite.cc.

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.cc.

const KoRect & VPath::boundingBox (  )  const [virtual]

Calculates the tightest bounding box around the object.

Returns:
the bounding box.

Reimplemented from VObject.

Definition at line 309 of file vcomposite.cc.

VPath * VPath::clone (  )  const [virtual]

Create an exact copy of this object.

Returns:
the exact object copy

Implements VObject.

Reimplemented in VEllipse, VPolygon, VPolyline, VRectangle, VSinus, VSpiral, and VStar.

Definition at line 337 of file vcomposite.cc.

void VPath::close (  ) 

Closes the current subpath.

Definition at line 224 of file vcomposite.cc.

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.cc.

void VPath::combinePath ( const VSubpath path  ) 

Adds a path to the composite path.

Definition at line 251 of file vcomposite.cc.

const KoPoint & VPath::currentPoint (  )  const

Returns the knot of the last segment of the last subpath.

Definition at line 174 of file vcomposite.cc.

DCOPObject * VPath::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.cc.

void VPath::draw ( VPainter painter,
const KoRect *  rect = 0L 
) const [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.cc.

bool VPath::intersects ( const VSegment segment  )  const

Returns true if the segment intersects this composite.

Definition at line 283 of file vcomposite.cc.

void VPath::load ( const QDomElement &  element  )  [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 VEllipse, VPolygon, VPolyline, VRectangle, VSinus, VSpiral, and VStar.

Definition at line 492 of file vcomposite.cc.

bool VPath::loadOasis ( const QDomElement &  element,
KoOasisLoadingContext &  context 
) [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.

Reimplemented in VEllipse, VPolygon, VPolyline, and VRectangle.

Definition at line 441 of file vcomposite.cc.

bool VPath::pointIsInside ( const KoPoint &  p  )  const

Returns true if point p is located inside the composite.

Definition at line 264 of file vcomposite.cc.

void VPath::save ( QDomElement &  element  )  const [virtual]

Save this object's state to xml.

Parameters:
element the DOM element to which the attributes are saved

Reimplemented from VObject.

Reimplemented in VEllipse, VPolygon, VPolyline, VRectangle, VSinus, VSpiral, and VStar.

Definition at line 343 of file vcomposite.cc.

void VPath::saveOasis ( KoStore *  store,
KoXmlWriter *  docWriter,
KoGenStyles &  mainStyles,
int &  index 
) const [virtual]

Save this object's state to OpenDocument.

Parameters:
store FIXME
docWriter FIXME
mainStyles FIXME

Reimplemented from VObject.

Reimplemented in VEllipse, VPolygon, VPolyline, and VRectangle.

Definition at line 365 of file vcomposite.cc.

void VPath::svgMoveTo ( double  x1,
double  y1,
bool  abs = true 
) [protected, virtual]

For svg path data parsing.

Definition at line 551 of file vcomposite.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys