pub struct AtlasSet { /* private fields */ }Expand description
One atlas layer per distinct (pixel size, monospace) pair, uploaded into a single texture array so a frame still needs only one text bind and one draw.
Implementations§
Source§impl AtlasSet
impl AtlasSet
pub fn new() -> Self
Sourcepub fn layer(
&mut self,
size: f32,
monospace: bool,
font: &[u8],
) -> Result<usize>
pub fn layer( &mut self, size: f32, monospace: bool, font: &[u8], ) -> Result<usize>
Returns the layer index for a style, rasterizing a new layer on demand.
pub fn get(&self, index: usize) -> &GlyphAtlas
pub fn get_mut(&mut self, index: usize) -> &mut GlyphAtlas
pub fn layers(&self) -> usize
pub fn take_dirty(&mut self) -> bool
pub fn atlases(&self) -> &[GlyphAtlas]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AtlasSet
impl RefUnwindSafe for AtlasSet
impl Send for AtlasSet
impl Sync for AtlasSet
impl Unpin for AtlasSet
impl UnsafeUnpin for AtlasSet
impl UnwindSafe for AtlasSet
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