#include <texture.h>
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< Texture > | create () |
static Glib::RefPtr< Texture > | create (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::Texture > | wrap (ClutterTexture *object, bool take_copy=false) |
A Glib::wrap() method for this object. |
virtual Clutter::Texture::~Texture | ( | ) | [virtual] |
Clutter::Texture::Texture | ( | ) | [protected] |
Clutter::Texture::Texture | ( | const Glib::RefPtr< Gdk::Pixbuf > & | pixbuf | ) | [explicit, protected] |
ClutterTexture* Clutter::Texture::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Clutter::Actor.
Reimplemented in Clutter::Cairo::CairoTexture.
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_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.
static Glib::RefPtr<Texture> Clutter::Texture::create | ( | ) | [static] |
static Glib::RefPtr<Texture> Clutter::Texture::create | ( | const Glib::RefPtr< Gdk::Pixbuf > & | pixbuf | ) | [static] |
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.
pixbuf | A Gdk::Pixbuf. |
true
if the pixbuf was successfully setGlib::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.
void Clutter::Texture::get_base_size | ( | gint & | width, | |
gint & | height | |||
) | const |
Gets the size in pixels of the untransformed underlying texture pixbuf data.
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 . |
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.
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. |
true
on success, false
on failure.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.
data | Image data in RGB type colorspace. | |
width | Width in pixels of image data. | |
height | Height in pixels of image data. | |
flags | Clutter::TextureFlags. |
true
if the texture was successfully updatedGlib::SignalProxy2< void,gint,gint > Clutter::Texture::signal_size_change | ( | ) |
void on_my_size_change(gint width, gint height)
Glib::SignalProxy0< void > Clutter::Texture::signal_pixbuf_change | ( | ) |
void on_my_pixbuf_change()
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.
true
if texture is tiled. 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.
n_x_tiles | Location to store number of tiles in horizonally axis. | |
n_y_tiles | Location to store number of tiles in vertical axis. |
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.
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. |
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.
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. |
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.
true
if texture has pregenerated GL tiles. 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.
index | Tile index to bind. |
virtual void Clutter::Texture::on_size_change | ( | gint | width, | |
gint | height | |||
) | [protected, virtual] |
virtual void Clutter::Texture::on_pixbuf_change | ( | ) | [protected, virtual] |
Glib::RefPtr< Clutter::Texture > wrap | ( | ClutterTexture * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |