Struct cosmic_text::SwashCache
source · [−]pub struct SwashCache {
pub image_cache: HashMap<CacheKey, Option<SwashImage>>,
/* private fields */
}Fields
image_cache: HashMap<CacheKey, Option<SwashImage>>Implementations
sourceimpl SwashCache
impl SwashCache
sourcepub fn get_image_uncached(
&mut self,
matches: &FontMatches<'_>,
cache_key: CacheKey
) -> Option<SwashImage>
pub fn get_image_uncached(
&mut self,
matches: &FontMatches<'_>,
cache_key: CacheKey
) -> Option<SwashImage>
Create a swash Image from a cache key, without caching results
sourcepub fn get_image(
&mut self,
matches: &FontMatches<'_>,
cache_key: CacheKey
) -> &Option<SwashImage>
pub fn get_image(
&mut self,
matches: &FontMatches<'_>,
cache_key: CacheKey
) -> &Option<SwashImage>
Create a swash Image from a cache key, caching results
sourcepub fn with_pixels<F: FnMut(i32, i32, u32)>(
&mut self,
matches: &FontMatches<'_>,
cache_key: CacheKey,
base: u32,
f: F
)
pub fn with_pixels<F: FnMut(i32, i32, u32)>(
&mut self,
matches: &FontMatches<'_>,
cache_key: CacheKey,
base: u32,
f: F
)
Enumerate pixels in an Image, use with_image for better performance
Auto Trait Implementations
impl RefUnwindSafe for SwashCache
impl Send for SwashCache
impl Sync for SwashCache
impl Unpin for SwashCache
impl UnwindSafe for SwashCache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more