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_from_file (const Glib::ustring &filename)
 Sets the Clutter::Texture image data from an image file.
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.
bool set_area_from_rgb_data (const guchar *data, bool has_alpha, int x, int y, int width, int height, int rowstride, int bpp, TextureFlags flags)
 Updates a sub-region of the pixel data in a Clutter::Texture.
void get_base_size (gint &width, gint &height) const
 Gets the size in pixels of the untransformed underlying texture pixbuf data.
TextureQuality get_filter_quality () const
 Gets the filter quality used when scaling a texture.
void set_filter_quality (TextureQuality filter_quality)
 Sets the filter quality when scaling a texture.
int get_amx_tile_waste () const
 Gets the maximum waste that will be used when creating a texture or -1 if slicing is disabled.
void set_max_tile_waste (int max_tile_waste)
 Sets the maximum number of pixels in either axis that can be wasted for an individual texture slice.
CoglHandle get_cogl_texture () const
 Return value: COGL texture handle.
void set_cogl_texture (CoglHandle handle)
 Replaces the underlying COGL texture drawn by this actor with cogl_tex.
Glib::SignalProxy2< void, gint,
gint > 
signal_size_change ()
Glib::SignalProxy0< void > signal_pixbuf_change ()
Glib::PropertyProxy< CoglHandle > property_cogl_texture ()
 The underlying COGL texture handle used to draw this actor.
Glib::PropertyProxy_ReadOnly
< CoglHandle > 
property_cogl_texture () const
 The underlying COGL texture handle used to draw this actor.
Glib::PropertyProxy_ReadOnly
< bool > 
property_disable_slicing () const
 Force the underlying texture to be singlularand not made of of smaller space saving inidivual textures.
Glib::PropertyProxy_WriteOnly
< Glib::ustring > 
property_filename ()
 The full path of the file containing the texture.
Glib::PropertyProxy
< TextureQuality
property_filter_quality ()
 Rendering quality used when drawing the texture.
Glib::PropertyProxy_ReadOnly
< TextureQuality
property_filter_quality () const
 Rendering quality used when drawing the texture.
Glib::PropertyProxy_ReadOnly< int > property_pixel_format () const
 CoglPixelFormat to use.
Glib::PropertyProxy< bool > property_repeat_x ()
 Repeat underlying pixbuf rather than scale in x direction.
Glib::PropertyProxy_ReadOnly
< bool > 
property_repeat_x () const
 Repeat underlying pixbuf rather than scale in x direction.
Glib::PropertyProxy< bool > property_repeat_y ()
 Repeat underlying pixbuf rather than scale in y direction.
Glib::PropertyProxy_ReadOnly
< bool > 
property_repeat_y () const
 Repeat underlying pixbuf rather than scale in y direction.
Glib::PropertyProxy< bool > property_sync_size ()
 Auto sync size of actor to underlying pixbuf dimensions.
Glib::PropertyProxy_ReadOnly
< bool > 
property_sync_size () const
 Auto sync size of actor to underlying pixbuf dimensions.
Glib::PropertyProxy_ReadOnly< int > property_tile_waste () const
 Max wastage dimension of a texture when using sliced textures or -1 to disable slicing.

Static Public Member Functions

static Glib::RefPtr< Texturecreate ()

Protected Member Functions

 Texture ()
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]


Member Function Documentation

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

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

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

Provides access to the underlying C GObject.

Reimplemented from Clutter::Actor.

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.

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

bool Clutter::Texture::set_from_file ( const Glib::ustring &  filename  ) 

Sets the Clutter::Texture image data from an image file.

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

Parameters:
filename The filename of the image in GLib file name encoding.
Returns:
true if the image was successfully loaded and set
Since: 0.8.

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 RGBA type colorspace.
has_alpha Set to true if image data has an 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 YUV 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_area_from_rgb_data ( const guchar *  data,
bool  has_alpha,
int  x,
int  y,
int  width,
int  height,
int  rowstride,
int  bpp,
TextureFlags  flags 
)

Updates a sub-region of the pixel data in a Clutter::Texture.

