karbon

VSubpath Class Reference

#include <vpath.h>

Inheritance diagram for VSubpath:
VObject

Public Member Functions

 VSubpath (VObject *parent)
 VSubpath (const VSubpath &list)
 VSubpath (const VSegment &segment)
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, const double r)
bool isClosed () const
void close ()
bool pointIsInside (const KoPoint &p) const
bool intersects (const VSegment &segment) const
bool counterClockwise () const
void revert ()
bool isEmpty () const
virtual const KoRect & boundingBox () const
virtual void save (TQDomElement &) const
virtual void load (const TQDomElement &element)
void saveSvgPath (TQString &) const
virtual VSubpath * clone () const
virtual void accept (VVisitor &visitor)
VSubpath & operator= (const VSubpath &list)
bool insert (const VSegment *segment)
bool insert (uint i, const VSegment *segment)
void prepend (const VSegment *segment)
void append (const VSegment *segment)
void clear ()
uint count () const
VSegment * current () const
VSegment * getFirst () const
VSegment * getLast () const
VSegment * first ()
VSegment * last ()
VSegment * prev ()
VSegment * next ()
Public Member Functions inherited from VObject
 VObject (VObject *parent, VState state=edit)
 VObject (const VObject &obj)
virtual ~VObject ()
virtual DCOPObject * dcopObject ()
virtual void draw (VPainter *painter, const KoRect *rect=0L) const
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 saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const
virtual bool loadOasis (const TQDomElement &element, KoOasisLoadingContext &context)
virtual void insertInfrontOf (VObject *newObject, VObject *oldObject)
virtual TQString name () const
void setName (const TQString &s)
VDocument * document () const

Friends

class VSubpathIterator

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
}
Protected Member Functions inherited from VObject
void addStyles (const TQDomElement *style, KoOasisLoadingContext &context)
virtual void saveOasisFill (KoGenStyles &mainStyles, KoGenStyle &stylesojectauto) const
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

Detailed Description

VSubpath provides a sophisticated list of VSegment.

Noted: it also may contain segments which are marked "deleted". If you are not interested in those undo/redo housholding data, please always use a VSubpathIterator to access segments.

Definition at line 42 of file vpath.h.

Constructor & Destructor Documentation

◆ VSubpath() [1/3]

VSubpath::VSubpath ( VObject * parent)

Definition at line 128 of file vpath.cpp.

◆ VSubpath() [2/3]

VSubpath::VSubpath ( const VSubpath & list)

Definition at line 142 of file vpath.cpp.

◆ VSubpath() [3/3]

VSubpath::VSubpath ( const VSegment & segment)

Definition at line 161 of file vpath.cpp.

◆ ~VSubpath()

VSubpath::~VSubpath ( )
virtual

Definition at line 185 of file vpath.cpp.

Member Function Documentation

◆ accept()

void VSubpath::accept ( VVisitor & )
virtual

Accept a VVisitor.

Reimplemented from VObject.

Definition at line 775 of file vpath.cpp.

◆ append()

void VSubpath::append ( const VSegment * segment)

Definition at line 885 of file vpath.cpp.

◆ arcTo()

bool VSubpath::arcTo ( const KoPoint & p1,
const KoPoint & p2,
const double r )

Definition at line 285 of file vpath.cpp.

◆ boundingBox()

const KoRect & VSubpath::boundingBox ( ) const
virtual

Calculates the tightest bounding box around the object.

Returns
the bounding box.

Reimplemented from VObject.

Definition at line 674 of file vpath.cpp.

◆ clear()

void VSubpath::clear ( )

Definition at line 905 of file vpath.cpp.

◆ clone()

VSubpath * VSubpath::clone ( ) const
virtual

Create an exact copy of this object.

Returns
the exact object copy

Implements VObject.

Definition at line 698 of file vpath.cpp.

◆ close()

void VSubpath::close ( )

Definition at line 383 of file vpath.cpp.

◆ count()

uint VSubpath::count ( ) const
inline

Definition at line 132 of file vpath.h.

