Skip to main content

Text

Struct Text 

Source
#[non_exhaustive]
pub struct Text {
Show 14 fields pub text: String, pub style: Option<Name>, pub at: P3, pub at2: Option<P3>, pub height: f64, pub rotation: f64, pub width: Option<f64>, pub oblique: Option<f64>, pub generation: Option<u32>, pub halign: u32, pub valign: u32, pub tag: Option<String>, pub attr_flags: u32, pub mtext: Option<Box<MText>>,
}
Expand description

TEXT, ATTRIB and ATTDEF

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§text: String

1, decoded (\U+XXXX; the %% codes stay: specials())

§style: Option<Name>

7 (Standard when absent)

§at: P3

10, 11 (OCS)

§at2: Option<P3>§height: f64

40

§rotation: f64

50 (degrees)

§width: Option<f64>

41, 51 (degrees): None when absent (the style’s)

§oblique: Option<f64>§generation: Option<u32>

71: 2 backward, 4 upside down (None: the style’s)

§halign: u32

72 (0 left, 1 center, 2 right, 3 aligned, 4 middle, 5 fit), 73 (0 baseline, 1 bottom, 2 middle, 3 top)

§valign: u32§tag: Option<String>

ATTRIB and ATTDEF: the tag (2) and the flags (70: 1 invisible, 2 constant, 4 verify, 8 preset)

§attr_flags: u32§mtext: Option<Box<MText>>

ATTRIB / ATTDEF of several lines (R2018: an MTEXT inside them)

Trait Implementations§

Source§

impl Clone for Text

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Text

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Text

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Text

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Text

Auto Trait Implementations§

§

impl Forget for Text

§

impl Freeze for Text

§

impl Move for Text

§

impl RefUnwindSafe for Text

§

impl Send for Text
where RawVecInner: Send, BoxRaw<MText>: Send,

§

impl Sync for Text
where RawVecInner: Sync, BoxRaw<MText>: Sync,

§

impl Unpin for Text
where *const u8 is !null: Unpin, Box<MText>: Unpin,

§

impl UnsafeUnpin for Text

§

impl UnwindSafe for Text
where RawVecInner: UnwindSafe, BoxRaw<MText>: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.