karbon

#include <vstroke.h>

Public Types

enum  VStrokeType {
  none = 0 , solid = 1 , grad = 2 , patt = 3 ,
  unknown = 4
}
 
enum  VLineCap { capButt = 0 , capRound = 1 , capSquare = 2 }
 
enum  VLineJoin { joinMiter = 0 , joinRound = 1 , joinBevel = 2 }
 

Public Member Functions

 VStroke (VObject *parent, float width=1.0, const VLineCap cap=capButt, const VLineJoin join=joinMiter, float miterLimit=10.0)
 
 VStroke (const VColor &c, VObject *parent=0L, float width=1.0, const VLineCap cap=capButt, const VLineJoin join=joinMiter, float miterLimit=10.0)
 
 VStroke (const VStroke &stroke)
 
void setParent (VObject *parent)
 
VObject * parent () const
 
VStrokeType type () const
 
void setType (VStrokeType type)
 
const VColor & color () const
 
void setColor (const VColor &color)
 
float lineWidth () const
 
void setLineWidth (float width)
 
VLineCap lineCap () const
 
void setLineCap (VLineCap cap)
 
VLineJoin lineJoin () const
 
void setLineJoin (VLineJoin join)
 
float miterLimit () const
 
void setMiterLimit (float limit)
 
VGradient & gradient ()
 
const VGradient & gradient () const
 
VPattern & pattern ()
 
const VPattern & pattern () const
 
VDashPattern & dashPattern ()
 
const VDashPattern & dashPattern () const
 
void save (TQDomElement &element) const
 
void saveOasis (KoGenStyle &style) const
 
void load (const TQDomElement &element)
 
void loadOasis (const KoStyleStack &stack)
 
VStroke & operator= (const VStroke &stroke)
 
void transform (const TQWMatrix &m)
 

Detailed Description

Manages stroke properties.

Supported are line join/cap styles equivalents to the qpainter ones. Also the line width in pixels and line stroke type (solid / gradient). Finally it also managed the dashing pattern, see VDashPattern.

Default is black solid outline of width 1 with miter join, butt cap style and no dashes.

Definition at line 48 of file vstroke.h.

Member Enumeration Documentation

◆ VLineCap

enum VStroke::VLineCap

Definition at line 60 of file vstroke.h.

◆ VLineJoin

enum VStroke::VLineJoin

Definition at line 67 of file vstroke.h.

◆ VStrokeType

Enumerator
solid 

no stroke at all

grad 

solid stroke

patt 

gradient as stroke

unknown 

pattern as stroke

Definition at line 51 of file vstroke.h.

Constructor & Destructor Documentation

◆ VStroke() [1/4]

VStroke::VStroke ( )

Definition at line 32 of file vstroke.cpp.

◆ VStroke() [2/4]

VStroke::VStroke ( VObject *  parent,
float  width = 1.0,
const VLineCap  cap = capButt,
const VLineJoin  join = joinMiter,
float  miterLimit = 10.0 
)

Definition at line 36 of file vstroke.cpp.

◆ VStroke() [3/4]

VStroke::VStroke ( const VColor &  c,
VObject *  parent = 0L,
float  width = 1.0,
const VLineCap  cap = capButt,
const VLineJoin  join = joinMiter,
float  miterLimit = 10.0 
)

Definition at line 47 of file vstroke.cpp.

◆ VStroke() [4/4]

VStroke::VStroke ( const VStroke &  stroke)

Definition at line 59 of file vstroke.cpp.

Member Function Documentation

◆ color()

const VColor & VStroke::color ( ) const
inline

Definition at line 87 of file vstroke.h.

◆ dashPattern() [1/2]

VDashPattern & VStroke::dashPattern ( )
inline

Definition at line 108 of file vstroke.h.

◆ dashPattern() [2/2]

const VDashPattern & VStroke::dashPattern ( ) const
inline

Definition at line 109 of file vstroke.h.

◆ gradient() [1/2]

VGradient & VStroke::gradient ( )
inline

Definition at line 102 of file vstroke.h.

◆ gradient() [2/2]

const VGradient & VStroke::gradient ( ) const
inline

Definition at line 103 of file vstroke.h.

◆ lineCap()

VLineCap VStroke::lineCap ( ) const
inline

Definition at line 93 of file vstroke.h.

◆ lineJoin()

VLineJoin VStroke::lineJoin ( ) const
inline

Definition at line 96 of file vstroke.h.

◆ lineWidth()

float VStroke::lineWidth ( ) const
inline

Definition at line 90 of file vstroke.h.

◆ load()

void VStroke::load ( const TQDomElement &  element)

Definition at line 169 of file vstroke.cpp.

◆ loadOasis()

void VStroke::loadOasis ( const KoStyleStack &  stack)

Definition at line 138 of file vstroke.cpp.

◆ miterLimit()

float VStroke::miterLimit ( ) const
inline

Definition at line 99 of file vstroke.h.

◆ operator=()

VStroke & VStroke::operator= ( const VStroke &  stroke)

Definition at line 234 of file vstroke.cpp.

◆ parent()

VObject * VStroke::parent ( ) const
inline

Definition at line 82 of file vstroke.h.

◆ pattern() [1/2]

VPattern & VStroke::pattern ( )
inline

Definition at line 105 of file vstroke.h.

◆ pattern() [2/2]

const VPattern & VStroke::pattern ( ) const
inline

Definition at line 106 of file vstroke.h.

◆ save()

void VStroke::save ( TQDomElement &  element) const

Definition at line 76 of file vstroke.cpp.

◆ saveOasis()

void VStroke::saveOasis ( KoGenStyle &  style) const

Definition at line 112 of file vstroke.cpp.

◆ setColor()

void VStroke::setColor ( const VColor &  color)
inline

Definition at line 88 of file vstroke.h.

◆ setLineCap()

void VStroke::setLineCap ( VLineCap  cap)
inline

Definition at line 94 of file vstroke.h.

◆ setLineJoin()

void VStroke::setLineJoin ( VLineJoin  join)
inline

Definition at line 97 of file vstroke.h.

◆ setLineWidth()

void VStroke::setLineWidth ( float  width)

Definition at line 66 of file vstroke.cpp.

◆ setMiterLimit()

void VStroke::setMiterLimit ( float  limit)
inline

Definition at line 100 of file vstroke.h.

◆ setParent()

void VStroke::setParent ( VObject *  parent)
inline

Definition at line 81 of file vstroke.h.

◆ setType()

void VStroke::setType ( VStrokeType  type)
inline

Definition at line 85 of file vstroke.h.

◆ transform()

void VStroke::transform ( const TQWMatrix &  m)

Definition at line 259 of file vstroke.cpp.

◆ type()

VStrokeType VStroke::type ( ) const
inline

Definition at line 84 of file vstroke.h.


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