Created FillRectangleShatter for convenience

This commit is contained in:
Sasha Koshka
2023-02-16 18:18:44 -05:00
parent fc0a9292d9
commit f8240fb518
4 changed files with 24 additions and 18 deletions

View File

@@ -5,7 +5,6 @@ import "git.tebibyte.media/sashakoshka/tomo/input"
import "git.tebibyte.media/sashakoshka/tomo/theme"
import "git.tebibyte.media/sashakoshka/tomo/config"
import "git.tebibyte.media/sashakoshka/tomo/artist"
import "git.tebibyte.media/sashakoshka/tomo/shatter"
import "git.tebibyte.media/sashakoshka/tomo/elements/core"
import "git.tebibyte.media/sashakoshka/tomo/elements/fun/music"
@@ -304,11 +303,8 @@ func (element *Piano) draw () {
}
pattern := element.theme.Pattern(theme.PatternPinboard, state)
tiles := shatter.Shatter(element.Bounds(), element.contentBounds)
for _, tile := range tiles {
artist.FillRectangleClip (
element.core, pattern, element.Bounds(), tile)
}
artist.FillRectangleShatter (
element.core, pattern, element.Bounds(), element.contentBounds)
}
func (element *Piano) drawFlat (