QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgslayouteffect.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayouteffect.h
3 -------------------
4 begin : October 2017
5 copyright : (C) 2017 by Nyall Dawson
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSLAYOUTEFFECT_H
19#define QGSLAYOUTEFFECT_H
20
21#include <QGraphicsEffect>
22#include <QPainter>
23
24#include "qgis_core.h"
25
35class CORE_EXPORT QgsLayoutEffect : public QGraphicsEffect
36{
37 Q_OBJECT
38
39 public:
40
44 QgsLayoutEffect() = default;
45
51 void setCompositionMode( QPainter::CompositionMode mode );
52
58 QPainter::CompositionMode compositionMode() const { return mCompositionMode; }
59
60 protected:
61
62 void draw( QPainter *painter ) override;
63
64 private:
65
66 QPainter::CompositionMode mCompositionMode = QPainter::CompositionMode_SourceOver;
67};
68
69#endif // QGSLAYOUTEFFECT_H
70
A QGraphicsEffect subclass used for rendering layout items onto a scene with custom composition modes...
QgsLayoutEffect()=default
Constructor for QgsLayoutEffect.
QPainter::CompositionMode compositionMode() const
Returns the composition (blending) mode used for rendering the item.