Struct mltg::TextLayout
source · pub struct TextLayout { /* private fields */ }
Implementations§
source§impl TextLayout
impl TextLayout
pub fn format(&self) -> &TextFormat
pub fn size(&self) -> Size<f32>
pub fn reset_size(&mut self)
pub fn set_size(&mut self, size: impl Into<Size<f32>>)
pub fn alignment(&self) -> TextAlignment
pub fn set_alignment(&self, align: TextAlignment)
pub fn hit_test(&self, pt: impl Into<Point<f32>>) -> Result<HitTestResult>
pub fn text_position_to_point( &self, position: usize, trailing_hit: bool ) -> Result<Point<f32>>
pub fn position(&self, pt: impl Into<Point<f32>>) -> (&Self, Point<f32>)
Trait Implementations§
source§impl Clone for TextLayout
impl Clone for TextLayout
source§impl Debug for TextLayout
impl Debug for TextLayout
source§impl PartialEq<TextLayout> for TextLayout
impl PartialEq<TextLayout> for TextLayout
impl Eq for TextLayout
Auto Trait Implementations§
impl !RefUnwindSafe for TextLayout
impl Send for TextLayout
impl !Sync for TextLayout
impl Unpin for TextLayout
impl UnwindSafe for TextLayout
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