pub struct InlineFragment {
pub node: NodeId,
pub span: usize,
pub x: f32,
pub width: f32,
pub above: f32,
pub below: f32,
pub opens: bool,
pub closes: bool,
}Expand description
One inline element’s box on one line: where it sits, and which of its edges it paints there.
An inline element covers as many lines as its runs reach, and one
of these stands for what it takes on one of them. The edges the
line break cut are open under box-decoration-break: slice and
closed under clone.
Fields§
§node: NodeIdThe inline element the box belongs to.
span: usizeWhich span of the line the box is set in, as an index into
Line::spans. An element covering two spans of one band has a
box in each of them.
x: f32Points from the leading edge of that span to the leading edge of the border box. The span’s own offset moves the box with the text, which is what alignment moves.
width: f32Width of the border box, in points.
above: f32Points from the baseline up to the top of the border box.
below: f32Points from the baseline down to its bottom.
opens: boolWhether the leading edge is painted here.
closes: boolWhether the trailing edge is.
Trait Implementations§
Source§impl Clone for InlineFragment
impl Clone for InlineFragment
Source§fn clone(&self) -> InlineFragment
fn clone(&self) -> InlineFragment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InlineFragment
Source§impl Debug for InlineFragment
impl Debug for InlineFragment
Source§impl PartialEq for InlineFragment
impl PartialEq for InlineFragment
impl StructuralPartialEq for InlineFragment
Auto Trait Implementations§
impl Freeze for InlineFragment
impl RefUnwindSafe for InlineFragment
impl Send for InlineFragment
impl Sync for InlineFragment
impl Unpin for InlineFragment
impl UnsafeUnpin for InlineFragment
impl UnwindSafe for InlineFragment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.