Removed Resize, added DrawTo

This commit is contained in:
Sasha Koshka
2023-01-31 14:29:35 -05:00
parent 0c5cc6ff74
commit 537d69b491
2 changed files with 20 additions and 28 deletions

View File

@@ -15,9 +15,10 @@ type Element interface {
// instead of the offending dimension(s).
MinimumSize () (width, height int)
// Resize resizes the element. This should only be called by the
// element's parent.
Resize (width, height int)
// DrawTo sets this element's canvas. This should only be called by the
// parent element. This is typically a region of the parent element's
// canvas.
DrawTo (canvas Canvas)
// OnDamage sets a function to be called when an area of the element is
// drawn on and should be pushed to the screen.