pub enum ShapedItem {
Cluster(ShapedCluster),
CombinedBlock {
source: ContentIndex,
glyphs: Vec<ShapedGlyph>,
bounds: Rect,
baseline_offset: f32,
},
Object {
source: ContentIndex,
bounds: Rect,
baseline_offset: f32,
content: InlineContent,
},
Tab {
source: ContentIndex,
bounds: Rect,
},
Break {
source: ContentIndex,
break_info: InlineBreak,
},
}Variants§
Cluster(ShapedCluster)
CombinedBlock
A block of combined text (tate-chu-yoko) that is laid out
Fields
§
source: ContentIndex§
glyphs: Vec<ShapedGlyph>The glyphs to be rendered horizontally within the vertical line.
Object
Tab
Break
Implementations§
Source§impl ShapedItem
impl ShapedItem
pub fn as_cluster(&self) -> Option<&ShapedCluster>
Sourcepub fn bounds(&self) -> Rect
pub fn bounds(&self) -> Rect
Returns the bounding box of the item, relative to its own origin.
The origin of the returned Rect is (0,0), representing the top-left corner
of the item’s layout space before final positioning. The size represents the
item’s total advance (width in horizontal mode) and its line height (ascent + descent).
Trait Implementations§
Source§impl Clone for ShapedItem
impl Clone for ShapedItem
Source§fn clone(&self) -> ShapedItem
fn clone(&self) -> ShapedItem
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 ShapedItem
impl RefUnwindSafe for ShapedItem
impl Send for ShapedItem
impl Sync for ShapedItem
impl Unpin for ShapedItem
impl UnwindSafe for ShapedItem
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more