NbtkSubtexture

NbtkSubtexture

Synopsis

                    NbtkSubtexture;
ClutterActor *      nbtk_subtexture_new                 (ClutterTexture *texture,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);
void                nbtk_subtexture_set_parent_texture  (NbtkSubtexture *frame,
                                                         ClutterTexture *texture);
ClutterTexture *    nbtk_subtexture_get_parent_texture  (NbtkSubtexture *frame);
void                nbtk_subtexture_set_frame           (NbtkSubtexture *frame,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);
void                nbtk_subtexture_get_frame           (NbtkSubtexture *frame,
                                                         gint *top,
                                                         gint *left,
                                                         gint *width,
                                                         gint *height);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----NbtkSubtexture

Implemented Interfaces

NbtkSubtexture implements ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

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

NbtkSubtexture

typedef struct _NbtkSubtexture NbtkSubtexture;

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


nbtk_subtexture_new ()

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

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

A NbtkSubtexture 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 NbtkSubtexture

nbtk_subtexture_set_parent_texture ()

void                nbtk_subtexture_set_parent_texture  (NbtkSubtexture *frame,
                                                         ClutterTexture *texture);

Set the ClutterTexture used by this NbtkSubtexture

frame :

A NbtkSubtexture

texture :

A ClutterTexture

nbtk_subtexture_get_parent_texture ()

ClutterTexture *    nbtk_subtexture_get_parent_texture  (NbtkSubtexture *frame);

Return the texture used by the NbtkSubtexture

frame :

A NbtkSubtexture

Returns :

a ClutterTexture owned by the NbtkSubtexture

nbtk_subtexture_set_frame ()

void                nbtk_subtexture_set_frame           (NbtkSubtexture *frame,
                                                         gint top,
                                                         gint left,
                                                         gint width,
                                                         gint height);

Set the frame of the subtexture

frame :

A NbtkSubtexture

top :

top

left :

left

width :

width

height :

height

nbtk_subtexture_get_frame ()

void                nbtk_subtexture_get_frame           (NbtkSubtexture *frame,
                                                         gint *top,
                                                         gint *left,
                                                         gint *width,
                                                         gint *height);

Retrieve the current frame.

frame :

A NbtkSubtexture

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