blankwnd.cpp 361 B

123456789101112131415161718192021222324
  1. #include "precomp.h"
  2. #include "blankwnd.h"
  3. #include <tataki/canvas/canvas.h>
  4. #include <api/wnd/PaintCanvas.h>
  5. BlankWnd::BlankWnd(RGB32 _color) : color(_color)
  6. {
  7. }
  8. int BlankWnd::onPaint(Canvas *canvas)
  9. {
  10. PaintCanvas pc;
  11. if (canvas == NULL)
  12. {
  13. if (!pc.beginPaint(this)) return 0;
  14. canvas = &pc;
  15. }
  16. canvas->fillRect(&clientRect(), color);
  17. return 1;
  18. }