pub struct CT_VectorG {
pub id: u32,
pub boundary: String,
pub line_width: f64,
pub stroke_color: Option<u32>,
pub fill_color: Option<u32>,
pub contents: Vec<Content>,
}Expand description
对应 Java: org.ofdrw.core.compositeObj.CT_VectorG
矢量图形复合对象。将多个矢量图元(路径、文本等)组合为 一个可复用的矢量图形单元,支持描边和填充样式设置。
Fields§
§id: u32对象 ID,在页面内唯一。
boundary: String对象边界框,格式为 “x y width height”(单位 mm)。
line_width: f64线宽(mm),默认 0.35。
stroke_color: Option<u32>描边颜色 RGB hex。None 表示不描边。
fill_color: Option<u32>填充颜色 RGB hex。None 表示不填充。
contents: Vec<Content>矢量内容列表。
Implementations§
Source§impl CT_VectorG
impl CT_VectorG
Sourcepub fn line_width(self, width: f64) -> Self
pub fn line_width(self, width: f64) -> Self
设置线宽。
Sourcepub fn stroke_color(self, color: u32) -> Self
pub fn stroke_color(self, color: u32) -> Self
设置描边颜色。
Sourcepub fn fill_color(self, color: u32) -> Self
pub fn fill_color(self, color: u32) -> Self
设置填充颜色。
Sourcepub fn add_content(&mut self, content: Content)
pub fn add_content(&mut self, content: Content)
添加矢量内容。
Sourcepub fn content_count(&self) -> usize
pub fn content_count(&self) -> usize
内容数量。
Sourcepub fn to_xml_string(&self) -> String
pub fn to_xml_string(&self) -> String
序列化为 OFD XML 字符串。
Trait Implementations§
Source§impl Clone for CT_VectorG
impl Clone for CT_VectorG
Source§fn clone(&self) -> CT_VectorG
fn clone(&self) -> CT_VectorG
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 CT_VectorG
impl RefUnwindSafe for CT_VectorG
impl Send for CT_VectorG
impl Sync for CT_VectorG
impl Unpin for CT_VectorG
impl UnsafeUnpin for CT_VectorG
impl UnwindSafe for CT_VectorG
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