QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgspainting.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspainting.h
3 ---------------------
4 begin : July 2016
5 copyright : (C) 2016 by Martin Dobias
6 email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSPAINTING_H
16#define QGSPAINTING_H
17
18#include "qgis_core.h"
19#include "qgis.h"
20#include "qgis_sip.h"
21
22#include <QPainter>
23
24class QTransform;
25
31class CORE_EXPORT QgsPainting
32{
33 public:
34
40 static QPainter::CompositionMode getCompositionMode( Qgis::BlendMode blendMode );
41
47 static Qgis::BlendMode getBlendModeEnum( QPainter::CompositionMode blendMode );
48
54 static bool isClippingMode( Qgis::BlendMode mode );
55
78 static QTransform triangleToTriangleTransform( double inX1, double inY1, double inX2, double inY2, double inX3, double inY3, double outX1, double outY1, double outX2, double outY2, double outX3, double outY3, bool &ok SIP_OUT );
79
92 static bool drawTriangleUsingTexture(
93 QPainter *painter,
94 const QPolygonF &triangle,
95 const QImage &textureImage,
96 float textureX1, float textureY1,
97 float textureX2, float textureY2,
98 float textureX3, float textureY3
99 );
100
109 static int qtDefaultDpiX();
110
119 static int qtDefaultDpiY();
120
132 static void applyScaleFixForQPictureDpi( QPainter *painter );
133
141 static void drawPicture( QPainter *painter, const QPointF &point, const QPicture &picture );
142};
143
144#endif // QGSPAINTING_H
BlendMode
Blending modes defining the available composition modes that can be used when painting.
Definition qgis.h:4594
Contains miscellaneous painting utility functions.
Definition qgspainting.h:32
#define SIP_OUT
Definition qgis_sip.h:58