MxSubtexture

MxSubtexture

Synopsis

                    MxSubtexture;
ClutterActor *      mx_subtexture_new                   (ClutterTexture *texture,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);
void                mx_subtexture_set_parent_texture    (MxSubtexture *frame,
                                                         ClutterTexture *texture);
ClutterTexture *    mx_subtexture_get_parent_texture    (MxSubtexture *frame);
void                mx_subtexture_set_frame             (MxSubtexture *frame,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);
void                mx_subtexture_get_frame             (MxSubtexture *frame,
                                                         gint *top,
                                                         gint *left,
                                                         gint *width,
                                                         gint *height);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxSubtexture

Implemented Interfaces

MxSubtexture implements ClutterScriptable.

Properties

  "height"                   gint                  : Read / Write
  "left"                     gint                  : Read / Write
  "parent-texture"           ClutterTexture*       : Read / Write / Construct
  "top"                      gint                  : Read / Write
  "width"                    gint                  : Read / Write

Description

Details

MxSubtexture

typedef struct _MxSubtexture MxSubtexture;

The contents of this structure are private and should only be accessed through the public API.


mx_subtexture_new ()

ClutterActor *      mx_subtexture_new                   (ClutterTexture *texture,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);

A MxSubtexture is a specialized texture that efficiently clones an area of the given texture while keeping preserving portions of the same texture.

A MxSubtexture can be used to make a rectangular texture fit a given size without stretching its borders.

texture :

a ClutterTexture or NULL

top :

top

left :

left

width :

width

height :

height

Returns :

the newly created MxSubtexture

mx_subtexture_set_parent_texture ()

void                mx_subtexture_set_parent_texture    (MxSubtexture *frame,
                                                         ClutterTexture *texture);

Set the ClutterTexture used by this MxSubtexture

frame :

A MxSubtexture

texture :

A ClutterTexture

mx_subtexture_get_parent_texture ()

ClutterTexture *    mx_subtexture_get_parent_texture    (MxSubtexture *frame);

Return the texture used by the MxSubtexture

frame :

A MxSubtexture

Returns :

a ClutterTexture owned by the MxSubtexture

mx_subtexture_set_frame ()

void                mx_subtexture_set_frame             (MxSubtexture *frame,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);

Set the frame of the subtexture

frame :

A MxSubtexture

top :

top

left :

left

width :

width

height :

height

mx_subtexture_get_frame ()

void                mx_subtexture_get_frame             (MxSubtexture *frame,
                                                         gint *top,
                                                         gint *left,
                                                         gint *width,
                                                         gint *height);

Retrieve the current frame.

frame :

A MxSubtexture

top :

top

left :

left

width :

width

height :

height

Property Details

The "height" property

  "height"                   gint                  : Read / Write

Height.

Allowed values: >= 0

Default value: 0


The "left" property

  "left"                     gint                  : Read / Write

Left offset.

Allowed values: >= 0

Default value: 0


The "parent-texture" property

  "parent-texture"           ClutterTexture*       : Read / Write / Construct

The parent ClutterTexture.


The "top" property

  "top"                      gint                  : Read / Write

Top offset.

Allowed values: >= 0

Default value: 0


The "width" property

  "width"                    gint                  : Read / Write

Width.

Allowed values: >= 0

Default value: 0