summaryrefslogtreecommitdiff
path: root/xmlDrawing.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-09-08 22:05:42 +0800
committerxuri <xuri.me@gmail.com>2021-09-08 22:05:42 +0800
commit72d84c0cbdd0ad748dba19e21d4e92ea077110c7 (patch)
tree59a2c2b40e1969411223f84070697f73812f1856 /xmlDrawing.go
parent684603befa0fbde2ee8db704e37a544f9d92d99d (diff)
This closes #262, support set line width of add the shape
Diffstat (limited to 'xmlDrawing.go')
-rw-r--r--xmlDrawing.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/xmlDrawing.go b/xmlDrawing.go
index b49ae9d..0bb11ac 100644
--- a/xmlDrawing.go
+++ b/xmlDrawing.go
@@ -234,14 +234,22 @@ type xlsxBlipFill struct {
Stretch xlsxStretch `xml:"a:stretch"`
}
+// xlsxLineProperties specifies the width of a line in EMUs. This simple type
+// has a minimum value of greater than or equal to 0. This simple type has a
+// maximum value of less than or equal to 20116800.
+type xlsxLineProperties struct {
+ W int `xml:"w,attr,omitempty"`
+}
+
// xlsxSpPr directly maps the spPr (Shape Properties). This element specifies
// the visual shape properties that can be applied to a picture. These are the
// same properties that are allowed to describe the visual properties of a shape
// but are used here to describe the visual appearance of a picture within a
// document.
type xlsxSpPr struct {
- Xfrm xlsxXfrm `xml:"a:xfrm"`
- PrstGeom xlsxPrstGeom `xml:"a:prstGeom"`
+ Xfrm xlsxXfrm `xml:"a:xfrm"`
+ PrstGeom xlsxPrstGeom `xml:"a:prstGeom"`
+ Ln xlsxLineProperties `xml:"a:ln"`
}
// xlsxPic elements encompass the definition of pictures within the DrawingML
@@ -469,6 +477,7 @@ type formatShape struct {
Height int `json:"height"`
Format formatPicture `json:"format"`
Color formatShapeColor `json:"color"`
+ Line formatLine `json:"line"`
Paragraph []formatShapeParagraph `json:"paragraph"`
}
@@ -485,3 +494,8 @@ type formatShapeColor struct {
Fill string `json:"fill"`
Effect string `json:"effect"`
}
+
+// formatLine directly maps the line settings of the shape.
+type formatLine struct {
+ Width float64 `json:"width"`
+}