Graphical environments:A question
Q: When should components paint themselves?
A: Often. It’s complicated...
- When created
- Whenever onscreen area is covered, then uncovered
- Whenever it receives input that changes its state
- (e.g., pressed button must change appearance)
- Whenever the state of the thing it represents changes
- (e.g., an animation of a physics simulation)
- ...and more...