16#ifndef QGSMASKPAINTDEVICE_H
17#define QGSMASKPAINTDEVICE_H
24#include <QPaintDevice>
25#include <QPaintEngine>
26#include <QPainterPath>
30class QgsMaskPaintEngine:
public QPaintEngine
35 QgsMaskPaintEngine(
bool usePathStroker =
false );
37 bool begin( QPaintDevice * )
override {
return true; };
38 bool end()
override {
return true; };
39 QPaintEngine::Type type()
const override {
return QPaintEngine::User; };
40 void updateState(
const QPaintEngineState & )
override {
return; };
42 void drawPath(
const QPainterPath & )
override;
43 void drawPolygon(
const QPointF *,
int, PolygonDrawMode )
override;
44 void drawPixmap(
const QRectF &,
const QPixmap &,
const QRectF & )
override {
return; };
46 QPainterPath maskPainterPath()
const;
50 bool mUsePathStroker =
false;
51 QPainterPath mMaskPainterPath;
90 std::unique_ptr<QgsMaskPaintEngine> mPaintEngine;
Q_DECL_DEPRECATED QgsMaskPaintDevice(bool usePathStroker=false)
Q_DECL_DEPRECATED QPainterPath maskPainterPath() const
Returns the mask painter path painted on this paint device.
int metric(PaintDeviceMetric metric) const override
QPaintEngine * paintEngine() const override