-
Notifications
You must be signed in to change notification settings - Fork 0
/
image_node.gen.go
230 lines (177 loc) · 5.75 KB
/
image_node.gen.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
// Code generated by PDFlexgo; DO NOT EDIT.
package pdflexgo
import "github.com/kjk/flex"
func (image *ImageElement) Width(width float64) *ImageElement {
image.getFlexNode().StyleSetWidth(float32(width))
return image
}
func (image *ImageElement) Height(height float64) *ImageElement {
image.getFlexNode().StyleSetHeight(float32(height))
return image
}
func (image *ImageElement) WidthPercent(width float64) *ImageElement {
image.getFlexNode().StyleSetWidthPercent(float32(width))
return image
}
func (image *ImageElement) HeightPercent(height float64) *ImageElement {
image.getFlexNode().StyleSetHeightPercent(float32(height))
return image
}
func (image *ImageElement) WidthAuto() *ImageElement {
image.getFlexNode().StyleSetWidthAuto()
return image
}
func (image *ImageElement) HeightAuto() *ImageElement {
image.getFlexNode().StyleSetHeightAuto()
return image
}
// ALIGN SELF
func (image *ImageElement) AlignSelfType(align Align) *ImageElement {
image.getFlexNode().StyleSetAlignSelf(flex.Align(align))
return image
}
func (image *ImageElement) AlignSelfAuto() *ImageElement {
image.AlignSelfType(AlignAuto)
return image
}
func (image *ImageElement) AlignSelfStart() *ImageElement {
image.AlignSelfType(AlignStart)
return image
}
func (image *ImageElement) AlignSelfCenter() *ImageElement {
image.AlignSelfType(AlignCenter)
return image
}
func (image *ImageElement) AlignSelfEnd() *ImageElement {
image.AlignSelfType(AlignEnd)
return image
}
func (image *ImageElement) AlignSelfStretch() *ImageElement {
image.AlignSelfType(AlignStretch)
return image
}
func (image *ImageElement) AlignSelfBaseline() *ImageElement {
image.AlignSelfType(AlignBaseline)
return image
}
func (image *ImageElement) AlignSelfSpaceBetween() *ImageElement {
image.AlignSelfType(AlignSpaceBetween)
return image
}
func (image *ImageElement) AlignSelfSpaceAround() *ImageElement {
image.AlignSelfType(AlignSpaceAround)
return image
}
// FLEX FUNCTIONS
func (image *ImageElement) FlexGrow(flexGrow float64) *ImageElement {
image.getFlexNode().StyleSetFlexGrow(float32(flexGrow))
return image
}
func (image *ImageElement) FlexShrink(flexShrink float64) *ImageElement {
image.getFlexNode().StyleSetFlexShrink(float32(flexShrink))
return image
}
func (image *ImageElement) FlexBasis(flexBasis float64) *ImageElement {
image.getFlexNode().StyleSetFlexBasis(float32(flexBasis))
return image
}
func (image *ImageElement) FlexBasisPercent(flexBasisPercent float64) *ImageElement {
image.getFlexNode().StyleSetFlexBasisPercent(float32(flexBasisPercent))
return image
}
func (image *ImageElement) FlexBasisAuto() *ImageElement {
flex.NodeStyleSetFlexBasisAuto(image.getFlexNode())
return image
}
func (image *ImageElement) FlexAuto() *ImageElement {
return image.
FlexGrow(1).
FlexShrink(1).
FlexBasisAuto()
}
func (image *ImageElement) FlexNone() *ImageElement {
return image.
FlexGrow(0).
FlexShrink(0).
FlexBasisAuto()
}
func (image *ImageElement) MinWidth(minWidth float64) *ImageElement {
image.getFlexNode().StyleSetMinWidth(float32(minWidth))
return image
}
func (image *ImageElement) MinWidthPercent(minWidthPercent float64) *ImageElement {
image.getFlexNode().StyleSetMinWidthPercent(float32(minWidthPercent))
return image
}
func (image *ImageElement) MinHeight(minHeight float64) *ImageElement {
image.getFlexNode().StyleSetMinHeight(float32(minHeight))
return image
}
func (image *ImageElement) MinHeightPercent(minHeightPercent float64) *ImageElement {
image.getFlexNode().StyleSetMinHeightPercent(float32(minHeightPercent))
return image
}
func (image *ImageElement) MaxWidth(maxWidth float64) *ImageElement {
image.getFlexNode().StyleSetMaxWidth(float32(maxWidth))
return image
}
func (image *ImageElement) MaxWidthPercent(maxWidthPercent float64) *ImageElement {
image.getFlexNode().StyleSetMaxWidthPercent(float32(maxWidthPercent))
return image
}
func (image *ImageElement) MaxHeight(maxHeight float64) *ImageElement {
image.getFlexNode().StyleSetMaxHeight(float32(maxHeight))
return image
}
func (image *ImageElement) MaxHeightPercent(maxHeightPercent float64) *ImageElement {
image.getFlexNode().StyleSetMaxHeightPercent(float32(maxHeightPercent))
return image
}
// ASPECT RATIO
func (image *ImageElement) AspectRatio(ratio float64) *ImageElement {
image.getFlexNode().StyleSetAspectRatio(float32(ratio))
return image
}
// POSITION TYPE
func (image *ImageElement) PositionType(_type PositionType) *ImageElement {
image.getFlexNode().StyleSetPositionType(flex.PositionType(_type))
return image
}
func (image *ImageElement) PositionTypeRelative() *ImageElement {
image.PositionType(PositionTypeRelative)
return image
}
func (image *ImageElement) PositionTypeAbsolute() *ImageElement {
image.PositionType(PositionTypeAbsolute)
return image
}
// POSITION TYPE
func (image *ImageElement) Position(_type PositionType) *ImageElement {
image.getFlexNode().StyleSetPositionType(flex.PositionType(_type))
return image
}
// POSITION
func (image *ImageElement) PositionTop(position float64) *ImageElement {
image.getFlexNode().StyleSetPosition(flex.EdgeTop, float32(position))
return image
}
func (image *ImageElement) PositionRight(position float64) *ImageElement {
image.getFlexNode().StyleSetPosition(flex.EdgeRight, float32(position))
return image
}
func (image *ImageElement) PositionBottom(position float64) *ImageElement {
image.getFlexNode().StyleSetPosition(flex.EdgeBottom, float32(position))
return image
}
func (image *ImageElement) PositionLeft(position float64) *ImageElement {
image.getFlexNode().StyleSetPosition(flex.EdgeLeft, float32(position))
return image
}
func (image *ImageElement) PositionAll(position float64) *ImageElement {
image.
PositionTop(position).
PositionRight(position).
PositionBottom(position).
PositionLeft(position)
return image
}