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

Nine-patch layer class. More...

Functions

kzsError kzuNinePatchLayerCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuNinePatchLayer **out_9PatchLayer)
 Creates a 9-patch layer. More...
 
kzsError kzuNinePatchLayerRegisterToFactory (const struct KzuFactory *factory)
 Registers 9-patch layer to the factory. More...
 
struct KzuNinePatchLayerkzuNinePatchLayerFromLayer (const struct KzuLayer *layer)
 Converts a layer into a 9-patch layer. More...
 
struct KzuLayerkzuNinePatchLayerToLayer (const struct KzuNinePatchLayer *buttonLayer)
 Converts a 9-patch layer into a layer. More...
 

Variables

const KzuObjectType KZU_OBJECT_TYPE_NINE_PATCH_LAYER
 Object type for button layers. More...
 

Detailed Description

Nine-patch layer class.

A Nine-patch layer is a 3x3 grid of image layers. The center image is framed by the other eight images. The textures in the four corners of the frame determine the thickness of the frame textures on the sides. The center image and the frame are scaled according to the KZU_PROPERTY_TYPE_LAYOUT_WIDTH and KZU_PROPERTY_TYPE_LAYOUT_HEIGHT properties.

Nine-Patch Layer Messages

KzuNinePatchLayer does not send or receive any messages.

Nine-Patch Layer Properties

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_TOP_LEFT resource ID property specifies the top-left texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_TOP resource ID property specifies the top (center) texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_TOP_RIGHT resource ID property specifies the top-right texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_LEFT resource ID property specifies the left texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_CENTER resource ID property specifies the center texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_RIGHT resource ID property specifies the right texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_BOTTOM_LEFT resource ID property specifies the bottom-left texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_BOTTOM resource ID property specifies the bottom (center) texture.

KZU_PROPERTY_TYPE_NINE_PATCH_LAYER_TEXTURE_BOTTOM_RIGHT resource ID property specifies the bottom-right texture.

KZU_PROPERTY_TYPE_LAYOUT_WIDTH float property specifies the width of the KzuNinePatchLayer.

KZU_PROPERTY_TYPE_LAYOUT_HEIGHT float property specifies the height of the KzuNinePatchLayer.

Copyright 2013-2019 by Rightware. All rights reserved.

Function Documentation

kzsError kzuNinePatchLayerCreate ( const struct KzcMemoryManager memoryManager,
kzString  name,
struct KzuUIDomain uiDomain,
struct KzuNinePatchLayer **  out_9PatchLayer 
)

Creates a 9-patch layer.

kzsError kzuNinePatchLayerRegisterToFactory ( const struct KzuFactory factory)

Registers 9-patch layer to the factory.

struct KzuNinePatchLayer* kzuNinePatchLayerFromLayer ( const struct KzuLayer layer)

Converts a layer into a 9-patch layer.

struct KzuLayer* kzuNinePatchLayerToLayer ( const struct KzuNinePatchLayer buttonLayer)

Converts a 9-patch layer into a layer.

Variable Documentation

const KzuObjectType KZU_OBJECT_TYPE_NINE_PATCH_LAYER

Object type for button layers.