[][src]Struct usvg::TextSpan

pub struct TextSpan {
    pub visibility: Visibility,
    pub fill: Option<Fill>,
    pub stroke: Option<Stroke>,
    pub font: Font,
    pub baseline_shift: f64,
    pub decoration: TextDecoration,
    pub text: String,
}

A text span.

tspan element in SVG.

Fields

visibility: Visibility

Element visibility.

fill: Option<Fill>

Fill style.

stroke: Option<Stroke>

Stroke style.

font: Font

Font description.

baseline_shift: f64

Baseline shift.

decoration: TextDecoration

Text decoration.

Unlike text-decoration attribute from the SVG, this one has all styles resolved. Basically, by the SVG text-decoration attribute can be defined on tspan element and on any parent element. And all definitions should be combined. The one that was defined by tspan uses the tspan style itself. The one that was defined by any parent node uses the text element style. So it's pretty hard to resolve.

This property has all this stuff resolved.

text: String

An actual text line.

SVG doesn't support multiline text, so this property doesn't have a new line inside of it. All the spaces are already trimmed or preserved, depending on the xml:space attribute. All characters references are already resolved, so there is no &gt; or &#x50;. So this text should be rendered as is, without any postprocessing.

Trait Implementations

impl Clone for TextSpan[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TextSpan[src]

Auto Trait Implementations

impl Send for TextSpan

impl Sync for TextSpan

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]