16#ifndef QGSMASKPAINTDEVICE_H
17#define QGSMASKPAINTDEVICE_H
22#include <QPainterPath>
23#include <QPaintDevice>
24#include <QPaintEngine>
29class QgsMaskPaintEngine:
public QPaintEngine
34 Q_DECL_DEPRECATED QgsMaskPaintEngine(
bool usePathStroker =
false );
36 bool begin( QPaintDevice * )
override {
return true; };
37 bool end()
override {
return true; };
38 QPaintEngine::Type type()
const override {
return QPaintEngine::User; };
39 void updateState(
const QPaintEngineState & )
override {
return; };
41 void drawPath(
const QPainterPath & )
override;
42 void drawPolygon(
const QPointF *,
int, PolygonDrawMode )
override;
43 void drawPixmap(
const QRectF &,
const QPixmap &,
const QRectF & )
override {
return; };
45 QPainterPath maskPainterPath()
const;
49 bool mUsePathStroker =
false;
50 QPainterPath mMaskPainterPath;
76 QPaintEngine *paintEngine()
const override;
78 int metric( PaintDeviceMetric metric )
const override;
85 Q_DECL_DEPRECATED QPainterPath maskPainterPath()
const SIP_DEPRECATED;
89 std::unique_ptr<QgsMaskPaintEngine> mPaintEngine;
Mask painter device that can be used to register everything painted into a QPainterPath used later as...