pub struct CT_CGTransform {
pub code_position: Option<u32>,
pub code_count: Option<u32>,
pub glyph_count: Option<u32>,
pub glyphs: Vec<u32>,
}Expand description
对应 Java: org.ofdrw.core.text.CT_CGTransform
变换描述。当存在字形变换时,TextCode 对象中使用 CGTransform 节点 描述字符编码和字形索引之间的关系。 对应 GB/T 33190-2016 第 11.4.1 节图 66 表 48。
Fields§
§code_position: Option<u32>在 TextCode 文本内容中的起始位置(从 0 开始)。
code_count: Option<u32>参与变换的字符数量。
glyph_count: Option<u32>对应的字形数量。
glyphs: Vec<u32>字形索引列表。
Implementations§
Source§impl CT_CGTransform
impl CT_CGTransform
Sourcepub fn code_position(self, pos: u32) -> Self
pub fn code_position(self, pos: u32) -> Self
设置字符起始位置。
Sourcepub fn code_count(self, count: u32) -> Self
pub fn code_count(self, count: u32) -> Self
设置字符数量。
Sourcepub fn glyph_count(self, count: u32) -> Self
pub fn glyph_count(self, count: u32) -> Self
设置字形数量。
Sourcepub fn get_code_position(&self) -> Option<u32>
pub fn get_code_position(&self) -> Option<u32>
获取字符起始位置。
Sourcepub fn get_code_count(&self) -> Option<u32>
pub fn get_code_count(&self) -> Option<u32>
获取字符数量。
Sourcepub fn get_glyph_count(&self) -> Option<u32>
pub fn get_glyph_count(&self) -> Option<u32>
获取字形数量。
Sourcepub fn get_glyphs(&self) -> &[u32]
pub fn get_glyphs(&self) -> &[u32]
获取字形索引列表。
Sourcepub fn to_xml_string(&self) -> String
pub fn to_xml_string(&self) -> String
序列化为 OFD XML 字符串。
Trait Implementations§
Source§impl Clone for CT_CGTransform
impl Clone for CT_CGTransform
Source§fn clone(&self) -> CT_CGTransform
fn clone(&self) -> CT_CGTransform
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 moreSource§impl Debug for CT_CGTransform
impl Debug for CT_CGTransform
Source§impl Default for CT_CGTransform
impl Default for CT_CGTransform
Source§impl XmlElement for CT_CGTransform
impl XmlElement for CT_CGTransform
Source§fn element_name(&self) -> &'static str
fn element_name(&self) -> &'static str
对应 Java: org.ofdrw.core.text.CT_CGTransform
Source§fn from_xml(node: &XmlNode) -> Result<Self, XmlElementError>
fn from_xml(node: &XmlNode) -> Result<Self, XmlElementError>
从节点树解析(对应 ofdrw 解析侧;quick-xml 产物)。 Read more
Source§fn child_nodes(&self) -> Vec<XmlNode>
fn child_nodes(&self) -> Vec<XmlNode>
子元素(作为
XmlNode 提供,便于嵌套序列化)。Source§fn text_content(&self) -> Option<&str>
fn text_content(&self) -> Option<&str>
文本内容(简单文本元素)。
Auto Trait Implementations§
impl Freeze for CT_CGTransform
impl RefUnwindSafe for CT_CGTransform
impl Send for CT_CGTransform
impl Sync for CT_CGTransform
impl Unpin for CT_CGTransform
impl UnsafeUnpin for CT_CGTransform
impl UnwindSafe for CT_CGTransform
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