Parameters:
data Image data in RGB type colorspace.
has_alpha Set to true if image data has an alpha channel.
x X coordinate of upper left corner of region to update.
y Y coordinate of upper left corner of region to update.
width Width in pixels of region to update.
height Height in pixels of region to update.
rowstride Distance in bytes between row starts on source buffer.
bpp Bytes per pixel ( Currently only 4 supported ).
flags Clutter::TextureFlags.
Returns:
true on success, false on failure.
Since 0.6.

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.

TextureQuality Clutter::Texture::get_filter_quality (  )  const

Gets the filter quality used when scaling a texture.

Returns:
The filter quality value.
Since: 0.8.

void Clutter::Texture::set_filter_quality ( TextureQuality  filter_quality  ) 

Sets the filter quality when scaling a texture.

The quality is an enumeration currently the following values are supported: CLUTTER_TEXTURE_QUALITY_LOW which is fast but only uses nearest neighbour interpolation. CLUTTER_TEXTURE_QUALITY_MEDIUM which is computationally a bit more expensive (bilinear interpolation), and CLUTTER_TEXTURE_QUALITY_HIGH which uses extra texture memory resources to improve scaled down rendering as well (it uses mipmaps). The default value is CLUTTER_TEXTURE_QUALITY_MEDIUM.

Since: 0.8

Parameters:
filter_quality New filter quality value.

int Clutter::Texture::get_amx_tile_waste (  )  const

Gets the maximum waste that will be used when creating a texture or -1 if slicing is disabled.

Returns:
The maximum waste or -1 if the texture waste is unlimited.
Since: 0.8.

void Clutter::Texture::set_max_tile_waste ( int  max_tile_waste  ) 

Sets the maximum number of pixels in either axis that can be wasted for an individual texture slice.

If -1 is specified then the texture is forced not to be sliced and the texture creation will fail if the hardware can't create a texture large enough.

The value is only used when first creating a texture so changing it after the texture data has been set has no effect.

Since: 0.8

Parameters:
max_tile_waste Maximum amount of waste in pixels or -1.

CoglHandle Clutter::Texture::get_cogl_texture (  )  const

Return value: COGL texture handle.

Returns:
COGL texture handle.

void Clutter::Texture::set_cogl_texture ( CoglHandle  handle  ) 

Replaces the underlying COGL texture drawn by this actor with cogl_tex.

A reference to the texture is taken so if the handle is no longer needed it should be deref'd with cogl_texture_unref.

Since: 0.8

Parameters:
cogl_tex A CoglHandle for a texture.

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

Prototype:
void on_my_size_change(gint width, gint height)

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

Prototype:
void on_my_pixbuf_change()

Glib::PropertyProxy<CoglHandle> Clutter::Texture::property_cogl_texture (  ) 

The underlying COGL texture handle used to draw this actor.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<CoglHandle> Clutter::Texture::property_cogl_texture (  )  const

The underlying COGL texture handle used to draw this actor.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Clutter::Texture::property_disable_slicing (  )  const

Force the underlying texture to be singlularand not made of of smaller space saving inidivual textures.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<Glib::ustring> Clutter::Texture::property_filename (  ) 

The full path of the file containing the texture.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<TextureQuality> Clutter::Texture::property_filter_quality (  ) 

Rendering quality used when drawing the texture.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<TextureQuality> Clutter::Texture::property_filter_quality (  )  const

Rendering quality used when drawing the texture.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Clutter::Texture::property_pixel_format (  )  const

CoglPixelFormat to use.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Clutter::Texture::property_repeat_x (  ) 

Repeat underlying pixbuf rather than scale in x direction.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Clutter::Texture::property_repeat_x (  )  const

Repeat underlying pixbuf rather than scale in x direction.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Clutter::Texture::property_repeat_y (  ) 

Repeat underlying pixbuf rather than scale in y direction.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Clutter::Texture::property_repeat_y (  )  const

Repeat underlying pixbuf rather than scale in y direction.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Clutter::Texture::property_sync_size (  ) 

Auto sync size of actor to underlying pixbuf dimensions.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Clutter::Texture::property_sync_size (  )  const

Auto sync size of actor to underlying pixbuf dimensions.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Clutter::Texture::property_tile_waste (  )  const

Max wastage dimension of a texture when using sliced textures or -1 to disable slicing.

Bigger values use less textures

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

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

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


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 Mon Sep 15 05:42:13 2008 for cluttermm by  doxygen 1.5.6