pub struct FrameBuilder { /* private fields */ }Expand description
Turns a layout tree into the two vertex batches the GPU consumes. The builder owns the glyph atlases so a host never touches glyph internals.
Implementations§
Source§impl FrameBuilder
impl FrameBuilder
pub fn new(font: Vec<u8>) -> Self
pub fn with_default_color(self, color: Color) -> Self
Sourcepub fn layer(&mut self, font_size: f32) -> &mut GlyphAtlas
pub fn layer(&mut self, font_size: f32) -> &mut GlyphAtlas
Resolves the atlas layer for a pixel size, creating it on first use.
Sourcepub fn take_dirty_atlas(&mut self) -> bool
pub fn take_dirty_atlas(&mut self) -> bool
True when new glyphs or layers were rasterized since the last frame.
pub fn build(&mut self, tree: &LayoutTree)
pub fn frame(&self) -> &Frame
pub fn viewport(&self) -> Viewport
Auto Trait Implementations§
impl Freeze for FrameBuilder
impl RefUnwindSafe for FrameBuilder
impl Send for FrameBuilder
impl Sync for FrameBuilder
impl Unpin for FrameBuilder
impl UnsafeUnpin for FrameBuilder
impl UnwindSafe for FrameBuilder
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