[−][src]Struct usvg::TextChunk
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.
Note: usvg
text chunk isn't strictly the same as an SVG one,
because text chunk should be defined only by x
or y
coordinates.
But since resvg
backends doesn't have a direct access to glyphs/graphemes
we have to create chunks on dx
, dy
and non-zero rotate
to simulate this.
This is incorrect, since it breaks text shaping
and BIDI reordering (resvg doesn't support this one anyway).
Fields
x: Option<f64>
An optional absolute positions along the X-axis.
y: Option<f64>
An optional absolute positions along the Y-axis.
dx: Option<f64>
An optional relative positions along the X-axis.
dy: Option<f64>
An optional relative positions along the Y-axis.
anchor: TextAnchor
A text anchor/align.
spans: Vec<TextSpan>
A list of text spans.
Trait Implementations
impl Clone for TextChunk
[src]
fn clone(&self) -> TextChunk
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for TextChunk
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,