Struct floem_cosmic_text::SwashCache
source · pub struct SwashCache {
pub image_cache: HashMap<CacheKey, Option<SwashImage>>,
pub outline_command_cache: HashMap<CacheKey, Option<Vec<Command>>>,
/* private fields */
}
Expand description
Cache for rasterizing with the swash scaler
Fields§
§image_cache: HashMap<CacheKey, Option<SwashImage>>
§outline_command_cache: HashMap<CacheKey, Option<Vec<Command>>>
Implementations§
source§impl SwashCache
impl SwashCache
sourcepub fn get_image_uncached(&mut self, cache_key: CacheKey) -> Option<SwashImage>
pub fn get_image_uncached(&mut self, cache_key: CacheKey) -> Option<SwashImage>
Create a swash Image from a cache key, without caching results
sourcepub fn get_image(&mut self, cache_key: CacheKey) -> &Option<SwashImage>
pub fn get_image(&mut self, cache_key: CacheKey) -> &Option<SwashImage>
Create a swash Image from a cache key, caching results
pub fn get_outline_commands( &mut self, font_system: &mut FontSystem, cache_key: CacheKey ) -> Option<&[Command]>
Auto Trait Implementations§
impl Freeze for SwashCache
impl RefUnwindSafe for SwashCache
impl Send for SwashCache
impl Sync for SwashCache
impl Unpin for SwashCache
impl UnwindSafe for SwashCache
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more