|
Krita Source Code Documentation
|
#include <KoShapeStroke.h>
Inheritance diagram for KoShapeStroke:Public Member Functions | |
| Qt::PenCapStyle | capStyle () const |
| Returns the lines cap style. | |
| QColor | color () const |
| Returns the color. | |
| bool | compareFillTo (const KoShapeStrokeModel *other) override |
| bool | compareStyleTo (const KoShapeStrokeModel *other) override |
| qreal | dashOffset () const |
| Returns the dash offset. | |
| bool | hasTransparency () const override |
| bool | isVisible () const override |
| Qt::PenJoinStyle | joinStyle () const |
| Returns the lines join style. | |
| KoShapeStroke () | |
| Constructor for a thin line in black. | |
| KoShapeStroke (const KoShapeStroke &other) | |
| Copy constructor. | |
| KoShapeStroke (qreal lineWidth, const QColor &color=Qt::black) | |
| QBrush | lineBrush () const |
| Returns the strokes brush. | |
| QVector< qreal > | lineDashes () const |
| Returns the line dashes. | |
| Qt::PenStyle | lineStyle () const |
| Returns the line style. | |
| qreal | lineWidth () const |
| Returns the line width. | |
| qreal | miterLimit () const |
| Returns the miter limit. | |
| KoShapeStroke & | operator= (const KoShapeStroke &rhs) |
| Assignment operator. | |
| void | paint (const KoShape *shape, QPainter &painter) const override |
| void | paintBorder (const KoShape *shape, QPainter &painter, const QPen &pen) const |
| void | paintMarkers (const KoShape *shape, QPainter &painter) const override |
| paintMarkers Paints the markers if possible. | |
| void | paintMarkers (const KoShape *shape, QPainter &painter, const QPen &pen) const |
| Private (KoShapeStroke *_q) | |
| QPen | resultLinePen () const |
| void | setCapStyle (Qt::PenCapStyle style) |
| Sets the lines cap style. | |
| void | setColor (const QColor &color) |
| Sets the color. | |
| void | setDashOffset (qreal dashOffset) |
| Sets the dash offset. | |
| void | setJoinStyle (Qt::PenJoinStyle style) |
| Sets the lines join style. | |
| void | setLineBrush (const QBrush &brush) |
| Sets the strokes brush used to fill strokes of this border. | |
| void | setLineStyle (Qt::PenStyle style, const QVector< qreal > &dashes) |
| Sets the line style. | |
| void | setLineWidth (qreal lineWidth) |
| Sets the line width. | |
| void | setMiterLimit (qreal miterLimit) |
| Sets the miter limit. | |
| void | strokeInsets (const KoShape *shape, KoInsets &insets) const override |
| qreal | strokeMaxMarkersInset (const KoShape *shape) const override |
| ~KoShapeStroke () override | |
Public Member Functions inherited from KoShapeStrokeModel | |
| virtual | ~KoShapeStrokeModel () |
Public Attributes | |
| QBrush | brush |
| QColor | color |
| QPen | pen |
| KoShapeStroke * | q |
Private Attributes | |
| Private *const | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Additional Inherited Members | |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
A border for shapes that draws a single line around the object.
Definition at line 36 of file KoShapeStroke.cpp.
| KoShapeStroke::KoShapeStroke | ( | ) |
Constructor for a thin line in black.
Definition at line 166 of file KoShapeStroke.cpp.
References d.
| KoShapeStroke::KoShapeStroke | ( | const KoShapeStroke & | other | ) |
Copy constructor.
Definition at line 175 of file KoShapeStroke.cpp.
References d.
|
explicit |
Constructor for a Stroke
| lineWidth | the width, in pt |
| color | the color we draw the outline in. |
Definition at line 183 of file KoShapeStroke.cpp.
References color, d, and lineWidth().
|
override |
| Qt::PenCapStyle KoShapeStroke::capStyle | ( | ) | const |
| QColor KoShapeStroke::color | ( | ) | const |
Returns the color.
|
overridevirtual |
Implements KoShapeStrokeModel.
Definition at line 287 of file KoShapeStroke.cpp.
References d.
|
overridevirtual |
Implements KoShapeStrokeModel.
Definition at line 298 of file KoShapeStroke.cpp.
References d.
| qreal KoShapeStroke::dashOffset | ( | ) | const |
|
overridevirtual |
Returns true if there is some transparency, false if the stroke is fully opaque.
Implements KoShapeStrokeModel.
Definition at line 255 of file KoShapeStroke.cpp.
References d.
|
overridevirtual |
| Qt::PenJoinStyle KoShapeStroke::joinStyle | ( | ) | const |
| QBrush KoShapeStroke::lineBrush | ( | ) | const |
| QVector< qreal > KoShapeStroke::lineDashes | ( | ) | const |
| Qt::PenStyle KoShapeStroke::lineStyle | ( | ) | const |
| qreal KoShapeStroke::lineWidth | ( | ) | const |
| qreal KoShapeStroke::miterLimit | ( | ) | const |
| KoShapeStroke & KoShapeStroke::operator= | ( | const KoShapeStroke & | rhs | ) |
Paint the stroke. This method should paint the stroke around shape.
| shape | the shape to paint around |
| painter | the painter to paint to, the painter will have the topleft of the shape as its start coordinate. |
Implements KoShapeStrokeModel.
Definition at line 273 of file KoShapeStroke.cpp.
References d, and resultLinePen().
| void KoShapeStroke::paintBorder | ( | const KoShape * | shape, |
| QPainter & | painter, | ||
| const QPen & | pen ) const |
|
overridevirtual |
paintMarkers Paints the markers if possible.
Implements KoShapeStrokeModel.
Definition at line 280 of file KoShapeStroke.cpp.
References d, and resultLinePen().
| void KoShapeStroke::paintMarkers | ( | const KoShape * | shape, |
| QPainter & | painter, | ||
| const QPen & | pen ) const |
|
inline |
Definition at line 39 of file KoShapeStroke.cpp.
| QPen KoShapeStroke::resultLinePen | ( | ) | const |
Definition at line 260 of file KoShapeStroke.cpp.
| void KoShapeStroke::setCapStyle | ( | Qt::PenCapStyle | style | ) |
| void KoShapeStroke::setColor | ( | const QColor & | color | ) |
| void KoShapeStroke::setDashOffset | ( | qreal | dashOffset | ) |
Sets the dash offset.
Definition at line 390 of file KoShapeStroke.cpp.
References d, and dashOffset().
| void KoShapeStroke::setJoinStyle | ( | Qt::PenJoinStyle | style | ) |
| void KoShapeStroke::setLineBrush | ( | const QBrush & | brush | ) |
Sets the strokes brush used to fill strokes of this border.
Definition at line 400 of file KoShapeStroke.cpp.
Sets the line style.
Definition at line 371 of file KoShapeStroke.cpp.
References d.
| void KoShapeStroke::setLineWidth | ( | qreal | lineWidth | ) |
Sets the line width.
Definition at line 341 of file KoShapeStroke.cpp.
References d, and lineWidth().
| void KoShapeStroke::setMiterLimit | ( | qreal | miterLimit | ) |
Sets the miter limit.
Definition at line 351 of file KoShapeStroke.cpp.
References d, and miterLimit().
Return a strokeInsets object filled with the size inside the shape that this stroke takes.
| shape | the shape the insets will be calculated for |
| insets | the insets object that will be filled and returned. |
Implements KoShapeStrokeModel.
Definition at line 208 of file KoShapeStroke.cpp.
References KoInsets::bottom, capStyle(), d, joinStyle(), KoInsets::left, miterLimit(), KoInsets::right, and KoInsets::top.
|
overridevirtual |
Return a maximum distance that the markers of the shape can take outside the shape itself
Implements KoShapeStrokeModel.
Definition at line 232 of file KoShapeStroke.cpp.
References d, KoFlake::EndMarker, KoPathShape::hasMarkers(), lineWidth(), KoPathShape::marker(), KoMarker::maxInset(), KoFlake::MidMarker, and KoFlake::StartMarker.
| QBrush KoShapeStroke::brush |
Definition at line 46 of file KoShapeStroke.cpp.
| QColor KoShapeStroke::color |
Definition at line 44 of file KoShapeStroke.cpp.
|
private |
Definition at line 104 of file KoShapeStroke.h.
| QPen KoShapeStroke::pen |
Definition at line 45 of file KoShapeStroke.cpp.
| KoShapeStroke* KoShapeStroke::q |
Definition at line 40 of file KoShapeStroke.cpp.