Struct usvg::TextChunk

source ·
pub struct TextChunk {
    pub x: Option<NumberList>,
    pub y: Option<NumberList>,
    pub dx: Option<NumberList>,
    pub dy: Option<NumberList>,
    pub anchor: TextAnchor,
    pub spans: Vec<TextSpan>,
}
Expand description

A text chunk.

Contains position and anchor of the next text chunk.

Doesn’t represented in SVG directly. Usually, it’s a first tspan or text node and any tspan that defines either x or y coordinates.

Fields

x: Option<NumberList>

A list of absolute positions along the X-axis.

y: Option<NumberList>

A list of absolute positions along the Y-axis.

dx: Option<NumberList>

A list of relative positions along the X-axis.

dy: Option<NumberList>

A list of relative positions along the Y-axis.

anchor: TextAnchor

A text anchor/align.

spans: Vec<TextSpan>

A list of text spans.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.