pub struct DrawImage { /* private fields */ }
Expand description

The draw:image element represents an image. An image can be either: • A link to an external resource or • Embedded in the document The draw:image element may have text content. Text content is displayed in addition to the image data. Note: While the image data may have an arbitrary format, vector graphics should be stored in the [SVG] format and bitmap graphics in the [PNG] format.

Implementations§

source§

impl DrawImage

source

pub fn new() -> Self

New.

source

pub fn attrmap(&self) -> &AttrMap2

Allows access to all attributes of the style itself.

source

pub fn attrmap_mut(&mut self) -> &mut AttrMap2

Allows access to all attributes of the style itself.

source

pub fn get_binary_base64(&self) -> Option<&String>

Image binary data.

source

pub fn set_binary_base64(&mut self, binary: String)

Image binary data.

source

pub fn get_binary(&self) -> Result<Vec<u8>, OdsError>

Image binary data.

source

pub fn set_binary(&mut self, binary: &[u8])

Image binary data. Note: While the image data may have an arbitrary format, vector graphics should be stored in the [SVG] format and bitmap graphics in the [PNG] format.

source

pub fn clear_binary(&mut self)

Image binary data.

source

pub fn get_text(&self) -> &Vec<TextTag>

Text

source

pub fn push_text(&mut self, text: TextTag)

Text

source

pub fn push_text_str<S: Into<String>>(&mut self, text: S)

Text

source

pub fn set_text(&mut self, text: Vec<TextTag>)

Text

source

pub fn set_draw_filter_name<S: Into<String>>(&mut self, name: S)

The draw:filter-name attribute specifies the implementation-dependent filter name that has been used to load an image into the document

source

pub fn set_draw_mime_type<S: Into<String>>(&mut self, name: S)

The draw:mime-type attribute specifies the MIME type of the media type that a plugin processes, or the MIME type of the image given by a draw:image element. Valid values for this attribute are those defined in accordance with §3.7 of [RFC2616], or registered in accordance with [RFC6838]. Note: Additional information on MIME media types can be found at [MIMETYPES].

See §5.6.2 of [XLink].

The xlink:href 19.916 attribute specifies a remote resource. Its data type is anyIRI. See §5.4 of [XLink].

See §5.6.1 of [XLink].

See §3.2 of [XLink]. This attribute always has the value ‘simple’ in OpenDocument document instances.

source

pub fn set_xml_id<S: Into<String>>(&mut self, id: S)

The table:end-y attribute specifies the y-coordinate of the end position of a shape relative to the top-left edge of a cell. The size attributes of the shape are ignored.

Trait Implementations§

source§

impl Clone for DrawImage

source§

fn clone(&self) -> DrawImage

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for DrawImage

source§

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

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

impl Default for DrawImage

source§

fn default() -> DrawImage

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

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

§

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

§

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

§

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.