ClutterTexture

ClutterTexture — An actor for displaying and manipulating images.

Synopsis




typedef     ClutterTexturePrivate;
            ClutterTexture;
ClutterActor* clutter_texture_new_from_pixbuf
                                            (GdkPixbuf *pixbuf);
ClutterActor* clutter_texture_new           (void);
void        clutter_texture_set_pixbuf      (ClutterTexture *texture,
                                             GdkPixbuf *pixbuf);
GdkPixbuf*  clutter_texture_get_pixbuf      (ClutterTexture *texture);
void        clutter_texture_get_base_size   (ClutterTexture *texture,
                                             gint *width,
                                             gint *height);
void        clutter_texture_bind_tile       (ClutterTexture *texture,
                                             gint index);
void        clutter_texture_get_n_tiles     (ClutterTexture *texture,
                                             gint *n_x_tiles,
                                             gint *n_y_tiles);
void        clutter_texture_get_x_tile_detail
                                            (ClutterTexture *texture,
                                             gint x_index,
                                             gint *pos,
                                             gint *size,
                                             gint *waste);
void        clutter_texture_get_y_tile_detail
                                            (ClutterTexture *texture,
                                             gint y_index,
                                             gint *pos,
                                             gint *size,
                                             gint *waste);
gboolean    clutter_texture_has_generated_tiles
                                            (ClutterTexture *texture);
gboolean    clutter_texture_is_tiled        (ClutterTexture *texture);

Object Hierarchy


  GObject
   +----ClutterActor
         +----ClutterTexture
               +----ClutterVideoTexture
               +----ClutterLabel

Properties


  "filter-quality"       gint                  : Read / Write / Construct
  "pixbuf"               gpointer              : Read / Write
  "pixel-format"         gint                  : Read / Write / Construct Only
  "pixel-type"           gint                  : Read / Write / Construct Only
  "repeat-x"             gboolean              : Read / Write / Construct
  "repeat-y"             gboolean              : Read / Write / Construct
  "sync-size"            gboolean              : Read / Write / Construct
  "tile-waste"           gint                  : Read / Write / Construct Only
  "tiled"                gboolean              : Read / Write / Construct Only

Signals


"pixbuf-change"
            void        user_function      (ClutterTexture *cluttertexture,
                                            gpointer        user_data)           : Run last
"size-change"
            void        user_function      (ClutterTexture *cluttertexture,
                                            gint            arg1,
                                            gint            arg2,
                                            gpointer        user_data)           : Run last

Description

ClutterTexture is a base class for displaying and manipulating pixel buffer type data.

Details

ClutterTexturePrivate

typedef struct ClutterTexturePrivate ClutterTexturePrivate ;


ClutterTexture

typedef struct _ClutterTexture ClutterTexture;


clutter_texture_new_from_pixbuf ()

ClutterActor* clutter_texture_new_from_pixbuf
                                            (GdkPixbuf *pixbuf);

Creates a new ClutterTexture object.

pixbuf : A GdkPixbuf
Returns : A newly created ClutterTexture object.

clutter_texture_new ()

ClutterActor* clutter_texture_new           (void);

Creates a new empty ClutterTexture object.

Returns : A newly created ClutterTexture object.

clutter_texture_set_pixbuf ()

void        clutter_texture_set_pixbuf      (ClutterTexture *texture,
                                             GdkPixbuf *pixbuf);

Sets the underlying GdkPixbuf for the ClutterTexture

texture :
pixbuf : A GdkPixbuf

clutter_texture_get_pixbuf ()

GdkPixbuf*  clutter_texture_get_pixbuf      (ClutterTexture *texture);

Gets the underlying GdkPixbuf for the ClutterTexture

texture :
Returns : The underlying GdkPixbuf

clutter_texture_get_base_size ()

void        clutter_texture_get_base_size   (ClutterTexture *texture,
                                             gint *width,
                                             gint *height);

Gets the size in pixels of the untransformed underlying texture pixbuf data.

texture : A ClutterTexture
width : Pointer to gint to be populated with width value if non NULL.
height : Pointer to gint to be populated with height value if non NULL.

clutter_texture_bind_tile ()

void        clutter_texture_bind_tile       (ClutterTexture *texture,
                                             gint index);

Proxys a call to glBindTexture a to bind an internal 'tile'.

This function is only useful for sub class implementations and never should be called by an application.

texture :
index : Tile index to bind

clutter_texture_get_n_tiles ()

void        clutter_texture_get_n_tiles     (ClutterTexture *texture,
                                             gint *n_x_tiles,
                                             gint *n_y_tiles);

Retreives internal tile dimentioning.

This function is only useful for sub class implementations and never should be called by an application.

texture :
n_x_tiles : Location to store number of tiles in horizonally axis
n_y_tiles : Location to store number of tiles in vertical axis

clutter_texture_get_x_tile_detail ()

void        clutter_texture_get_x_tile_detail
                                            (ClutterTexture *texture,
                                             gint x_index,
                                             gint *pos,
                                             gint *size,
                                             gint *waste);

Retreives details of a tile on x axis.

This function is only useful for sub class implementations and never should be called by an application.

texture :
x_index : X index of tile to query
pos : Location to store tiles X position
size : Location to store tiles horizontal size in pixels
waste : Location to store tiles horizontal wastage in pixels

clutter_texture_get_y_tile_detail ()

void        clutter_texture_get_y_tile_detail
                                            (ClutterTexture *texture,
                                             gint y_index,
                                             gint *pos,
                                             gint *size,
                                             gint *waste);

Retreives details of a tile on y axis.

This function is only useful for sub class implementations and never should be called by an application.

texture :
y_index :
pos : Location to store tiles Y position
size : Location to store tiles vertical size in pixels
waste : Location to store tiles vertical wastage in pixels

clutter_texture_has_generated_tiles ()

gboolean    clutter_texture_has_generated_tiles
                                            (ClutterTexture *texture);

Checks if ClutterTexture is tiled.

This function is only useful for sub class implementations and never should be called by an application.

texture :
Returns : TRUE if texture is tiled

clutter_texture_is_tiled ()

gboolean    clutter_texture_is_tiled        (ClutterTexture *texture);

texture :
Returns :

Property Details

The "filter-quality" property

  "filter-quality"       gint                  : Read / Write / Construct

Values 0 and 1 current only supported, with 0being lower quality but fast, 1 being better quality but slower. ( Currently just maps to GL_NEAREST / GL_LINEAR ).

Allowed values: >= 0

Default value: 1


The "pixbuf" property

  "pixbuf"               gpointer              : Read / Write

Pixbuf source for Texture.


The "pixel-format" property

  "pixel-format"         gint                  : Read / Write / Construct Only

GL texture pixel format used.

Allowed values: >= 0

Default value: 6408


The "pixel-type" property

  "pixel-type"           gint                  : Read / Write / Construct Only

GL texture pixel type used.

Allowed values: >= 0

Default value: 5121


The "repeat-x" property

  "repeat-x"             gboolean              : Read / Write / Construct

Reapeat underlying pixbuf rather than scalein x direction. Currently UNWORKING.

Default value: FALSE


The "repeat-y" property

  "repeat-y"             gboolean              : Read / Write / Construct

Reapeat underlying pixbuf rather than scalein y direction. Currently UNWORKING.

Default value: FALSE


The "sync-size" property

  "sync-size"            gboolean              : Read / Write / Construct

Auto sync size of actor to underlying pixbufdimentions.

Default value: TRUE


The "tile-waste" property

  "tile-waste"           gint                  : Read / Write / Construct Only

Max wastage dimention of a texture when using tiled textures. Bigger values use less textures, smaller values less texture memory. .

Allowed values: >= 0

Default value: 64


The "tiled" property

  "tiled"                gboolean              : Read / Write / Construct Only

Enables the use of tiled GL textures to more efficiently use available texture memory.

Default value: TRUE

Signal Details

The "pixbuf-change" signal

void        user_function                  (ClutterTexture *cluttertexture,
                                            gpointer        user_data)           : Run last

cluttertexture : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "size-change" signal

void        user_function                  (ClutterTexture *cluttertexture,
                                            gint            arg1,
                                            gint            arg2,
                                            gpointer        user_data)           : Run last

cluttertexture : the object which received the signal.
arg1 :
arg2 :
user_data : user data set when the signal handler was connected.