Struct usvg::TSpan [] [src]

pub struct TSpan {
    pub fill: Option<Fill>,
    pub stroke: Option<Stroke>,
    pub font: Font,
    pub decoration: TextDecoration,
    pub text: String,
}

A text span.

tspan element in the SVG.

Fields

Fill style.

Stroke style.

Font description.

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.

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 TSpan
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for TSpan

impl Sync for TSpan