FastUIDraw
Public Member Functions | List of all members
fastuidraw::PainterEffect Class Referenceabstract

A PainterEffect represents the interface to define and effect to apply to image data. At its core, it is made up of a sequence of passes. More...

#include <painter_effect.hpp>

Inheritance diagram for fastuidraw::PainterEffect:
Inheritance graph
[legend]

Public Member Functions

virtual PainterData::brush_value brush (unsigned pass, const reference_counted_ptr< const Image > &image, const Rect &brush_rect, PainterEffectParams &params) const =0
 
virtual unsigned int number_passes (void) const =0
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

A PainterEffect represents the interface to define and effect to apply to image data. At its core, it is made up of a sequence of passes.

Definition at line 67 of file painter_effect.hpp.

Member Function Documentation

◆ brush()

virtual PainterData::brush_value fastuidraw::PainterEffect::brush ( unsigned  pass,
const reference_counted_ptr< const Image > &  image,
const Rect brush_rect,
PainterEffectParams params 
) const
pure virtual

To be implemented by a derived class to return the brush made from the passed Image value. The returned PainterData::brush_value value needs to be valid until the PainterEffectParams dtor is called or the next call to brush() {called on from PainterEffect} passing the same PainterEffectParams. The passed image is guaranteed to have Image::type() as value Image::bindless_texture2d or Image::context_texture2d. The method brush() is to be thread safe with respect to the PainterEffect object, but NOT with respect to the PainterEffectParams object.

Parameters
passthe effect pass
imagethe image to which the effect is applied
brush_rectthe brush coordinates of the rect drawn
paramsthe parameters of the effect

Implemented in fastuidraw::PainterEffectBrush.

◆ number_passes()

virtual unsigned int fastuidraw::PainterEffect::number_passes ( void  ) const
pure virtual

To be implemented by a derived class to return the number of passes the PainterEffect has.

Implemented in fastuidraw::PainterEffectBrush.


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