List and Piano do shattering properly

This commit is contained in:
Sasha Koshka 2023-03-12 01:47:58 -05:00
parent 37048c6759
commit b09994973c
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ func Fill (destination canvas.Canvas, source Pattern) (updated image.Rectangle)
return destination.Bounds()
}
// Draw lets you draw several subsets of
// DrawClip lets you draw several subsets of a pattern at once.
func DrawClip (
destination canvas.Canvas,
source Pattern,

View File

@ -461,5 +461,5 @@ func (element *List) draw () {
).Add(innerBounds.Min).Intersect(innerBounds)
pattern := element.theme.Pattern(theme.PatternSunken, state)
artist.DrawShatter (
element.core, pattern, covered)
element.core, pattern, bounds, covered)
}

View File

@ -305,7 +305,7 @@ func (element *Piano) draw () {
pattern := element.theme.Pattern(theme.PatternPinboard, state)
artist.DrawShatter (
element.core, pattern, element.contentBounds)
element.core, pattern, element.Bounds(), element.contentBounds)
}
func (element *Piano) drawFlat (