Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_text_layer.h File Reference

Text layer class. More...

Functions

kzsError kzuTextLayerCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuTextLayer **out_textLayer)
 Creates a text layer. More...
 
kzsError kzuTextLayerRegisterToFactory (const struct KzuFactory *factory)
 Registers text layer to the factory. More...
 
struct KzuTextLayerkzuTextLayerFromLayer (const struct KzuLayer *layer)
 Converts a layer into a text layer. More...
 
struct KzuLayerkzuTextLayerToLayer (const struct KzuTextLayer *textLayer)
 Converts a text layer into a layer. More...
 
void kzuTextLayerInvalidateRendering (struct KzuTextLayer *textLayer)
 Forces rendering preparation on next render call. More...
 

Variables

const KzuObjectType KZU_OBJECT_TYPE_TEXT_LAYER
 Object type for text layers. More...
 

Detailed Description

Text layer class.

KzuTextLayer is used to display a small amount of text.

Text Layer Messages

KzuTextLayer does not send or receive any messages.

Text Layer Properties

KZU_PROPERTY_TYPE_FONT_MATERIAL string property specifies the resource ID of the font material (KzuMaterial).

KZU_PROPERTY_TYPE_FONT string property specifies the resource ID of the font (KzuFont).

KZU_PROPERTY_TYPE_FONT_SIZE float property specifies the font size in device independent pixels (DIP). The default value is 36.

KZU_PROPERTY_TYPE_FONT_COLOR KzcColorRGBA property specifies the font color. This property works with the default font material and with any material that has a fragment shader with a uniform named "FontColor". The default value is {1, 1, 1, 1}.

KZU_PROPERTY_TYPE_TEXT_LAYER__TEXT string property contains the text string to render. The default value is "<Text>".

KZU_PROPERTY_TYPE_TEXT__LINE_SPACING float property sets the line spacing of the text. The line spacing is specified in multiples of the normal line height of the font. The default value is 1.

KZU_PROPERTY_TYPE_TEXT__CHARACTER_SPACING float property sets the character spacing of the text. The character spacing is specified in device independent pixels (DIP). The default value is 0.

KZU_PROPERTY_TYPE_TEXT__HORIZONTAL_ALIGNMENT integer property specifies the horizontal alignment of the text. The value should be one of KzuTextHorizontalAlignment values. The default value is KZU_TEXT_HORIZONTAL_ALIGNMENT_LEFT.

KZU_PROPERTY_TYPE_TEXT__VERTICAL_ALIGNMENT integer property specifies the vertical alignment of the text. The value should be one of KzuTextVerticalAlignment values. The default value is KZU_TEXT_VERTICAL_ALIGNMENT_TOP.

KZU_PROPERTY_TYPE_TEXT__OVERFLOW string property specifies the last characters of the rendered text when the text is truncated. The default value is "...".

Copyright 2008-2019 by Rightware. All rights reserved.

Function Documentation

kzsError kzuTextLayerCreate ( const struct KzcMemoryManager memoryManager,
kzString  name,
struct KzuUIDomain uiDomain,
struct KzuTextLayer **  out_textLayer 
)

Creates a text layer.

kzsError kzuTextLayerRegisterToFactory ( const struct KzuFactory factory)

Registers text layer to the factory.

struct KzuTextLayer* kzuTextLayerFromLayer ( const struct KzuLayer layer)

Converts a layer into a text layer.

struct KzuLayer* kzuTextLayerToLayer ( const struct KzuTextLayer textLayer)

Converts a text layer into a layer.

void kzuTextLayerInvalidateRendering ( struct KzuTextLayer textLayer)

Forces rendering preparation on next render call.

Variable Documentation

const KzuObjectType KZU_OBJECT_TYPE_TEXT_LAYER

Object type for text layers.