FastUIDraw
Public Member Functions | List of all members
fastuidraw::PainterEffectBrush Class Reference

A PainterEffectBrush represents applying a brush. The PainterEffectParams derived object to use with a PainterEffectBrush is PainterEffectBrushParams. More...

#include <painter_effect_brush.hpp>

Inheritance diagram for fastuidraw::PainterEffectBrush:
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 override
 
virtual unsigned int number_passes (void) const override
 
- 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 PainterEffectBrush represents applying a brush. The PainterEffectParams derived object to use with a PainterEffectBrush is PainterEffectBrushParams.

Definition at line 39 of file painter_effect_brush.hpp.

Member Function Documentation

◆ brush()

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

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

Implements fastuidraw::PainterEffect.

◆ number_passes()

virtual unsigned int fastuidraw::PainterEffectBrush::number_passes ( void  ) const
overridevirtual

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

Implements fastuidraw::PainterEffect.


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