![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
MxTextureCache; MxTextureCache * mx_texture_cache_get_default (void
); ClutterTexture * mx_texture_cache_get_texture (MxTextureCache *self
,const gchar *path
); ClutterActor * mx_texture_cache_get_actor (MxTextureCache *self
,const gchar *path
); CoglHandle mx_texture_cache_get_cogl_texture (MxTextureCache *self
,const gchar *path
); gint mx_texture_cache_get_size (MxTextureCache *self
); void mx_texture_cache_load_cache (MxTextureCache *self
,const char *filename
);
typedef struct _MxTextureCache MxTextureCache;
The contents of this structure are private and should only be accessed through the public API.
MxTextureCache * mx_texture_cache_get_default (void
);
Returns the default texture cache. This is owned by Mx and should not be unreferenced or freed.
Returns : |
a MxTextureCache. [transfer none] |
ClutterTexture * mx_texture_cache_get_texture (MxTextureCache *self
,const gchar *path
);
Create a new ClutterTexture with the specified image. Adds the image to the cache if the image had not been previously loaded. Subsequent calls with the same image path will return a new ClutterTexture with the previously loaded image.
|
A MxTextureCache |
|
A path to a image file |
Returns : |
a newly created ClutterTexture. [transfer none] |
ClutterActor * mx_texture_cache_get_actor (MxTextureCache *self
,const gchar *path
);
Create a new ClutterSubTexture with the specified image. Adds the image to the cache if the image had not been previously loaded. Subsequent calls with the same image path will return a new ClutterTexture with the previously loaded image.
Use this function if all you need is an actor for drawing.
|
A MxTextureCache |
|
A path to a image file |
Returns : |
a newly created ClutterTexture. [transfer none] |
CoglHandle mx_texture_cache_get_cogl_texture (MxTextureCache *self
,const gchar *path
);
Create a CoglHandle representing a texture of the specified image. Adds the image to the cache if the image had not been previously loaded. Subsequent calls with the same image path will return the CoglHandle of the previously loaded image with an increased reference count.
|
A MxTextureCache |
|
A path to an image file |
Returns : |
a CoglHandle to the cached texture |
gint mx_texture_cache_get_size (MxTextureCache *self
);
Returns the number of items in the texture cache
|
A MxTextureCache |
Returns : |
the current size of the cache |
void mx_texture_cache_load_cache (MxTextureCache *self
,const char *filename
);
|
|
|