Clutter::Texture Class Reference

#include <texture.h>

Inheritance diagram for Clutter::Texture:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Texture ()
ClutterTexture * gobj ()
 Provides access to the underlying C GObject.
const ClutterTexture * gobj () const
 Provides access to the underlying C GObject.
ClutterTexture * gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool set_pixbuf (const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
 Sets a Clutter::Texture image data from a Gdk::Pixbuf.
Glib::RefPtr< Gdk::Pixbuf > get_pixbuf () const
 Gets a Gdk::Pixbuf representation of the Clutter::Texture data.
void get_base_size (gint &width, gint &height) const
 Gets the size in pixels of the untransformed underlying texture pixbuf data.
bool set_from_rgb_data (const guchar *data, bool has_alpha, int width, int height, int rowstride, int bpp, TextureFlags flags)
 Sets Clutter::Texture image data.
bool set_from_yuv_data (const guchar *data, int width, int height, TextureFlags flags)
 Sets a Clutter::Texture from YUV image data.
Glib::SignalProxy2< void, gint,
gint > 
signal_size_change ()
Glib::SignalProxy0< void > signal_pixbuf_change ()

Static Public Member Functions

static Glib::RefPtr< Texturecreate ()
static Glib::RefPtr< Texturecreate (const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)

Protected Member Functions

 Texture ()
 Texture (const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
bool is_tiled () const
 Checks if Clutter::Texture is tiled.
void get_n_tiles (gint &n_x_tiles, gint &n_y_tiles)
 Retreives internal tile dimentioning.
void get_y_tile_detail (int y_index, int &pos, int &size, int &waste) const
 Retreives details of a tile on y axis.
void get_x_tile_detail (int x_index, int &pos, int &size, int &waste) const
 Retreives details of a tile on x axis.
bool has_generated_tiles () const
 Checks if Clutter::Texture has generated underlying GL texture tiles.
void bind_tile (int index)
 Proxys a call to glBindTexture a to bind an internal 'tile'.
virtual void on_size_change (gint width, gint height)
virtual void on_pixbuf_change ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Clutter::Texturewrap (ClutterTexture *object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

virtual Clutter::Texture::~Texture (  )  [virtual]

Clutter::Texture::Texture (  )  [protected]

Clutter::Texture::Texture ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf  )  [explicit, protected]


Member Function Documentation

void Clutter::Texture::bind_tile ( int  index  )  [protected]

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.

Parameters:
index Tile index to bind.

static Glib::RefPtr<Texture> Clutter::Texture::create ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf  )  [static]

static Glib::RefPtr<Texture> Clutter::Texture::create (  )  [static]

void Clutter::Texture::get_base_size ( gint &  width,
gint &  height 
) const

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

Parameters:
width Pointer to int to be populated with width value if non 0.
height Pointer to int to be populated with height value if non 0.

void Clutter::Texture::get_n_tiles ( gint &  n_x_tiles,
gint &  n_y_tiles 
) [protected]

Retreives internal tile dimentioning.

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

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

Glib::RefPtr<Gdk::Pixbuf> Clutter::Texture::get_pixbuf (  )  const

Gets a Gdk::Pixbuf representation of the Clutter::Texture data.

The created Gdk::Pixbuf is not owned by the texture but the caller.

Returns:
A Gdk::Pixbuf.

void Clutter::Texture::get_x_tile_detail ( int  x_index,
int &  pos,
int &  size,
int &  waste 
) const [protected]

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.

Parameters:
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.

void Clutter::Texture::get_y_tile_detail ( int  y_index,
int &  pos,
int &  size,
int &  waste 
) const [protected]

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.

Parameters:
y_index Y index of tile to query.
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.

const ClutterTexture* Clutter::Texture::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

Reimplemented in Clutter::Cairo::CairoTexture.

ClutterTexture* Clutter::Texture::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

Reimplemented in Clutter::Cairo::CairoTexture.

ClutterTexture* Clutter::Texture::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Clutter::Actor.

Reimplemented in Clutter::Cairo::CairoTexture.

bool Clutter::Texture::has_generated_tiles (  )  const [protected]

Checks if Clutter::Texture has generated underlying GL texture tiles.

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

Returns:
true if texture has pregenerated GL tiles.

bool Clutter::Texture::is_tiled (  )  const [protected]

Checks if Clutter::Texture is tiled.

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

Returns:
true if texture is tiled.

virtual void Clutter::Texture::on_pixbuf_change (  )  [protected, virtual]

virtual void Clutter::Texture::on_size_change ( gint  width,
gint  height 
) [protected, virtual]

bool Clutter::Texture::set_from_rgb_data ( const guchar *  data,
bool  has_alpha,
int  width,
int  height,
int  rowstride,
int  bpp,
TextureFlags  flags 
)

Sets Clutter::Texture image data.

Note:
This function is likely to change in future versions.
Parameters:
data Image data in RGB type colorspace.
has_alpha Set to true if image data has a alpha channel.
width Width in pixels of image data.
height Height in pixels of image data.
rowstride Distance in bytes between row starts.
bpp Bytes per pixel ( Currently only 4 supported ).
flags Clutter::TextureFlags.
Returns:
true on success, false on failure.
Since: 0.4.

bool Clutter::Texture::set_from_yuv_data ( const guchar *  data,
int  width,
int  height,
TextureFlags  flags 
)

Sets a Clutter::Texture from YUV image data.

If an error occurred, false is returned and error is set.

This function is likely to change in future versions.

Parameters:
data Image data in RGB type colorspace.
width Width in pixels of image data.
height Height in pixels of image data.
flags Clutter::TextureFlags.
Returns:
true if the texture was successfully updated
Since 0.4.

bool Clutter::Texture::set_pixbuf ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf  ) 

Sets a Clutter::Texture image data from a Gdk::Pixbuf.

In case of failure, false is returned and error is set.

Parameters:
pixbuf A Gdk::Pixbuf.
Returns:
true if the pixbuf was successfully set
Since: 0.4.

Glib::SignalProxy0< void > Clutter::Texture::signal_pixbuf_change (  ) 

Prototype:
void on_my_pixbuf_change()

Glib::SignalProxy2< void,gint,gint > Clutter::Texture::signal_size_change (  ) 

Prototype:
void on_my_size_change(gint width, gint height)


Friends And Related Function Documentation

Glib::RefPtr< Clutter::Texture > wrap ( ClutterTexture *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:

Generated on Sun Feb 15 18:55:42 2009 for cluttermm by  doxygen 1.5.7.1