## MxDeformTexture MxDeformTexture — Deformable texture abstract-widget |

## Synopsis

    struct              MxDeformTexture;
    struct              MxDeformTextureClass;
    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
                               +----MxDeformBowTie
                               +----MxDeformPageTurn
                               +----MxDeformWaves

## Implemented Interfaces

MxDeformTexture implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface 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

### struct MxDeformTexture

    struct MxDeformTexture;

The contents of this structure is private and should only be accessed using the provided API.

### struct MxDeformTextureClass

    struct MxDeformTextureClass {
      MxWidgetClass parent_class;

      /* vfuncs */
      void (*deform) (MxDeformTexture   *texture,
                      CoglTextureVertex *vertex,
                      gfloat             width,
                      gfloat             height);

      /* padding for future expansion */
      void (*_padding_0) (void);
      void (*_padding_1) (void);
      void (*_padding_2) (void);
      void (*_padding_3) (void);
      void (*_padding_4) (void);
    };

### 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` : | The horizontal resolution. [out][allow-none]
`tiles_y` : | The vertical resolution. [out][allow-none]

### 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` : | an MxDeformTexture
`front` : | ClutterTexture to use for the front-face. [allow-none]
`back` : | ClutterTexture to use for the back-face. [allow-none]

### 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` : | The front-facing texture. [out][transfer none][allow-none]
`back` : | The back-facing texture. [out][transfer none][allow-none]

### 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