feat(增强渲染): 支持Pattern

This commit is contained in:
2026-07-01 08:52:45 +08:00
parent 8396f1d0dc
commit b778ab9d90
5 changed files with 217 additions and 1 deletions
+20
View File
@@ -103,10 +103,30 @@ type TextObject struct {
type FillColor struct {
Value string `xml:"Value,attr"`
Alpha *int `xml:"Alpha,attr"`
Pattern *Pattern `xml:"Pattern"`
AxialShd *AxialShd `xml:"AxialShd"`
RadialShd *RadialShd `xml:"RadialShd"`
}
// Pattern 图案填充
type Pattern struct {
Width float64 `xml:"Width,attr"`
Height float64 `xml:"Height,attr"`
XStep float64 `xml:"XStep,attr"`
YStep float64 `xml:"YStep,attr"`
CTM string `xml:"CTM,attr"`
CellContent PatternContent `xml:"CellContent"`
}
// PatternContent 图案单元内容
type PatternContent struct {
Objects []GraphicObject `xml:"-"`
TextObject []TextObject `xml:"TextObject"`
PathObject []PathObject `xml:"PathObject"`
ImageObject []ImageObject `xml:"ImageObject"`
CompositeGraphicUnit []CompositeGraphicUnit `xml:"CompositeGraphicUnit"`
}
// TextCode 文本内容节点
type TextCode struct {
X string `xml:"X,attr"`