pub struct GlyphDraw {
pub origin_px: [f32; 2],
pub size_px: [f32; 2],
pub atlas: AtlasKind,
pub src_min_px: [f32; 2],
pub src_max_px: [f32; 2],
pub color: [f32; 4],
}Fields§
§origin_px: [f32; 2]§size_px: [f32; 2]§atlas: AtlasKind§src_min_px: [f32; 2]Top-left of the sampled region, in pixels of the atlas sheet.
src_max_px: [f32; 2]Bottom-right of the sampled region, in pixels of the atlas sheet.
color: [f32; 4]Implementations§
Source§impl GlyphDraw
impl GlyphDraw
Sourcepub fn crop_src_x(&mut self, t0: f32, t1: f32)
pub fn crop_src_x(&mut self, t0: f32, t1: f32)
Narrows the source to the fractions t0..t1 of its width, the
part a destination cut at the same fractions still shows.
Sourcepub fn crop_src_y(&mut self, t0: f32, t1: f32)
pub fn crop_src_y(&mut self, t0: f32, t1: f32)
Self::crop_src_x along the height.
Trait Implementations§
impl Copy for GlyphDraw
impl StructuralPartialEq for GlyphDraw
Auto Trait Implementations§
impl Freeze for GlyphDraw
impl RefUnwindSafe for GlyphDraw
impl Send for GlyphDraw
impl Sync for GlyphDraw
impl Unpin for GlyphDraw
impl UnsafeUnpin for GlyphDraw
impl UnwindSafe for GlyphDraw
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