pub struct ImageSources { /* private fields */ }Expand description
Encoded sources keyed by the id of the decoded blob a brush paints
(peniko::Blob::id): a renderer decodes once and paints that blob wherever the image
appears, so the id names the image across every draw.
Implementations§
Source§impl ImageSources
impl ImageSources
Sourcepub fn insert(&mut self, blob: u64, source: EncodedImage)
pub fn insert(&mut self, blob: u64, source: EncodedImage)
Record that the blob blob was decoded from source.
Sourcepub fn get(&self, blob: u64) -> Option<&EncodedImage>
pub fn get(&self, blob: u64) -> Option<&EncodedImage>
The source of the blob blob, if it was recorded.
Trait Implementations§
Source§impl Debug for ImageSources
impl Debug for ImageSources
Auto Trait Implementations§
impl Freeze for ImageSources
impl RefUnwindSafe for ImageSources
impl Send for ImageSources
impl Sync for ImageSources
impl Unpin for ImageSources
impl UnsafeUnpin for ImageSources
impl UnwindSafe for ImageSources
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
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.