16#ifndef QGSMASKPAINTDEVICE_H 
   17#define QGSMASKPAINTDEVICE_H 
   22#include <QPainterPath> 
   23#include <QPaintDevice> 
   24#include <QPaintEngine> 
   29class QgsMaskPaintEngine: 
public QPaintEngine
 
   34    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;
 
   75    QPaintEngine *paintEngine() 
const override;
 
   77    int metric( PaintDeviceMetric metric ) 
const override;
 
   82    QPainterPath maskPainterPath() 
const;
 
   86    std::unique_ptr<QgsMaskPaintEngine> mPaintEngine;
 
 
Mask painter device that can be used to register everything painted into a QPainterPath used later as...