mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:31:12 +08:00
This commit is contained in:
1 parent
06b5df9173
commit
697a059162
18 files changed
+694
-130
No files matched your search
@@ -19,6 +19,22 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// Actions 返回对象动作的独立副本,不修改原对象
|
||||
// 返回: []Action 动作列表
|
||||
func (o GraphicObject) Actions() []Action {
|
||||
switch o.Type {
|
||||
case "TextObject":
|
||||
return cloneEditorData(o.TextObject.Actions)
|
||||
case "PathObject", "Path":
|
||||
return cloneEditorData(o.PathObject.Actions)
|
||||
case "ImageObject":
|
||||
return cloneEditorData(o.ImageObject.Actions)
|
||||
case "CompositeObject", "CompositeGraphicUnit":
|
||||
return cloneEditorData(o.CompositeGraphicUnit.Actions)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// UnmarshalXML 解析路径并区分省略的虚线样式与显式实线
|
||||
// 入参: d XML解码器, start 起始节点
|
||||
// 返回: error 错误信息
|
||||
|
||||
Reference in new issue
Block a user