mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
This commit is contained in:
1 parent
0508029387
commit
d7cd3d03b5
20 files changed
+1158
-137
No files matched your search
+10
-3
@@ -783,7 +783,9 @@ func (e *Editor) prepareObject(id string, object GraphicObject) (GraphicObject,
|
||||
}
|
||||
}
|
||||
if obj.Border != nil {
|
||||
return GraphicObject{}, fmt.Errorf("image borders are not supported for creation")
|
||||
if err := e.validateImageBorder(obj.Border); err != nil {
|
||||
return GraphicObject{}, err
|
||||
}
|
||||
}
|
||||
obj.ID = id
|
||||
boundary, ctm = obj.Boundary, obj.CTM
|
||||
@@ -802,8 +804,13 @@ func (e *Editor) prepareObject(id string, object GraphicObject) (GraphicObject,
|
||||
} else if object.Type == "ImageObject" {
|
||||
object.ImageObject.CTM = fmt.Sprintf("%s 0 0 %s 0 0", ofdNumber(box.W), ofdNumber(box.H))
|
||||
}
|
||||
if drawParam != "" || len(actions) != 0 {
|
||||
return GraphicObject{}, fmt.Errorf("draw parameter references and actions are not supported for creation")
|
||||
if drawParam != "" {
|
||||
if _, err := e.editorDrawParam(drawParam, make(map[string]bool)); err != nil {
|
||||
return GraphicObject{}, err
|
||||
}
|
||||
}
|
||||
if err := validateObjectActions(actions); err != nil {
|
||||
return GraphicObject{}, err
|
||||
}
|
||||
if err := e.validateObjectClips(clips); err != nil {
|
||||
return GraphicObject{}, err
|
||||
|
||||
Reference in new issue
Block a user