Got scroll container working

This commit is contained in:
Sasha Koshka
2023-01-31 18:39:17 -05:00
parent 541d0f4204
commit 9b22e80f05
10 changed files with 52 additions and 42 deletions

View File

@@ -84,12 +84,12 @@ func (element *AnalogClock) radialLine (
bounds := element.Bounds()
width := float64(bounds.Dx()) / 2
height := float64(bounds.Dy()) / 2
min := image.Pt (
min := element.Bounds().Min.Add(image.Pt (
int(math.Cos(radian) * inner * width + width),
int(math.Sin(radian) * inner * height + height))
max := image.Pt (
int(math.Sin(radian) * inner * height + height)))
max := element.Bounds().Min.Add(image.Pt (
int(math.Cos(radian) * outer * width + width),
int(math.Sin(radian) * outer * height + height))
int(math.Sin(radian) * outer * height + height)))
// println(min.String(), max.String())
artist.Line(element, source, 1, min, max)
}