| 1 | // Aseprite UI Library |
|---|---|
| 2 | // Copyright (C) 2001-2017 David Capello |
| 3 | // |
| 4 | // This file is released under the terms of the MIT license. |
| 5 | // Read LICENSE.txt for more information. |
| 6 | |
| 7 | #ifdef HAVE_CONFIG_H |
| 8 | #include "config.h" |
| 9 | #endif |
| 10 | |
| 11 | #include "ui/paint_event.h" |
| 12 | #include "ui/widget.h" |
| 13 | |
| 14 | namespace ui { |
| 15 | |
| 16 | PaintEvent::PaintEvent(Widget* source, Graphics* graphics) |
| 17 | : Event(source) |
| 18 | , m_graphics(graphics) |
| 19 | , m_painted(false) |
| 20 | , m_transparentBg(false) |
| 21 | { |
| 22 | } |
| 23 | |
| 24 | PaintEvent::~PaintEvent() |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | Graphics* PaintEvent::graphics() |
| 29 | { |
| 30 | // If someone requested the graphics pointer, it means that this |
| 31 | // "someone" has painted the widget. |
| 32 | m_painted = true; |
| 33 | return m_graphics; |
| 34 | } |
| 35 | |
| 36 | } // namespace ui |
| 37 |