-
Notifications
You must be signed in to change notification settings - Fork 22
/
vertical_stack.go
42 lines (38 loc) · 929 Bytes
/
vertical_stack.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
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package types
import (
"image"
"image/color"
)
type VerticalStack struct {
bindings image.Rectangle
iconImage image.Image
iconBounds image.Rectangle
borderColor color.RGBA
fillColor color.RGBA
label string
labelColor color.RGBA
margin Margin
padding Padding
//parents *Stack
children []Node
}
func (h VerticalStack) Init() Node {
sr := Resource{}
sr.bindings = &image.Rectangle{
image.Point{0, 0},
image.Point{320, 190},
}
sr.iconImage = image.NewRGBA(h.bindings)
sr.iconBounds = image.Rect(0, 0, 0, 0)
sr.borderColor = &color.RGBA{0, 0, 0, 0}
sr.fillColor = color.RGBA{0, 0, 0, 0}
sr.label = ""
sr.labelColor = &color.RGBA{0, 0, 0, 0}
sr.margin = &Margin{0, 0, 0, 0}
sr.padding = &Padding{0, 0, 0, 0}
sr.direction = "vertical"
sr.align = "center"
return &sr
}