Button takes advantage of the rendering hints

This commit is contained in:
2023-02-16 22:41:07 -05:00
parent f8240fb518
commit 0c39c2dd57
3 changed files with 70 additions and 28 deletions

View File

@@ -112,10 +112,13 @@ func (control CoreControl) HasImage () (has bool) {
// DamageRegion pushes the selected region of pixels to the parent element. This
// does not need to be called when responding to a resize event.
func (control CoreControl) DamageRegion (bounds image.Rectangle) {
func (control CoreControl) DamageRegion (regions ...image.Rectangle) {
if control.core.canvas == nil { return }
if control.core.onDamage != nil {
control.core.onDamage(canvas.Cut(control.core.canvas, bounds))
for _, region := range regions {
control.core.onDamage (
canvas.Cut(control.core.canvas, region))
}
}
}