pub struct TextRasterizer {
pub context: GraphicsContext,
pub atlas_size: u32,
/* private fields */
}Fields§
§context: GraphicsContext§atlas_size: u32Implementations§
Source§impl TextRasterizer
impl TextRasterizer
pub fn new(context: GraphicsContext) -> Self
pub fn calculate_text_layout( &mut self, assets: &Assets, text: TextData, pro_params: ProTextParams, ) -> (Layout, Rect, Option<Vec<StyledGlyph>>)
pub fn get_glyph( &mut self, font_handle: FontHandle, font: &Font, font_size: f32, c: char, ) -> (TextureHandle, IRect)
pub fn prepare_rasterize( &mut self, font_handle: FontHandle, font: &Font, font_size: f32, c: char, )
pub fn layout_text( &mut self, font: &Font, text: &str, size: f32, layout_settings: &LayoutSettings, ) -> Layout
pub fn layout_text_demo(&mut self, font: &Font) -> Vec<GlyphPosition>
Auto Trait Implementations§
impl Freeze for TextRasterizer
impl !RefUnwindSafe for TextRasterizer
impl Send for TextRasterizer
impl Sync for TextRasterizer
impl Unpin for TextRasterizer
impl !UnwindSafe for TextRasterizer
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more