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

#include <KisLayerStyleKnockoutBlower.h>

Public Member Functions

void apply (KisPainter *painter, KisPaintDeviceSP mergedStyle, const QRect &rect) const
 
bool isEmpty () const
 
 KisLayerStyleKnockoutBlower ()
 
 KisLayerStyleKnockoutBlower (const KisLayerStyleKnockoutBlower &rhs)
 
KisSelectionSP knockoutSelectionLazy ()
 
void resetKnockoutSelection ()
 
void setKnockoutSelection (KisSelectionSP selection)
 

Private Attributes

KisSelectionSP m_knockoutSelection
 
QReadWriteLock m_lock
 

Detailed Description

Definition at line 15 of file KisLayerStyleKnockoutBlower.h.

Constructor & Destructor Documentation

◆ KisLayerStyleKnockoutBlower() [1/2]

KisLayerStyleKnockoutBlower::KisLayerStyleKnockoutBlower ( )

Definition at line 14 of file KisLayerStyleKnockoutBlower.cpp.

15{
16}

◆ KisLayerStyleKnockoutBlower() [2/2]

KisLayerStyleKnockoutBlower::KisLayerStyleKnockoutBlower ( const KisLayerStyleKnockoutBlower & rhs)

Member Function Documentation

◆ apply()

void KisLayerStyleKnockoutBlower::apply ( KisPainter * painter,
KisPaintDeviceSP mergedStyle,
const QRect & rect ) const

Definition at line 56 of file KisLayerStyleKnockoutBlower.cpp.

57{
58 QReadLocker l(&m_lock);
59
61
62 painter->setOpacityToUnit();
63 painter->setChannelFlags(QBitArray());
66 painter->bitBlt(rect.topLeft(), mergedStyle, rect);
67 painter->setSelection(0);
68}
const QString COMPOSITE_COPY
void setSelection(KisSelectionSP selection)
void bitBlt(qint32 dstX, qint32 dstY, const KisPaintDeviceSP srcDev, qint32 srcX, qint32 srcY, qint32 srcWidth, qint32 srcHeight)
void setOpacityToUnit()
void setChannelFlags(QBitArray channelFlags)
void setCompositeOpId(const KoCompositeOp *op)
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:130

References KisPainter::bitBlt(), COMPOSITE_COPY, KIS_SAFE_ASSERT_RECOVER_NOOP, m_knockoutSelection, m_lock, KisPainter::setChannelFlags(), KisPainter::setCompositeOpId(), KisPainter::setOpacityToUnit(), and KisPainter::setSelection().

◆ isEmpty()

bool KisLayerStyleKnockoutBlower::isEmpty ( ) const

Definition at line 70 of file KisLayerStyleKnockoutBlower.cpp.

71{
72 QReadLocker l(&m_lock);
73 return !m_knockoutSelection;
74}

References m_knockoutSelection, and m_lock.

◆ knockoutSelectionLazy()

KisSelectionSP KisLayerStyleKnockoutBlower::knockoutSelectionLazy ( )

Definition at line 23 of file KisLayerStyleKnockoutBlower.cpp.

24{
25 {
26 QReadLocker l(&m_lock);
29 }
30 }
31
32 {
33 QWriteLocker l(&m_lock);
36 } else {
40 }
41 }
42}
static KisImageResolutionProxySP identity()

References KisImageResolutionProxy::identity(), m_knockoutSelection, and m_lock.

◆ resetKnockoutSelection()

void KisLayerStyleKnockoutBlower::resetKnockoutSelection ( )

Definition at line 50 of file KisLayerStyleKnockoutBlower.cpp.

51{
52 QWriteLocker l(&m_lock);
54}

References m_knockoutSelection, and m_lock.

◆ setKnockoutSelection()

void KisLayerStyleKnockoutBlower::setKnockoutSelection ( KisSelectionSP selection)

Definition at line 44 of file KisLayerStyleKnockoutBlower.cpp.

45{
46 QWriteLocker l(&m_lock);
47 m_knockoutSelection = selection;
48}

References m_knockoutSelection, and m_lock.

Member Data Documentation

◆ m_knockoutSelection

KisSelectionSP KisLayerStyleKnockoutBlower::m_knockoutSelection
private

Definition at line 32 of file KisLayerStyleKnockoutBlower.h.

◆ m_lock

QReadWriteLock KisLayerStyleKnockoutBlower::m_lock
mutableprivate

Definition at line 31 of file KisLayerStyleKnockoutBlower.h.


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