Krita Source Code Documentation
Loading...
Searching...
No Matches
KoGamutMaskShape Class Reference

#include <KoGamutMask.h>

Public Member Functions

bool coordIsClear (const QPointF &coord) const
 
 KoGamutMaskShape ()
 
 KoGamutMaskShape (KoShape *shape)
 
KoShapekoShape ()
 
QPainterPath outline ()
 
void paint (QPainter &painter)
 
void paintStroke (QPainter &painter)
 
 ~KoGamutMaskShape ()
 

Private Attributes

KoShapem_maskShape {nullptr}
 

Detailed Description

Definition at line 22 of file KoGamutMask.h.

Constructor & Destructor Documentation

◆ KoGamutMaskShape() [1/2]

KoGamutMaskShape::KoGamutMaskShape ( KoShape * shape)

Definition at line 35 of file KoGamutMask.cpp.

36 : m_maskShape(shape)
37{
38}
KoShape * m_maskShape
Definition KoGamutMask.h:36

◆ KoGamutMaskShape() [2/2]

KoGamutMaskShape::KoGamutMaskShape ( )

Definition at line 40 of file KoGamutMask.cpp.

41{
42};

◆ ~KoGamutMaskShape()

KoGamutMaskShape::~KoGamutMaskShape ( )

Definition at line 44 of file KoGamutMask.cpp.

45{
46 delete m_maskShape;
47};

References m_maskShape.

Member Function Documentation

◆ coordIsClear()

bool KoGamutMaskShape::coordIsClear ( const QPointF & coord) const

Definition at line 54 of file KoGamutMask.cpp.

55{
56 bool isClear = m_maskShape->hitTest(coord);
57
58 return isClear;
59}
virtual bool hitTest(const QPointF &position) const
Check if the shape is hit on position.
Definition KoShape.cpp:308

References KoShape::hitTest(), and m_maskShape.

◆ koShape()

KoShape * KoGamutMaskShape::koShape ( )

Definition at line 49 of file KoGamutMask.cpp.

50{
51 return m_maskShape;
52}

References m_maskShape.

◆ outline()

QPainterPath KoGamutMaskShape::outline ( )

◆ paint()

void KoGamutMaskShape::paint ( QPainter & painter)

Definition at line 61 of file KoGamutMask.cpp.

62{
63 painter.save();
64 painter.setTransform(m_maskShape->absoluteTransformation(), true);
65 m_maskShape->paint(painter);
66 painter.restore();
67}
QTransform absoluteTransformation() const
Definition KoShape.cpp:382
virtual void paint(QPainter &painter) const =0
Paint the shape fill The class extending this one is responsible for painting itself....

References KoShape::absoluteTransformation(), m_maskShape, and KoShape::paint().

◆ paintStroke()

void KoGamutMaskShape::paintStroke ( QPainter & painter)

Definition at line 69 of file KoGamutMask.cpp.

70{
71 painter.save();
72 painter.setTransform(m_maskShape->absoluteTransformation(), true);
73 m_maskShape->paintStroke(painter);
74 painter.restore();
75}
virtual void paintStroke(QPainter &painter) const
paintStroke paints the shape's stroked outline
Definition KoShape.cpp:223

References KoShape::absoluteTransformation(), m_maskShape, and KoShape::paintStroke().

Member Data Documentation

◆ m_maskShape

KoShape* KoGamutMaskShape::m_maskShape {nullptr}
private

Definition at line 36 of file KoGamutMask.h.

36{nullptr};

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