![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
NbtkTextureCache; NbtkTextureCache* nbtk_texture_cache_get_default (void); ClutterTexture* nbtk_texture_cache_get_texture (NbtkTextureCache *self, const gchar *path); ClutterActor* nbtk_texture_cache_get_actor (NbtkTextureCache *self, const gchar *path); gint nbtk_texture_cache_get_size (NbtkTextureCache *self); void nbtk_texture_cache_load_cache (NbtkTextureCache *self, const char *filename);
typedef struct _NbtkTextureCache NbtkTextureCache;
The contents of this structure are private and should only be accessed through the public API.
NbtkTextureCache* nbtk_texture_cache_get_default (void);
Returns the default texture cache. This is owned by Nbtk and should not be unreferenced or freed.
Returns : |
a NbtkTextureCache |
ClutterTexture* nbtk_texture_cache_get_texture (NbtkTextureCache *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 NbtkTextureCache |
|
A path to a image file |
Returns : |
a newly created ClutterTexture |
ClutterActor* nbtk_texture_cache_get_actor (NbtkTextureCache *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 NbtkTextureCache |
|
A path to a image file |
Returns : |
a newly created ClutterTexture |
gint nbtk_texture_cache_get_size (NbtkTextureCache *self);
Returns the number of items in the texture cache
|
A NbtkTextureCache |
Returns : |
the current size of the cache |
void nbtk_texture_cache_load_cache (NbtkTextureCache *self, const char *filename);
|
|
|