#include <kanzi/graphics_2d/texture_brush.hpp>
Public Member Functions | |
virtual BrushSharedPtr | clone () KZ_OVERRIDE |
Brush::clone() implementation. More... | |
virtual BrushRendererSharedPtr | createBrushRenderer (Node *node) KZ_OVERRIDE |
Brush::createBrushRenderer() implementation. More... | |
virtual void | load (ResourceManager *resourceManager) KZ_OVERRIDE |
Brush::load() implementation. More... | |
TextureSharedPtr | getRenderTexture () const |
Get texture of this texture brush. More... | |
void | setRenderTexture (TextureSharedPtr texture) |
Set texture of this texture brush. More... | |
![]() | |
unsigned int | getPropertyChangeCounter () const |
Access property change counter. More... | |
void | updatePropertyChangeCounter () |
Update property change counter. More... | |
TextureSharedPtr | getContentTexture () const |
Access content texture. More... | |
void | setContentTexture (TextureSharedPtr texture) |
Set content texture. More... | |
string | getName () const |
Get name of this brush. More... | |
void | setName (string_view name) |
Set name of this brush. More... | |
Vector2 | getTiling () const |
Get tiling vector. More... | |
bool | isRenderable () const |
Tell whether or not the brush needs rendering. More... | |
bool | isOpaque () const |
Tell if the brush is opaque. More... | |
ColorRGBA | getModulateColor () const |
Gets the value of ModulateColorProperty. More... | |
void | setModulateColor (ColorRGBA value) |
Sets the value of ModulateColorProperty. More... | |
float | getHorizontalTiling () const |
Gets the value of HorizontalTilingProperty. More... | |
void | setHorizontalTiling (float value) |
Sets the value of HorizontalTilingProperty. More... | |
float | getVerticalTiling () const |
Gets the value of VerticalTilingProperty. More... | |
void | setVerticalTiling (float value) |
Sets the value of VerticalTilingProperty. More... | |
![]() | |
Object (Domain *domain) | |
virtual | ~Object () |
Domain * | getDomain () const |
Returns the domain the object belongs to. More... | |
KzuPropertyManager * | getPropertyManager () const |
Returns the property manager of the object. More... | |
KzuTaskScheduler * | getTaskScheduler () const |
Returns the task scheduler of the object. More... | |
KzuMessageDispatcher * | getMessageDispatcher () const |
Returns the message dispatcher of the object. More... | |
ResourceManager * | getResourceManager () const |
Returns the resource manager of the object. More... | |
virtual const Metaclass * | getDynamicMetaclass () const |
Returns the metaclass of the dynamic type of the object. More... | |
bool | isTypeOf (const Metaclass *objectType) const |
Determines if the type of this object is the given type or derived from it. More... | |
template<typename DataType > | |
void | setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType value) |
Sets the local value of a property. More... | |
void | setProperty (const PropertyType< ResourceID > &propertyType, ResourceSharedPtr value) |
Sets the local value of a resource id property with a resource pointer. More... | |
template<typename DataType > | |
DataType | getProperty (const PropertyType< DataType > &propertyType) const |
Returns the current value of a property. More... | |
template<typename DataType > | |
bool | getProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::DataType &value) const |
Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More... | |
template<typename DataType > | |
void | setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType value) |
void | setAbstractProperty (AbstractPropertyType abstractPropertyType, ResourceSharedPtr value) |
template<typename DataType > | |
DataType | getAbstractProperty (AbstractPropertyType abstractPropertyType) const |
template<typename DataType > | |
bool | getAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::DataType &value) const |
bool | hasValue (AbstractPropertyType propertyType) const |
Evaluates whether there are any inputs into the property value. More... | |
bool | hasLocalValue (AbstractPropertyType propertyType) const |
Evaluates whether there is a local value set for the property. More... | |
void | removeLocalValue (AbstractPropertyType propertyType) |
Removes the local value associated with the property. More... | |
void | copyLocalValues (const Object &other) |
Copies all local values from another object. More... | |
AppliedStyleEntry * | applyObjectStyle (kanzi::StyleSharedPtr style) |
Applies a style to an object. More... | |
void | unapplyObjectStyle (AppliedStyleEntry *appliedStyleEntry) |
void | applyObjectStyles () |
Apply all styles for an object node. More... | |
void | unapplyObjectStyles () |
Unapplies and removes all applied styles. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
static TextureBrushSharedPtr | create (Domain *domain, string_view name) |
Create a new texture brush. More... | |
static TextureBrushSharedPtr | create (Domain *domain, string_view name, TextureSharedPtr texture) |
Create a new texture brush. More... | |
static TextureBrushSharedPtr | create (Domain *domain, string_view name, TextureSharedPtr texture, const ColorRGBA &color) |
Create a new texture brush. More... | |
![]() | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
![]() | |
static const Metaclass * | getStaticMetaclass () |
Returns the metaclass of Object class. More... | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Default implementation that returns empty editor info. More... | |
Protected Member Functions | |
TextureBrush (Domain *domain, string_view name) | |
Constructor. More... | |
TextureBrush (Domain *domain, string_view name, TextureSharedPtr texture) | |
Constructor. More... | |
TextureBrush (Domain *domain, string_view name, TextureSharedPtr texture, const ColorRGBA &color) | |
Constructor. More... | |
virtual void | onPropertyChanged (AbstractPropertyType propertyType, KzuPropertyNotificationReason reason) KZ_OVERRIDE |
Object::onPropertyChanged() implementation. More... | |
void | acquireTextureResource (ResourceManager *resourceManager) |
Refresh texture id. More... | |
void | calculateRenderingProperties () |
Recalculate rendering properties. More... | |
![]() | |
Brush (Domain *domain, string_view name) | |
Constructor. More... | |
virtual | ~Brush () |
Destructor. More... | |
void | setRenderable (bool renderable) |
Set renderable status. More... | |
void | setOpaque (bool opaque) |
Set opaqueness status. More... | |
![]() | |
void | initialize () |
void | onCopy (const Object &other) |
Protected Attributes | |
TextureSharedPtr | m_textureResource |
Texture resource if acquired from Resource ID. More... | |
FramebufferSharedPtr | m_framebufferResource |
TextureSharedPtr | m_userTexture |
Texture resource assigned by user. More... | |
![]() | |
AppliedStyleContainer | m_appliedStyles |
Listing of applied styles applied to this object. More... | |
Properties | |
static PropertyType< ResourceID > | TextureProperty |
Texture property. More... | |
ResourceID | getTextureResourceID () const |
Gets the value of TextureProperty. More... | |
void | setTextureResourceID (ResourceID value) |
Sets the value of TextureProperty. More... | |
Additional Inherited Members | |
![]() | |
static PropertyType< ColorRGBA > | ModulateColorProperty |
ModulateColor property. More... | |
static PropertyType< float > | HorizontalTilingProperty |
HorizontalTiling property. More... | |
static PropertyType< float > | VerticalTilingProperty |
VerticalTiling property. More... | |
![]() | |
typedef vector < AppliedStyleEntry * > | AppliedStyleContainer |
Applied style container. More... | |
Texture brush class.
Implements a textured brush used to fill areas with patterns.
|
inlineexplicitprotected |
Constructor.
Leaves all properties unset.
domain | domain the brush belongs to. |
name | Name of the brush. |
|
inlineexplicitprotected |
Constructor.
Will use white modulating color by default.
domain | domain the brush belongs to. |
name | Name of the brush. |
texture | Texture to use for rendering the brush. |
|
explicitprotected |
Constructor.
domain | domain the brush belongs to. |
name | Name of the brush. |
texture | Texture to use for rendering the brush. |
color | Color to use for modulating the texture. |
|
inline |
Gets the value of TextureProperty.
|
inline |
Sets the value of TextureProperty.
|
static |
|
static |
Create a new texture brush.
Leaves all properties unset.
domain | uiDomain the brush belongs to. |
name | of this texture brush. |
|
static |
|
static |
|
virtual |
Brush::clone() implementation.
Implements kanzi::Brush.
|
virtual |
Brush::createBrushRenderer() implementation.
Implements kanzi::Brush.
|
virtual |
Brush::load() implementation.
Reimplemented from kanzi::Brush.
TextureSharedPtr kanzi::TextureBrush::getRenderTexture | ( | ) | const |
Get texture of this texture brush.
texture | Current texture. |
|
inline |
Set texture of this texture brush.
texture | New texture. |
|
protectedvirtual |
Object::onPropertyChanged() implementation.
Reimplemented from kanzi::Brush.
|
protected |
Refresh texture id.
Re-acquires texture resource from resource ID.
resourceManager | Resource manager to use for acquiring. |
|
protected |
Recalculate rendering properties.
Must be called when a relevant property has been reassigned.
|
static |
Texture property.
The default value is ResourceID().
|
protected |
|
protected |
|
protected |
Texture resource assigned by user.