pub struct TextBounds {
pub layout: CanvasRect,
pub content: CanvasRect,
pub ink: Option<CanvasRect>,
pub line_count: u32,
pub baselines: Baselines,
}Expand description
Where a text lies, as fractions of the canvas from (0, 0) top-left to (1, 1)
bottom-right. For a text generator this is on its picture, before the clip’s transform
and effects; for a caption it is on the canvas.
Fields§
§layout: CanvasRectThe box the style’s anchor and position place: the wrapping width wide, every line’s em box tall, plus whole pixels of outline and background padding.
content: CanvasRectThe span of the lines’ advances, as tall as the layout and with the same decorations. It moves only with the advances, not with glyph ink.
ink: Option<CanvasRect>What the text draws (glyphs, outline, background boxes), as
alpha2_text::TextMeasure::ink bounds it, within the texture’s sampling spread.
None when the text draws nothing.
line_count: u32Number of laid-out lines.
baselines: BaselinesThe first and last lines’ alphabetic baselines.
Trait Implementations§
Source§impl Clone for TextBounds
impl Clone for TextBounds
impl Copy for TextBounds
Source§impl Debug for TextBounds
impl Debug for TextBounds
Source§impl PartialEq for TextBounds
impl PartialEq for TextBounds
impl StructuralPartialEq for TextBounds
Auto Trait Implementations§
impl Freeze for TextBounds
impl RefUnwindSafe for TextBounds
impl Send for TextBounds
impl Sync for TextBounds
impl Unpin for TextBounds
impl UnsafeUnpin for TextBounds
impl UnwindSafe for TextBounds
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