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

This class provides the render context for filter effects. More...

#include <KoFilterEffectRenderContext.h>

+ Inheritance diagram for KoFilterEffectRenderContext:

Public Member Functions

QRectF filterRegion () const
 Returns the filter region the filter is applied to.
 
 KoFilterEffectRenderContext (const KoViewConverter &converter)
 
 Private (const KoViewConverter &viewConverter)
 
void setFilterRegion (const QRectF &filterRegion)
 Sets the filter region the filter is applied to.
 
void setShapeBoundingBox (const QRectF &bound)
 Sets the shape bounding box used to convert to user space coordinates.
 
QPointF toUserSpace (const QPointF &value) const
 Converts point from bounding box coordinates to user space coordinates.
 
qreal toUserSpaceX (qreal value) const
 Converts x-coordinate from bounding box coordinates to user space coordinates.
 
qreal toUserSpaceY (qreal value) const
 Converts y-coordinate from bounding box coordinates to user space coordinates.
 
const KoViewConverterviewConverter () const
 Returns the view converter.
 
 ~KoFilterEffectRenderContext ()
 

Public Attributes

const KoViewConverterconverter
 
QRectF filterRegion
 
QRectF shapeBound
 

Private Attributes

Private *const d
 
- Private Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Additional Inherited Members

- Private Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Detailed Description

This class provides the render context for filter effects.

Definition at line 12 of file KoFilterEffectRenderContext.cpp.

Constructor & Destructor Documentation

◆ KoFilterEffectRenderContext()

KoFilterEffectRenderContext::KoFilterEffectRenderContext ( const KoViewConverter & converter)
explicit

◆ ~KoFilterEffectRenderContext()

KoFilterEffectRenderContext::~KoFilterEffectRenderContext ( )

Definition at line 29 of file KoFilterEffectRenderContext.cpp.

30{
31 delete d;
32}

References d.

Member Function Documentation

◆ filterRegion()

QRectF KoFilterEffectRenderContext::filterRegion ( ) const

Returns the filter region the filter is applied to.

◆ Private()

KoFilterEffectRenderContext::Private ( const KoViewConverter & viewConverter)
inline

Definition at line 15 of file KoFilterEffectRenderContext.cpp.

17 {}
const KoViewConverter * viewConverter() const
Returns the view converter.

◆ setFilterRegion()

void KoFilterEffectRenderContext::setFilterRegion ( const QRectF & filterRegion)

Sets the filter region the filter is applied to.

Definition at line 39 of file KoFilterEffectRenderContext.cpp.

40{
41 d->filterRegion = filterRegion;
42}

References d, and filterRegion.

◆ setShapeBoundingBox()

void KoFilterEffectRenderContext::setShapeBoundingBox ( const QRectF & bound)

Sets the shape bounding box used to convert to user space coordinates.

Definition at line 44 of file KoFilterEffectRenderContext.cpp.

45{
46 d->shapeBound = bound;
47}

References d.

◆ toUserSpace()

QPointF KoFilterEffectRenderContext::toUserSpace ( const QPointF & value) const

Converts point from bounding box coordinates to user space coordinates.

Definition at line 49 of file KoFilterEffectRenderContext.cpp.

50{
51 return QPointF(value.x()*d->shapeBound.width(), value.y()*d->shapeBound.height());
52}
float value(const T *src, size_t ch)

References d, and value().

◆ toUserSpaceX()

qreal KoFilterEffectRenderContext::toUserSpaceX ( qreal value) const

Converts x-coordinate from bounding box coordinates to user space coordinates.

Definition at line 54 of file KoFilterEffectRenderContext.cpp.

55{
56 return value * d->shapeBound.width();
57}

References d, and value().

◆ toUserSpaceY()

qreal KoFilterEffectRenderContext::toUserSpaceY ( qreal value) const

Converts y-coordinate from bounding box coordinates to user space coordinates.

Definition at line 59 of file KoFilterEffectRenderContext.cpp.

60{
61 return value * d->shapeBound.height();
62}

References d, and value().

◆ viewConverter()

const KoViewConverter * KoFilterEffectRenderContext::viewConverter ( ) const

Returns the view converter.

Definition at line 64 of file KoFilterEffectRenderContext.cpp.

65{
66 return &d->converter;
67}

References d.

Member Data Documentation

◆ converter

const KoViewConverter& KoFilterEffectRenderContext::converter

Definition at line 21 of file KoFilterEffectRenderContext.cpp.

◆ d

Private* const KoFilterEffectRenderContext::d
private

Definition at line 48 of file KoFilterEffectRenderContext.h.

◆ filterRegion

QRectF KoFilterEffectRenderContext::filterRegion

Definition at line 19 of file KoFilterEffectRenderContext.cpp.

◆ shapeBound

QRectF KoFilterEffectRenderContext::shapeBound

Definition at line 20 of file KoFilterEffectRenderContext.cpp.


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