16#ifndef QGSMASKPAINTDEVICE_H
17#define QGSMASKPAINTDEVICE_H
24#include <QPaintDevice>
25#include <QPaintEngine>
26#include <QPainterPath>
30class QgsMaskPaintEngine :
public QPaintEngine
33 QgsMaskPaintEngine(
bool usePathStroker =
false );
35 bool begin( QPaintDevice * )
override {
return true; };
36 bool end()
override {
return true; };
37 QPaintEngine::Type type()
const override {
return QPaintEngine::User; };
38 void updateState(
const QPaintEngineState & )
override {
return; };
40 void drawPath(
const QPainterPath & )
override;
41 void drawPolygon(
const QPointF *,
int, PolygonDrawMode )
override;
42 void drawPixmap(
const QRectF &,
const QPixmap &,
const QRectF & )
override {
return; };
44 QPainterPath maskPainterPath()
const;
47 bool mUsePathStroker =
false;
48 QPainterPath mMaskPainterPath;
83 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