mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Demos: Fix a bunch of incorrect use of GUI::PaintEvent::rect()
A bunch of programs were using the paint event rect as the rect to draw into. Since the event rect could be any invalidated part of the widget, we need to be passing the full Widget::rect().
This commit is contained in:
parent
6998fa5c54
commit
41dc73adc4
6 changed files with 8 additions and 14 deletions
|
@ -118,9 +118,7 @@ void Fire::paint_event(GUI::PaintEvent& event)
|
|||
|
||||
GUI::Painter painter(*this);
|
||||
painter.add_clip_rect(event.rect());
|
||||
|
||||
/* Blit it! */
|
||||
painter.draw_scaled_bitmap(event.rect(), *bitmap, bitmap->rect());
|
||||
painter.draw_scaled_bitmap(rect(), *bitmap, bitmap->rect());
|
||||
|
||||
timeAvg += timer.elapsed();
|
||||
cycles++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue