spitfire_fontdue

Struct TextRenderer

Source
pub struct TextRenderer<UD: Copy = ()> {
    pub renderables_resize: usize,
    /* private fields */
}

Fields§

§renderables_resize: usize

Implementations§

Source§

impl<UD: Copy> TextRenderer<UD>

Source

pub fn new(width: usize, height: usize) -> Self

Source

pub fn clear(&mut self)

Source

pub fn include(&mut self, fonts: &[Font], layout: &Layout<UD>)

Source

pub fn include_consumed( &mut self, fonts: &[Font], layout: &Layout<UD>, ) -> impl Iterator<Item = (GlyphPosition<UD>, TextRendererGlyph)> + '_

Source

pub fn glyph(&self, key: &GlyphRasterConfig) -> Option<TextRendererGlyph>

Source

pub fn consume_renderables( &mut self, ) -> impl Iterator<Item = (GlyphPosition<UD>, TextRendererGlyph)> + '_

Source

pub fn image(&self) -> &[u8]

Source

pub fn atlas_size(&self) -> [usize; 3]

Source

pub fn into_image(self) -> (Vec<u8>, [usize; 3])

Source

pub fn into_inner(self) -> TextRendererUnpacked<UD>

Source

pub fn render_to_stream<V, B>(&mut self, stream: &mut VertexStream<V, B>)
where V: TextVertex<UD> + Pod + Default,

Trait Implementations§

Source§

impl<UD: Clone + Copy> Clone for TextRenderer<UD>

Source§

fn clone(&self) -> TextRenderer<UD>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<UD: Copy> Default for TextRenderer<UD>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<UD> Freeze for TextRenderer<UD>

§

impl<UD> RefUnwindSafe for TextRenderer<UD>
where UD: RefUnwindSafe,

§

impl<UD> Send for TextRenderer<UD>
where UD: Send,

§

impl<UD> Sync for TextRenderer<UD>
where UD: Sync,

§

impl<UD> Unpin for TextRenderer<UD>
where UD: Unpin,

§

impl<UD> UnwindSafe for TextRenderer<UD>
where UD: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.