From aa1c0fd3146b4ed055d181c99d52463afa6bedbb Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 16 Sep 2011 17:47:24 +0200 Subject: Initial import --- metawatchpaintengine.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 metawatchpaintengine.h (limited to 'metawatchpaintengine.h') diff --git a/metawatchpaintengine.h b/metawatchpaintengine.h new file mode 100644 index 0000000..7c76beb --- /dev/null +++ b/metawatchpaintengine.h @@ -0,0 +1,32 @@ +#ifndef METAWATCHPAINTENGINE_H +#define METAWATCHPAINTENGINE_H + +#include +#include "watchpaintengine.h" + +namespace sowatch +{ + +class MetaWatch; + +/** This WatchPaintEngine accelerates fillRects by using the MetaWatch's template command. */ +class MetaWatchPaintEngine : public WatchPaintEngine +{ +public: + explicit MetaWatchPaintEngine(MetaWatch* watch, QImage* image); + + void drawRects(const QRectF *rects, int rectCount); + void drawRects(const QRect *rects, int rectCount); + + void updateState(const QPaintEngineState &state); + +protected: + MetaWatch* _watch; + QRect _imageRect; + bool _isBrushBlack; + bool _isBrushWhite; +}; + +} + +#endif // METAWATCHPAINTENGINE_H -- cgit v1.2.3