Kanzi 3.9.10
kanzi::NodeVisual2D::BrushState Struct Reference

State associated with brush rendering. More...

#include <kanzi/core.ui/node/node_visual2d.hpp>

Public Member Functions

void clearBrush ()
 Clears the brush state and the brush renderer.
 
void render (Renderer3D &renderer, const Matrix4x4 &transform, BrushRenderer &overrideBrushRenderer)
 Renders geometry using an override brush renderer.
 
bool setBrush (Brush *assignedBrush, Node &node)
 Sets a brush to a 2D node and creates a brush renderer for the brush.
 
void setGeometry (Domain *domain, const FrameDescription &frame, Vector2 tiling)
 Creates a frame quad geometry.
 
void setGeometry (Domain *domain, const QuadDescription &quad, Vector2 tiling)
 Creates a quad geometry.
 

Public Attributes

Brushbrush
 Brush instance.
 
BrushRendererPtr brushRenderer
 Brush renderer associated with the brush.
 
GeometrySharedPtr geometry
 Geometry instance.
 
optional< RectangleFloatunitQuadTargetRectangle
 Target rectangle for the unit quad if the unit quad is used, nullopt otherwise.
 
Vector2 validatedTiling
 Last validated tiling value.
 

Detailed Description

State associated with brush rendering.

Since
Kanzi 3.9.5

Member Function Documentation

◆ clearBrush()

void kanzi::NodeVisual2D::BrushState::clearBrush ( )
inline

Clears the brush state and the brush renderer.

Since
Kanzi 3.9.9

◆ setBrush()

bool kanzi::NodeVisual2D::BrushState::setBrush ( Brush * assignedBrush,
Node & node )
inline

Sets a brush to a 2D node and creates a brush renderer for the brush.

Parameters
assignedBrushThe brush to set.
nodeThe node to which to set the brush.
Returns
If the brush was successfully set, true, otherwise false.
Since
Kanzi 3.9.9

◆ render()

void kanzi::NodeVisual2D::BrushState::render ( Renderer3D & renderer,
const Matrix4x4 & transform,
BrushRenderer & overrideBrushRenderer )

Renders geometry using an override brush renderer.

Parameters
rendererRenderer to use.
transformTransform for the quad.
overrideBrushRendererBrush renderer to use.

◆ setGeometry() [1/2]

void kanzi::NodeVisual2D::BrushState::setGeometry ( Domain * domain,
const QuadDescription & quad,
Vector2 tiling )

Creates a quad geometry.

Parameters
domainDomain to use.
quadQuad description.
tilingTexture tiling factors.

◆ setGeometry() [2/2]

void kanzi::NodeVisual2D::BrushState::setGeometry ( Domain * domain,
const FrameDescription & frame,
Vector2 tiling )

Creates a frame quad geometry.

Parameters
domainDomain to use.
frameFrame description.
tilingTexture tiling factors.

Member Data Documentation

◆ geometry

GeometrySharedPtr kanzi::NodeVisual2D::BrushState::geometry

Geometry instance.

◆ brush

Brush* kanzi::NodeVisual2D::BrushState::brush

Brush instance.

Not owned by the visual.

◆ brushRenderer

BrushRendererPtr kanzi::NodeVisual2D::BrushState::brushRenderer

Brush renderer associated with the brush.

◆ unitQuadTargetRectangle

optional<RectangleFloat> kanzi::NodeVisual2D::BrushState::unitQuadTargetRectangle

Target rectangle for the unit quad if the unit quad is used, nullopt otherwise.

◆ validatedTiling

Vector2 kanzi::NodeVisual2D::BrushState::validatedTiling

Last validated tiling value.

Since
Kanzi 3.9.9

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