pub struct InlineImage {
pub r_id: String,
pub width_emu: i64,
pub height_emu: i64,
pub description: String,
pub name: String,
pub raw_xml: Option<RawXmlNode>,
}Expand description
An inline image in the document
Fields§
§r_id: StringRelationship ID referencing the image part
width_emu: i64Image width in EMU (English Metric Units, 914400 per inch)
height_emu: i64Image height in EMU
description: StringDescription / alt text
name: StringName
raw_xml: Option<RawXmlNode>The full raw XML of the drawing element (for round-trip preservation)
Implementations§
Source§impl InlineImage
impl InlineImage
Sourcepub fn new(r_id: impl Into<String>, width_emu: i64, height_emu: i64) -> Self
pub fn new(r_id: impl Into<String>, width_emu: i64, height_emu: i64) -> Self
Create a new inline image reference
Sourcepub fn from_cm(r_id: impl Into<String>, width_cm: f64, height_cm: f64) -> Self
pub fn from_cm(r_id: impl Into<String>, width_cm: f64, height_cm: f64) -> Self
Create with dimensions in centimeters
Sourcepub fn from_inches(
r_id: impl Into<String>,
width_in: f64,
height_in: f64,
) -> Self
pub fn from_inches( r_id: impl Into<String>, width_in: f64, height_in: f64, ) -> Self
Create with dimensions in inches
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set alt text
Trait Implementations§
Source§impl Clone for InlineImage
impl Clone for InlineImage
Source§fn clone(&self) -> InlineImage
fn clone(&self) -> InlineImage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InlineImage
impl RefUnwindSafe for InlineImage
impl Send for InlineImage
impl Sync for InlineImage
impl Unpin for InlineImage
impl UnsafeUnpin for InlineImage
impl UnwindSafe for InlineImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more