◆ counterClockwise()

bool VSubpath::counterClockwise ( ) const

Returns false if segmentlist is oriented clockwise.

Definition at line 590 of file vpath.cpp.

◆ current()

VSegment * VSubpath::current ( ) const
inline

Definition at line 137 of file vpath.h.

◆ currentPoint()

const KoPoint & VSubpath::currentPoint ( ) const

Definition at line 192 of file vpath.cpp.

◆ curve1To()

bool VSubpath::curve1To ( const KoPoint & p2,
const KoPoint & p3 )

Definition at line 247 of file vpath.cpp.

◆ curve2To()

bool VSubpath::curve2To ( const KoPoint & p1,
const KoPoint & p3 )

Definition at line 266 of file vpath.cpp.

◆ curveTo()

bool VSubpath::curveTo ( const KoPoint & p1,
const KoPoint & p2,
const KoPoint & p3 )

Definition at line 227 of file vpath.cpp.

◆ first()

VSegment * VSubpath::first ( )

Definition at line 931 of file vpath.cpp.

◆ getFirst()

VSegment * VSubpath::getFirst ( ) const
inline

Definition at line 142 of file vpath.h.

◆ getLast()

VSegment * VSubpath::getLast ( ) const
inline

Definition at line 147 of file vpath.h.

◆ insert() [1/2]

bool VSubpath::insert ( const VSegment * segment)

Definition at line 806 of file vpath.cpp.

◆ insert() [2/2]

bool VSubpath::insert ( uint i,
const VSegment * segment )

Definition at line 829 of file vpath.cpp.

◆ intersects()

bool VSubpath::intersects ( const VSegment & segment) const

Returns true if the segment intersects this path.

Definition at line 562 of file vpath.cpp.

◆ isClosed()

bool VSubpath::isClosed ( ) const
inline

Definition at line 65 of file vpath.h.

◆ isEmpty()

bool VSubpath::isEmpty ( ) const
inline

Returns true if the current path is "emtpy".

That means that it has zero or just one ( == "begin") segment.

Definition at line 100 of file vpath.h.

◆ last()

VSegment * VSubpath::last ( )

Definition at line 943 of file vpath.cpp.

◆ lineTo()

bool VSubpath::lineTo ( const KoPoint & p)

Definition at line 211 of file vpath.cpp.

◆ load()

void VSubpath::load ( const TQDomElement & element)
virtual

Load this object's state from xml and initialize this object accordingly.

Parameters
elementthe DOM element from which the attributes are read

Reimplemented from VObject.

Definition at line 751 of file vpath.cpp.

◆ moveTo()

bool VSubpath::moveTo ( const KoPoint & p)

Definition at line 198 of file vpath.cpp.

◆ next()

VSegment * VSubpath::next ( )

Definition at line 973 of file vpath.cpp.

◆ operator=()

VSubpath & VSubpath::operator= ( const VSubpath & list)

Definition at line 782 of file vpath.cpp.

◆ pointIsInside()

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

Returns true if point p is located inside the path.

The winding number test is used.

Definition at line 416 of file vpath.cpp.

◆ prepend()

void VSubpath::prepend ( const VSegment * segment)

Definition at line 865 of file vpath.cpp.

◆ prev()

VSegment * VSubpath::prev ( )

Definition at line 955 of file vpath.cpp.

◆ revert()

void VSubpath::revert ( )

Reverts the winding orientation.

Definition at line 650 of file vpath.cpp.

◆ save()

virtual void VSubpath::save ( TQDomElement & element) const
inlinevirtual

Save this object's state to xml.

Parameters
elementthe DOM element to which the attributes are saved

Reimplemented from VObject.

Definition at line 109 of file vpath.h.

◆ saveSvgPath()

void VSubpath::saveSvgPath ( TQString & d) const

Definition at line 704 of file vpath.cpp.

◆ VSubpathIterator

friend class VSubpathIterator
friend

Definition at line 44 of file vpath.h.


The documentation for this class was generated from the following files: