pub struct TextLayout(/* private fields */);Available on Windows only.
Implementations§
Source§impl TextLayout
impl TextLayout
Sourcepub fn get_line_metrics(&self, buf: &mut Vec<DWRITE_LINE_METRICS>)
pub fn get_line_metrics(&self, buf: &mut Vec<DWRITE_LINE_METRICS>)
Get line metrics, storing them in the provided buffer.
Note: this isn’t necessarily the lowest level wrapping, as it requires an allocation for the buffer. But it’s pretty ergonomic.
pub fn get_raw(&self) -> *mut IDWriteTextLayout
pub fn get_metrics(&self) -> DWRITE_TEXT_METRICS
Sourcepub fn get_overhang_metrics(&self) -> Insets
pub fn get_overhang_metrics(&self) -> Insets
Return the DWRITE_OVERHANG_METRICS, converted to an Insets struct.
The ‘right’ and ‘bottom’ values of this struct are relative to the layout width and height; that is, the width and height constraints used to create the layout, not the actual size of the generated layout.
pub fn set_max_width(&mut self, max_width: f64) -> Result<(), Error>
pub fn hit_test_point(&self, point_x: f32, point_y: f32) -> HitTestPoint
pub fn hit_test_text_position( &self, position: u32, trailing: bool, ) -> Option<HitTestTextPosition>
Trait Implementations§
Source§impl Clone for TextLayout
impl Clone for TextLayout
Source§fn clone(&self) -> TextLayout
fn clone(&self) -> TextLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.