-
Notifications
You must be signed in to change notification settings - Fork 0
/
vml_sub_shadow.go
33 lines (28 loc) · 1.18 KB
/
vml_sub_shadow.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 2017 Andrey Gayvoronsky <plandem@gmail.com>
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package vml
import (
"encoding/xml"
"github.com/roboninc/ooxml/drawing/vml/css"
"github.com/roboninc/ooxml/ml"
)
// Shadow is direct mapping of CT_Shadow
type Shadow struct {
XMLName xml.Name `xml:"shadow"`
On ml.TriStateType `xml:"on,attr,omitempty"`
Type ShadowType `xml:"type,attr,omitempty"`
Color string `xml:"color,attr,omitempty"`
Color2 string `xml:"color2,attr,omitempty"`
Obscured ml.TriStateType `xml:"obscured,attr,omitempty"`
Opacity css.Fraction `xml:"opacity,attr,omitempty"`
Offset string `xml:"offset,attr,omitempty"`
Offset2 string `xml:"offset2,attr,omitempty"`
Origin string `xml:"origin,attr,omitempty"`
Matrix string `xml:"matrix,attr,omitempty"`
ml.ReservedAttributes
}
func (s *Shadow) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
s.ReservedAttributes.ResolveNamespacePrefixes()
return e.EncodeElement(*s, xml.StartElement{Name: ml.ApplyNamespacePrefix(ml.NamespaceVML, start.Name)})
}