Krita Source Code Documentation
Loading...
Searching...
No Matches
KisScratchPadDefaultBounds Class Reference
+ Inheritance diagram for KisScratchPadDefaultBounds:

Public Member Functions

QRect bounds () const override
 
 KisScratchPadDefaultBounds (KisScratchPad *scratchPad)
 
voidsourceCookie () const override
 
 ~KisScratchPadDefaultBounds () override
 
- Public Member Functions inherited from KisDefaultBounds
int currentLevelOfDetail () const override
 
int currentTime () const override
 
bool externalFrameActive () const override
 
 KisDefaultBounds ()
 
 KisDefaultBounds (KisImageWSP image)
 
bool wrapAroundMode () const override
 
WrapAroundAxis wrapAroundModeAxis () const override
 
 ~KisDefaultBounds () override
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 
- Public Member Functions inherited from KisDefaultBoundsBase
virtual QRect imageBorderRect () const
 
virtual ~KisDefaultBoundsBase ()
 
- Public Member Functions inherited from KisShared
bool deref ()
 
bool ref ()
 
int refCount ()
 
QAtomicInt * sharedWeakReference ()
 

Private Attributes

KisScratchPadm_scratchPad
 

Additional Inherited Members

- Public Attributes inherited from KisDefaultBounds
KisImageWSP image
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 
- Protected Member Functions inherited from KisShared
 KisShared ()
 
 ~KisShared ()
 
- Static Protected Attributes inherited from KisDefaultBounds
static const QRect infiniteRect
 

Detailed Description

Definition at line 116 of file kis_scratch_pad.cpp.

Constructor & Destructor Documentation

◆ KisScratchPadDefaultBounds()

KisScratchPadDefaultBounds::KisScratchPadDefaultBounds ( KisScratchPad * scratchPad)
inline

Definition at line 120 of file kis_scratch_pad.cpp.

121 : m_scratchPad(scratchPad)
122 {
123 }

◆ ~KisScratchPadDefaultBounds()

KisScratchPadDefaultBounds::~KisScratchPadDefaultBounds ( )
inlineoverride

Definition at line 125 of file kis_scratch_pad.cpp.

125{}

Member Function Documentation

◆ bounds()

QRect KisScratchPadDefaultBounds::bounds ( ) const
inlineoverridevirtual

Returns a virtual bounding rect of a paint device. E.g. when a paint device has non-transparent default pixel, its virtual bounds extend much wider than the actual data it contains.

This bounds rectangle should be used in all the cases when one wants to process all the non-existing pixels with default value, which may still be visible to the user.

The returned rect usually equals to the bounds of the image, except of a few special cases for selections.

Example:

KisPaintDevice adds defaultBounds->bounds() to its extent() and exactBounds() when its default pixel is non-transparent.

By default return infinite rect to cover everything

Reimplemented from KisDefaultBounds.

Definition at line 127 of file kis_scratch_pad.cpp.

127 {
128 return m_scratchPad->imageBounds();
129 }
QRect imageBounds() const

References KisScratchPad::imageBounds(), and m_scratchPad.

◆ sourceCookie()

void * KisScratchPadDefaultBounds::sourceCookie ( ) const
inlineoverridevirtual

Return an abstract pointer to the source object, where default bounds takes its data from. It the cookie is nullptr, then the default bounds is not connected to anything. One can also compare if two default bounds are connected to the same source by comparing two pointers.

NOTE: It is intended to be used for debugging purposes only!

Reimplemented from KisDefaultBounds.

Definition at line 131 of file kis_scratch_pad.cpp.

131 {
132 return m_scratchPad;
133 }

References m_scratchPad.

Member Data Documentation

◆ m_scratchPad

KisScratchPad* KisScratchPadDefaultBounds::m_scratchPad
private

Definition at line 138 of file kis_scratch_pad.cpp.


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