pub struct ImageObject {
pub x: f64,
pub y: f64,
pub width: f64,
pub height: f64,
pub data: Vec<u8>,
pub format: ImageFormat,
pub res_name: Option<String>,
}Expand description
带位置和尺寸的图片对象。
Fields§
§x: f64距左边缘的 X 位置(mm)。
y: f64距顶部的 Y 位置(mm)。
width: f64宽度(mm)。
height: f64高度(mm)。
data: Vec<u8>图片数据(原始字节)。
format: ImageFormat图片格式。
res_name: Option<String>原始资源路径(相对文档目录,如 "Res/qrcode.png")。
读取 OFD 文件时保留,写入器优先使用该路径而非自动命名, 从而在 roundtrip 时保持图片资源名与原始文件一致。
Implementations§
Trait Implementations§
Source§impl Clone for ImageObject
impl Clone for ImageObject
Source§fn clone(&self) -> ImageObject
fn clone(&self) -> ImageObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ImageObject
impl RefUnwindSafe for ImageObject
impl Send for ImageObject
impl Sync for ImageObject
impl Unpin for ImageObject
impl UnsafeUnpin for ImageObject
impl UnwindSafe for ImageObject
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