Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::ContentBrushRenderer Class Reference

Content brush renderer class. More...

#include <kanzi/core.ui/platform/graphics_backend/gl/content_brush_renderer.hpp>

Inheritance diagram for kanzi::ContentBrushRenderer:
[legend]

Public Member Functions

GraphicsBlendMode getBlendModeValue () const
 Gets the last used blend mode value. More...
 
TextureSharedPtr getContentTextureValue () const
 Gets the last used content texture value. More...
 
MaterialSharedPtr getMaterial () override
 Get currently set material for the renderer. More...
 
float getRenderOpacityValue () const
 Gets the last used render opacity value. More...
 
- Public Member Functions inherited from kanzi::GlBrushRenderer
MaterialSharedPtr acquireErrorMaterial ()
 Acquire error material for rendering. More...
 
 GlBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
 ~GlBrushRenderer () override
 Destructor. More...
 
- Public Member Functions inherited from kanzi::BrushRenderer
void bind (Renderer3D &renderer)
 Bind brush renderer for rendering. More...
 
void draw (Renderer3D &renderer, const Geometry &quad, const Matrix4x4 &transform)
 Draw a brush using given quad. More...
 
void draw (Renderer3D &renderer, const Geometry &quad, const Matrix3x3 &transform)
 Overload for draw a brush using given quad. More...
 
BrushgetBrush () const
 Access brush. More...
 
TextureSharedPtr getContentTexture () const
 Access content texture. More...
 
NodegetNode () const
 Access node. More...
 
unsigned int getPropertyChangeCounter () const
 Access property change counter. More...
 
RenderMode getRenderMode () const
 Get currently selected render mode. More...
 
float getRenderOpacity () const
 Access opacity. More...
 
bool hasOpaqueRenderMode () const
 Tell if selected render mode is opaque. More...
 
bool hasRenderMode () const
 Tell if any (valid) render mode selection has been made. More...
 
void restoreResources ()
 Restore resources after sleep. More...
 
void setContentTexture (TextureSharedPtr texture)
 Set a content texture. More...
 
void setRenderOpacity (float opacity)
 Set opacity to use for next attach. More...
 
void updateRender (bool forceOpaque, bool translucencyHint)
 Called from Node2D::updateRender(), prepare brush for rendering. More...
 
void updateRender (bool forceOpaque)
 Default parameter override for updateRender(). More...
 
void updateRender ()
 Default parameter override for updateRender(). More...
 
virtual ~BrushRenderer ()
 Destructor. More...
 

Static Public Member Functions

static BrushRendererPtr create (Brush *brush, Node *node)
 Create a new content brush renderer. More...
 

Protected Member Functions

void bindOverride (Renderer3D &renderer) override
 BrushRenderer::bindOverride() implementation. More...
 
 ContentBrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
void drawOverride (Renderer3D &renderer, const Geometry &geometry, const Matrix4x4 &transform) override
 BrushRenderer::drawOverride() implementation. More...
 
void restoreResourcesOverride () override
 BrushRenderer::restoreResourcesOverride() implementation. More...
 
void updateRenderOverride (bool forceOpaque, bool translucencyHint) override
 BrushRenderer::updateRenderOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::BrushRenderer
 BrushRenderer (Brush *brush, Node *node)
 Constructor. More...
 
bool isChangeCounterSame () const
 Check if property change counter matches that of the brush. More...
 
void setRenderMode (RenderMode selection)
 Set render mode. More...
 
void updateChangeCounter ()
 Update property change counter to match brush. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::BrushRenderer
enum  RenderMode {
  RenderModeNone, RenderModeInvalid, RenderModeOpaqueNoContent, RenderModeTranslucentNoContent,
  RenderModeOpaque, RenderModeTranslucent
}
 Enum signifying currently selected render mode. More...
 

Detailed Description

Content brush renderer class.

Constructor & Destructor Documentation

◆ ContentBrushRenderer()

kanzi::ContentBrushRenderer::ContentBrushRenderer ( Brush brush,
Node node 
)
inlineexplicitprotected

Constructor.

Parameters
brushBrush to use.
nodeNode to attach to.

Member Function Documentation

◆ create()

static BrushRendererPtr kanzi::ContentBrushRenderer::create ( Brush brush,
Node node 
)
static

Create a new content brush renderer.

Parameters
brushBrush to use.
nodeNode to attach to.

◆ getBlendModeValue()

GraphicsBlendMode kanzi::ContentBrushRenderer::getBlendModeValue ( ) const
inline

Gets the last used blend mode value.

Returns
Blend mode.

◆ getRenderOpacityValue()

float kanzi::ContentBrushRenderer::getRenderOpacityValue ( ) const
inline

Gets the last used render opacity value.

Returns
Floating point value.

◆ getContentTextureValue()

TextureSharedPtr kanzi::ContentBrushRenderer::getContentTextureValue ( ) const
inline

Gets the last used content texture value.

Returns
Shared pointer to texture.

◆ getMaterial()

MaterialSharedPtr kanzi::ContentBrushRenderer::getMaterial ( )
inlineoverridevirtual

Get currently set material for the renderer.

Returns
Shared pointer to the material that it currently set for the brush renderer. If not set, returns nullptr.

Reimplemented from kanzi::BrushRenderer.

◆ bindOverride()

void kanzi::ContentBrushRenderer::bindOverride ( Renderer3D renderer)
overrideprotectedvirtual

◆ drawOverride()

void kanzi::ContentBrushRenderer::drawOverride ( Renderer3D renderer,
const Geometry geometry,
const Matrix4x4 transform 
)
overrideprotectedvirtual

◆ restoreResourcesOverride()

void kanzi::ContentBrushRenderer::restoreResourcesOverride ( )
overrideprotectedvirtual

◆ updateRenderOverride()

void kanzi::ContentBrushRenderer::updateRenderOverride ( bool  forceOpaque,
bool  translucencyHint 
)
overrideprotectedvirtual

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