MxDeformTexture

MxDeformTexture — Deformable texture abstract-widget

Synopsis

                    MxDeformTexture;
void                mx_deform_texture_get_resolution    (MxDeformTexture *texture,
                                                         gint *tiles_x,
                                                         gint *tiles_y);
void                mx_deform_texture_set_resolution    (MxDeformTexture *texture,
                                                         gint tiles_x,
                                                         gint tiles_y);
void                mx_deform_texture_set_textures      (MxDeformTexture *texture,
                                                         ClutterTexture *front,
                                                         ClutterTexture *back);
void                mx_deform_texture_get_textures      (MxDeformTexture *texture,
                                                         ClutterTexture **front,
                                                         ClutterTexture **back);
void                mx_deform_texture_invalidate        (MxDeformTexture *texture);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxWidget
                     +----MxDeformTexture
                           +----MxDeformWaves
                           +----MxDeformPageTurn
                           +----MxDeformBowTie

Implemented Interfaces

MxDeformTexture implements ClutterScriptable and MxStylable.

Properties

  "back"                     ClutterTexture*       : Read / Write
  "front"                    ClutterTexture*       : Read / Write
  "tiles-x"                  gint                  : Read / Write
  "tiles-y"                  gint                  : Read / Write

Description

An abstract widget that provides the interface for producing mesh deformation effects with a texture.

Details

MxDeformTexture

typedef struct _MxDeformTexture MxDeformTexture;


mx_deform_texture_get_resolution ()

void                mx_deform_texture_get_resolution    (MxDeformTexture *texture,
                                                         gint *tiles_x,
                                                         gint *tiles_y);

Retrieve the mesh resolution of the texture. See mx_deform_texture_set_resolution().

texture : A MxDeformTexture
tiles_x : (out) (allow-none): The horizontal resolution
tiles_y : (out) (allow-none): The vertical resolution

mx_deform_texture_set_resolution ()

void                mx_deform_texture_set_resolution    (MxDeformTexture *texture,
                                                         gint tiles_x,
                                                         gint tiles_y);

Sets the amount of sub-divisions used on each axis when generating the mesh, where a value of 1 for each axis will produce a single quad.

texture : A MxDeformTexture
tiles_x : The horizontal resolution
tiles_y : The vertical resolution

mx_deform_texture_set_textures ()

void                mx_deform_texture_set_textures      (MxDeformTexture *texture,
                                                         ClutterTexture *front,
                                                         ClutterTexture *back);

Set textures to use as the sources of a deformation effect. Textures must not be parented.

texture :
front : (allow-none): ClutterTexture to use for the front-face.
back : (allow-none): ClutterTexture to use for the back-face.

mx_deform_texture_get_textures ()

void                mx_deform_texture_get_textures      (MxDeformTexture *texture,
                                                         ClutterTexture **front,
                                                         ClutterTexture **back);

Retrieves the textures used by texture.

texture : A MxDeformTexture
front : (out) (transfer none) (allow-none): The front-facing texture
back : (out) (transfer none) (allow-none): The back-facing texture

mx_deform_texture_invalidate ()

void                mx_deform_texture_invalidate        (MxDeformTexture *texture);

Make texture re-calculate its vertices and redraw itself.

texture : A MxDeformTexture

Property Details

The "back" property

  "back"                     ClutterTexture*       : Read / Write

ClutterTexture to use for the back-face.


The "front" property

  "front"                    ClutterTexture*       : Read / Write

ClutterTexture to use for the front-face.


The "tiles-x" property

  "tiles-x"                  gint                  : Read / Write

Amount of horizontal tiles to split the texture into.

Allowed values: >= 1

Default value: 32


The "tiles-y" property

  "tiles-y"                  gint                  : Read / Write

Amount of vertical tiles to split the texture into.

Allowed values: >= 1

Default value: 32