Skip to main content

FloatingShape

Struct FloatingShape 

Source
pub struct FloatingShape {
Show 23 fields pub id: String, pub name: Option<String>, pub description: Option<String>, pub text: Option<String>, pub preset_geometry: Option<String>, pub fill_color: Option<Color>, pub outline_color: Option<Color>, pub simple_position_enabled: Option<bool>, pub simple_position: Option<ShapePoint>, pub effect_extent: Option<ShapeEffectExtent>, pub anchor_block_index: Option<usize>, pub anchor_text: Option<String>, pub anchor_char_offset: Option<usize>, pub extent: Option<ShapeExtent>, pub horizontal_position: Option<ShapePosition>, pub vertical_position: Option<ShapePosition>, pub relative_height: Option<i64>, pub behind_doc: Option<bool>, pub layout_in_cell: Option<bool>, pub locked: Option<bool>, pub allow_overlap: Option<bool>, pub distance: ShapeDistance, pub wrapping: Option<ShapeWrapping>,
}
Expand description

Floating shape geometry recovered from a Word document.

Fields§

§id: String

Stable shape id, normally the wp:docPr/@id value for .docx.

§name: Option<String>

Display name from wp:docPr/@name, if present.

§description: Option<String>

Alternative text/description from wp:docPr/@descr, if present.

§text: Option<String>

Visible text recovered from a text-bearing shape body, when present.

§preset_geometry: Option<String>

DrawingML preset geometry name from a:prstGeom/@prst, when present.

§fill_color: Option<Color>

Simple DrawingML solid fill color from a:solidFill/a:srgbClr, when present.

§outline_color: Option<Color>

Simple DrawingML outline color from a:ln/a:solidFill/a:srgbClr, when present.

§simple_position_enabled: Option<bool>

Whether wp:anchor/@simplePos asks consumers to use wp:simplePos.

§simple_position: Option<ShapePoint>

Absolute wp:simplePos point, when present.

§effect_extent: Option<ShapeEffectExtent>

Visual-effect extents from wp:effectExtent, when present.

§anchor_block_index: Option<usize>

Best-effort zero-based top-level body block index containing the anchor, when recoverable from .docx body order.

§anchor_text: Option<String>

Best-effort visible text of the containing top-level body block, excluding the floating shape body itself when recovered from .docx.

§anchor_char_offset: Option<usize>

Zero-width anchor offset inside anchor_text, counted in Unicode scalar values after the same text normalization used for anchor_text.

§extent: Option<ShapeExtent>

Shape drawing extent in EMUs, if present.

§horizontal_position: Option<ShapePosition>

Horizontal positioning metadata from wp:positionH, if present.

§vertical_position: Option<ShapePosition>

Vertical positioning metadata from wp:positionV, if present.

§relative_height: Option<i64>

WordprocessingML relativeHeight z-order value, when present.

§behind_doc: Option<bool>

Whether the anchor asks Word to place the shape behind document text.

§layout_in_cell: Option<bool>

Whether the anchor is laid out inside table cells.

§locked: Option<bool>

Whether the anchor is locked.

§allow_overlap: Option<bool>

Whether the anchor may overlap other floating objects.

§distance: ShapeDistance

Text-distance margins declared by wp:anchor/@dist*.

§wrapping: Option<ShapeWrapping>

Text-wrapping policy declared by the anchor, if present.

Trait Implementations§

Source§

impl Clone for FloatingShape

Source§

fn clone(&self) -> FloatingShape

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 FloatingShape

Source§

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

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

impl Eq for FloatingShape

Source§

impl PartialEq for FloatingShape

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FloatingShape

Auto Trait Implementations§

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.