This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.go
81 lines (69 loc) · 2.01 KB
/
style.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package xcel
// Style struct
type Style struct {
Font *Font `json:"font"`
Fill *Fill `json:"fill"`
Border []*Border `json:"border"`
Alignment *Alignment `json:"alignment"`
NumberFormat string `json:"custom_number_format,omitempty"`
}
type Alignment struct {
Horizontal string `json:"horizontal"`
Vertical string `json:"vertical"`
ShrinkToFit bool `json:"shrink_to_fit"`
WrapText bool `json:"wrap_text"`
}
// Font struct
type Font struct {
Bold bool `json:"bold"`
Italic bool `json:"italic"`
Underline string `json:"underline"`
Family string `json:"family"`
Size int `json:"size"`
Color string `json:"color"`
}
// Fill struct
type Fill struct {
Type string `json:"type"`
Pattern int `json:"pattern"`
Color []string `json:"color"`
}
// Border struct
type Border struct {
Type string `json:"type"`
Color string `json:"color"`
Style int `json:"style"`
}
// ImageFormat struct
type ImageFormat struct {
XScale float64 `json:"x_scale,omitempty"`
YScale float64 `json:"y_scale,omitempty"`
XOffset float64 `json:"x_offset,omitempty"`
YOffset float64 `json:"y_offset,omitempty"`
LockAspectRatio bool `json:"lock_aspect_ratio,omitempty"`
Positioning string `json:"positioning,omitempty"`
}
const (
PatternSolid = 1
HorizontalAlignmentLeft = "left"
HorizontalAlignmentRight = "right"
HorizontalAlignmentCenter = "center"
HorizontalAlignmentFill = "fill"
HorizontalAlignmentJustify = "justify"
VerticalAlignmentTop = "left"
VerticalAlignmentCenter = "center"
VerticalAlignmentJustify = "justify"
UnderlineSingle = "single"
UnderlineDouble = "double"
BorderNone = 0
BorderDash = 3
BorderDashMedium = 8
BorderDot = 4
BorderContinuous = 1
BorderContinuousLight = 7
BorderContinuousMedium = 2
BorderContinuousHeavy = 5
PositioningDefault = ""
PositioningAbsolute = "absolute"
PositioningOneCell = "oneCell"
)