Struct ux::TextureCache [−][src]
pub struct TextureCache { /* fields omitted */ }
Implementations
impl TextureCache
[src]
impl TextureCache
[src]pub fn get_default() -> Option<TextureCache>
[src]
get_default:
Returns the default texture cache. This is owned by Mx and should not be unreferenced or freed.
Returns: (transfer none): a TextureCache
Trait Implementations
impl AsRef<TextureCache> for TextureCache
[src]
impl AsRef<TextureCache> for TextureCache
[src]pub fn as_ref(&self) -> &TextureCache
[src]
impl Clone for TextureCache
[src]
impl Clone for TextureCache
[src]pub fn clone(&self) -> TextureCache
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Display for TextureCache
[src]
impl Display for TextureCache
[src]impl Is<TextureCache> for TextureCache
[src]
impl Is<TextureCache> for TextureCache
[src]impl Object for TextureCache
[src]
impl Object for TextureCache
[src]Auto Trait Implementations
impl !RefUnwindSafe for TextureCache
impl !RefUnwindSafe for TextureCache
impl Send for TextureCache
impl Send for TextureCache
impl !Sync for TextureCache
impl !Sync for TextureCache
impl Unpin for TextureCache
impl Unpin for TextureCache
impl UnwindSafe for TextureCache
impl UnwindSafe for TextureCache
Blanket Implementations
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
[src]
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
[src]pub fn into_color(self) -> To
[src]
impl<O> TextureCacheExt for O where
O: Is<TextureCache>,
[src]
impl<O> TextureCacheExt for O where
O: Is<TextureCache>,
[src]pub fn contains(&self, uri: &str) -> bool
[src]
contains: @self: A #TextureCache @uri: A URI or path to an image file
Checks whether the given URI/path is contained within the texture cache.
Returns: %true if the image exists, %false otherwise
pub fn get_cogl_texture(&self, uri: &str) -> Option<Handle>
[src]
contains_meta: @self: A #TextureCache @uri: A URI or path to an image file @ident: A unique identifier
Checks whether there are any textures associated with the given URI by the given identifier.
Returns: %true if the data exists, %false otherwise
get_cogl_texture: @self: A #TextureCache @uri: A URI or path to an image file
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 URI/path will return the #CoglHandle of the previously loaded image with an increased reference count.
Returns: (transfer none): a #CoglHandle to the cached texture
pub fn get_size(&self) -> usize
[src]
get_meta_cogl_texture: @self: A #TextureCache @uri: A URI or path to an image file @ident: A unique identifier
Retrieves the #CoglHandle of the previously added image associated with the given unique identifier.
See insert_meta()
Returns: (transfer full): A #CoglHandle to a texture, with an added reference. %None if no image was found.
get_size: @self: A #TextureCache
Returns the number of items in the texture cache
Returns: the current size of the cache
pub fn insert(&self, uri: &str, texture: Handle)
[src]
insert: @self: A #TextureCache @uri: A URI or local file path @texture: A #CoglHandle to a texture
Inserts a texture into the texture cache. This can be useful if you want to cache a texture from a custom or unhandled URI type, or you want to override a particular texture.
If the image is already in the cache, this texture will replace it. A reference will be taken on the given texture.
pub fn load_cache(&self, filename: &str)
[src]
insert_meta: @self: A #TextureCache @uri: A URI or local file path @ident: A unique identifier @texture: A #CoglHandle to a texture @destroy_func: An optional destruction function for @ident
Inserts a texture that’s associated with a URI into the cache. If the metadata already exists for this URI, it will be replaced.
This is useful if you have a widely used modification of an image, for example, an image with a border composited around it.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,