pub enum DrawMemory<'a> {
Scratch,
Buffer(&'a mut [u8]),
}Expand description
Working memory for drawing an outline.
A glyf outline and a VARC composite need working memory to draw; a
charstring needs none. The size an outline needs is given by its
required_memory_size.
Variants§
Scratch
Short-lived scratch memory of the size the outline needs, which may be allocated on the heap for a large glyph.
Buffer(&'a mut [u8])
Memory supplied by the caller, of at least the size the outline needs.
Implementations§
Source§impl<'a> DrawMemory<'a>
impl<'a> DrawMemory<'a>
Sourcepub(crate) fn into_buffer(self) -> Option<&'a mut [u8]>
pub(crate) fn into_buffer(self) -> Option<&'a mut [u8]>
Returns the caller’s memory, or None for scratch memory.
Trait Implementations§
Source§impl<'a> Debug for DrawMemory<'a>
impl<'a> Debug for DrawMemory<'a>
Source§impl<'a> Default for DrawMemory<'a>
impl<'a> Default for DrawMemory<'a>
Source§fn default() -> DrawMemory<'a>
fn default() -> DrawMemory<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> !UnwindSafe for DrawMemory<'a>
impl<'a> Freeze for DrawMemory<'a>
impl<'a> RefUnwindSafe for DrawMemory<'a>
impl<'a> Send for DrawMemory<'a>
impl<'a> Sync for DrawMemory<'a>
impl<'a> Unpin for DrawMemory<'a>
impl<'a> UnsafeUnpin for DrawMemory<'a>
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