pub struct InlineObject {
pub id: u64,
pub width: f32,
pub height: f32,
pub baseline_offset: f32,
pub advance: f32,
}Expand description
An inline object (image, custom widget) that can be positioned inline with text. The layout engine treats it as a glyph with known advance and baseline offset.
Fields§
§id: u64Unique identifier for this object (caller-defined, used for lookup after layout).
width: f32Width in pixels.
height: f32Height in pixels.
baseline_offset: f32Offset from the text baseline in pixels (positive = above baseline, for typical images).
advance: f32Horizontal advance (usually == width, but may differ for glyph-adjacent images).
Trait Implementations§
Source§impl Clone for InlineObject
impl Clone for InlineObject
Source§fn clone(&self) -> InlineObject
fn clone(&self) -> InlineObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InlineObject
impl Debug for InlineObject
Source§impl PartialEq for InlineObject
impl PartialEq for InlineObject
Source§fn eq(&self, other: &InlineObject) -> bool
fn eq(&self, other: &InlineObject) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InlineObject
Auto Trait Implementations§
impl Freeze for InlineObject
impl RefUnwindSafe for InlineObject
impl Send for InlineObject
impl Sync for InlineObject
impl Unpin for InlineObject
impl UnsafeUnpin for InlineObject
impl UnwindSafe for InlineObject
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