Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeStrokeModel Class Referenceabstract

#include <KoShapeStrokeModel.h>

+ Inheritance diagram for KoShapeStrokeModel:

Public Member Functions

virtual bool compareFillTo (const KoShapeStrokeModel *other)=0
 
virtual bool compareStyleTo (const KoShapeStrokeModel *other)=0
 
virtual bool hasTransparency () const =0
 
virtual bool isVisible () const =0
 
virtual void paint (const KoShape *shape, QPainter &painter) const =0
 
virtual void paintMarkers (const KoShape *shape, QPainter &painter) const =0
 paintMarkers Paints the markers if possible.
 
virtual void strokeInsets (const KoShape *shape, KoInsets &insets) const =0
 
virtual qreal strokeMaxMarkersInset (const KoShape *shape) const =0
 
virtual ~KoShapeStrokeModel ()
 

Detailed Description

A model for strokes of KoShapes. Classes that implement this model will be allowed to draw the stroke of the outline of a shape. Note that since the important members take a KoShape as argument it is possible, and preferred behavior, to have one instance of a stroke that is reused on several objects.

Definition at line 32 of file KoShapeStrokeModel.h.

Constructor & Destructor Documentation

◆ ~KoShapeStrokeModel()

KoShapeStrokeModel::~KoShapeStrokeModel ( )
virtual

Definition at line 13 of file KoShapeStrokeModel.cpp.

14{
15}

Member Function Documentation

◆ compareFillTo()

virtual bool KoShapeStrokeModel::compareFillTo ( const KoShapeStrokeModel * other)
pure virtual

Implemented in KoShapeStroke.

◆ compareStyleTo()

virtual bool KoShapeStrokeModel::compareStyleTo ( const KoShapeStrokeModel * other)
pure virtual

Implemented in KoShapeStroke.

◆ hasTransparency()

virtual bool KoShapeStrokeModel::hasTransparency ( ) const
pure virtual

Returns true if there is some transparency, false if the stroke is fully opaque.

Returns
if the stroke is transparent.

Implemented in KoShapeStroke.

◆ isVisible()

virtual bool KoShapeStrokeModel::isVisible ( ) const
pure virtual

Implemented in KoShapeStroke.

◆ paint()

virtual void KoShapeStrokeModel::paint ( const KoShape * shape,
QPainter & painter ) const
pure virtual

Paint the stroke. This method should paint the stroke around shape.

Parameters
shapethe shape to paint around
painterthe painter to paint to, the painter will have the topleft of the shape as its start coordinate.

Implemented in KoShapeStroke.

◆ paintMarkers()

virtual void KoShapeStrokeModel::paintMarkers ( const KoShape * shape,
QPainter & painter ) const
pure virtual

paintMarkers Paints the markers if possible.

See also
paint()

Implemented in KoShapeStroke.

◆ strokeInsets()

virtual void KoShapeStrokeModel::strokeInsets ( const KoShape * shape,
KoInsets & insets ) const
pure virtual

Return a strokeInsets object filled with the size inside the shape that this stroke takes.

Parameters
shapethe shape the insets will be calculated for
insetsthe insets object that will be filled and returned.

Implemented in KoShapeStroke.

◆ strokeMaxMarkersInset()

virtual qreal KoShapeStrokeModel::strokeMaxMarkersInset ( const KoShape * shape) const
pure virtual

Return a maximum distance that the markers of the shape can take outside the shape itself

Implemented in KoShapeStroke.


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