Krita Source Code Documentation
Loading...
Searching...
No Matches
KisDefaultBoundsBase Class Referenceabstract

#include <kis_default_bounds_base.h>

+ Inheritance diagram for KisDefaultBoundsBase:

Public Member Functions

virtual QRect bounds () const =0
 
virtual int currentLevelOfDetail () const =0
 
virtual int currentTime () const =0
 
virtual bool externalFrameActive () const =0
 
virtual QRect imageBorderRect () const
 
virtual voidsourceCookie () const =0
 
virtual bool wrapAroundMode () const =0
 
virtual WrapAroundAxis wrapAroundModeAxis () const =0
 
virtual ~KisDefaultBoundsBase ()
 
- Public Member Functions inherited from KisShared
bool deref ()
 
bool ref ()
 
int refCount ()
 
QAtomicInt * sharedWeakReference ()
 

Additional Inherited Members

- Protected Member Functions inherited from KisShared
 KisShared ()
 
 ~KisShared ()
 

Detailed Description

Definition at line 19 of file kis_default_bounds_base.h.

Constructor & Destructor Documentation

◆ ~KisDefaultBoundsBase()

KisDefaultBoundsBase::~KisDefaultBoundsBase ( )
virtual

Definition at line 9 of file kis_default_bounds_base.cpp.

10{
11}

Member Function Documentation

◆ bounds()

virtual QRect KisDefaultBoundsBase::bounds ( ) const
pure virtual

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.

Implemented in KisDefaultBounds, KisSelectionDefaultBounds, KisSelectionEmptyBounds, KisWrapAroundBoundsWrapper, KisDefaultBoundsNodeWrapper, ThumbnailBounds, and KisScratchPadDefaultBounds.

◆ currentLevelOfDetail()

virtual int KisDefaultBoundsBase::currentLevelOfDetail ( ) const
pure virtual

◆ currentTime()

virtual int KisDefaultBoundsBase::currentTime ( ) const
pure virtual

◆ externalFrameActive()

virtual bool KisDefaultBoundsBase::externalFrameActive ( ) const
pure virtual

◆ imageBorderRect()

QRect KisDefaultBoundsBase::imageBorderRect ( ) const
virtual

Returns the rectangle of the official image size. This rect is used for wrapping the device in wrap-around mode and in some specific operations.

NOTE: don't use it unless you know what you are doing, most probably you want to use bounds() instead!

Reimplemented in KisSelectionDefaultBounds, and KisDefaultBoundsNodeWrapper.

Definition at line 13 of file kis_default_bounds_base.cpp.

14{
15 return bounds();
16}
virtual QRect bounds() const =0

References bounds().

◆ sourceCookie()

virtual void * KisDefaultBoundsBase::sourceCookie ( ) const
pure virtual

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!

Implemented in KisDefaultBounds, KisSelectionDefaultBounds, KisWrapAroundBoundsWrapper, KisDefaultBoundsNodeWrapper, and KisScratchPadDefaultBounds.

◆ wrapAroundMode()

virtual bool KisDefaultBoundsBase::wrapAroundMode ( ) const
pure virtual

◆ wrapAroundModeAxis()

virtual WrapAroundAxis KisDefaultBoundsBase::wrapAroundModeAxis ( ) const
pure virtual

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