Struct usvg::layout::Span

source ·
pub struct Span {
    pub fill: Option<Fill>,
    pub stroke: Option<Stroke>,
    pub paint_order: PaintOrder,
    pub font_size: NonZeroPositiveF32,
    pub visibility: Visibility,
    pub positioned_glyphs: Vec<PositionedGlyph>,
    pub underline: Option<Path>,
    pub overline: Option<Path>,
    pub line_through: Option<Path>,
}
Expand description

A span contains a number of layouted glyphs that share the same fill, stroke, paint order and visibility.

Fields§

§fill: Option<Fill>

The fill of the span.

§stroke: Option<Stroke>

The stroke of the span.

§paint_order: PaintOrder

The paint order of the span.

§font_size: NonZeroPositiveF32

The font size of the span.

§visibility: Visibility

The visibility of the span.

§positioned_glyphs: Vec<PositionedGlyph>

The glyphs that make up the span.

§underline: Option<Path>

An underline text decoration of the span. Needs to be rendered before all glyphs.

§overline: Option<Path>

An overline text decoration of the span. Needs to be rendered before all glyphs.

§line_through: Option<Path>

A line-through text decoration of the span. Needs to be rendered after all glyphs.

Trait Implementations§

source§

impl Clone for Span

source§

fn clone(&self) -> Span

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Span

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Span

§

impl RefUnwindSafe for Span

§

impl Send for Span

§

impl Sync for Span

§

impl Unpin for Span

§

impl UnwindSafe for Span

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.