MxDeformTexture

MxDeformTexture — Deformable texture abstract-widget

Functions

Properties

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

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxDeformTexture
                    ├── MxDeformBowTie
                    ├── MxDeformPageTurn
                    ╰── MxDeformWaves

Implemented Interfaces

MxDeformTexture implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and MxStylable.

Description

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

Functions

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().

Parameters

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.

Parameters

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.

Parameters

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 .

Parameters

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.

Parameters

texture

A MxDeformTexture

 

Types and Values

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);
};

Property Details

The “back” property

  “back”                     ClutterTexture *

ClutterTexture to use for the back-face.

Flags: Read / Write


The “front” property

  “front”                    ClutterTexture *

ClutterTexture to use for the front-face.

Flags: Read / Write


The “tiles-x” property

  “tiles-x”                  gint

Amount of horizontal tiles to split the texture into.

Flags: Read / Write

Allowed values: >= 1

Default value: 32


The “tiles-y” property

  “tiles-y”                  gint

Amount of vertical tiles to split the texture into.

Flags: Read / Write

Allowed values: >= 1

Default value: 32