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

#include <kis_cached_paint_device.h>

Classes

struct  Guard
 

Public Member Functions

KisSelectionSP getSelection ()
 
bool isEmpty () const
 
void putSelection (KisSelectionSP selection)
 

Private Attributes

KisLocklessStack< KisSelectionSPm_stack
 

Detailed Description

Definition at line 89 of file kis_cached_paint_device.h.

Member Function Documentation

◆ getSelection()

KisSelectionSP KisCachedSelection::getSelection ( )
inline

Definition at line 92 of file kis_cached_paint_device.h.

92 {
93 KisSelectionSP selection;
94
95 if(!m_stack.pop(selection)) {
97 }
98
99 return selection;
100 }
KisLocklessStack< KisSelectionSP > m_stack
static KisImageResolutionProxySP identity()

References KisImageResolutionProxy::identity(), and m_stack.

◆ isEmpty()

bool KisCachedSelection::isEmpty ( ) const
inline

Definition at line 110 of file kis_cached_paint_device.h.

110 {
111 return m_stack.isEmpty();
112 }

References m_stack.

◆ putSelection()

void KisCachedSelection::putSelection ( KisSelectionSP selection)
inline

Definition at line 102 of file kis_cached_paint_device.h.

102 {
103 selection->clear();
106 selection->pixelSelection()->moveTo(QPoint());
107 m_stack.push(selection);
108 }
void moveTo(const QPoint &pt) override
void setResolutionProxy(KisImageResolutionProxySP proxy)
KisPixelSelectionSP pixelSelection
void setDefaultBounds(KisDefaultBoundsBaseSP bounds)

References KisSelection::clear(), KisImageResolutionProxy::identity(), m_stack, KisPixelSelection::moveTo(), KisSelection::pixelSelection, KisSelection::setDefaultBounds(), and KisSelection::setResolutionProxy().

Member Data Documentation

◆ m_stack

KisLocklessStack<KisSelectionSP> KisCachedSelection::m_stack
private

Definition at line 135 of file kis_cached_paint_device.h.


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