Fixed wierd inconsistency with element core

This commit is contained in:
Sasha Koshka
2023-01-31 16:18:10 -05:00
parent 6d6a0c59a1
commit 2f9504b1e4
13 changed files with 47 additions and 45 deletions

View File

@@ -35,7 +35,7 @@ func (element *AnalogClock) SetTime (newTime time.Time) {
}
func (element *AnalogClock) draw () {
bounds := element.core.Bounds()
bounds := element.Bounds()
pattern, inset := theme.SunkenPattern(theme.PatternState {
Case: clockCase,
@@ -81,7 +81,7 @@ func (element *AnalogClock) radialLine (
outer float64,
radian float64,
) {
bounds := element.core.Bounds()
bounds := element.Bounds()
width := float64(bounds.Dx()) / 2
height := float64(bounds.Dy()) / 2
min := image.Pt (
@@ -91,5 +91,5 @@ func (element *AnalogClock) radialLine (
int(math.Cos(radian) * outer * width + width),
int(math.Sin(radian) * outer * height + height))
// println(min.String(), max.String())
artist.Line(element.core, source, 1, min, max)
artist.Line(element, source, 1, min, max)
}