blob: 98e85bb1921519907989f084f14cc83517f46478 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef METAWATCHPAINTENGINE_H
#define METAWATCHPAINTENGINE_H
#include <QtCore/QRect>
#include "metawatch.h"
#include "watchpaintengine.h"
namespace sowatch
{
/** This WatchPaintEngine accelerates fillRects by using the MetaWatch's template command. */
class MetaWatchPaintEngine : public WatchPaintEngine
{
public:
explicit MetaWatchPaintEngine(MetaWatch* watch);
bool begin(QPaintDevice *pdev);
bool end();
void drawRects(const QRectF *rects, int rectCount);
void drawRects(const QRect *rects, int rectCount);
void updateState(const QPaintEngineState &state);
protected:
bool fillsEntireImage(const QRect& rect);
static const QRect totalAreaRect;
MetaWatch* _watch;
MetaWatch::Mode _mode;
bool _isBrushBlack;
bool _isBrushWhite;
};
}
#endif // METAWATCHPAINTENGINE_H
|