QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
painting
qgsnullpainterdevice.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsnullpainterdevice.h
3
--------------------------------------
4
Date : December 2021
5
Copyright : (C) 2013 by Mathieu Pellerin
6
Email : nirvn dot asia 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
16
#ifndef QGSNULLPAINTERDEVICE_H
17
#define QGSNULLPAINTERDEVICE_H
18
19
#include <memory>
20
21
#include "qgis_core.h"
22
#include "
qgis_sip.h
"
23
24
#include <QPaintDevice>
25
#include <QPaintEngine>
26
27
#ifndef SIP_RUN
29
class
QgsNullPaintEngine :
public
QPaintEngine
30
{
31
public
:
32
QgsNullPaintEngine()
33
: QPaintEngine( QPaintEngine::AllFeatures ) {};
34
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
; };
39
40
void
drawRects(
const
QRect *,
int
)
override
{
return
; };
41
void
drawRects(
const
QRectF *,
int
)
override
{
return
; };
42
void
drawLines(
const
QLine *,
int
)
override
{
return
; };
43
void
drawLines(
const
QLineF *,
int
)
override
{
return
; };
44
void
drawEllipse(
const
QRectF & )
override
{
return
; };
45
void
drawEllipse(
const
QRect & )
override
{
return
; };
46
void
drawPath(
const
QPainterPath & )
override
{
return
; };
47
void
drawPoints(
const
QPointF *,
int
)
override
{
return
; };
48
void
drawPoints(
const
QPoint *,
int
)
override
{
return
; };
49
void
drawPolygon(
const
QPointF *,
int
, PolygonDrawMode )
override
{
return
; };
50
void
drawPolygon(
const
QPoint *,
int
, PolygonDrawMode )
override
{
return
; };
51
void
drawPixmap(
const
QRectF &,
const
QPixmap &,
const
QRectF & )
override
{
return
; };
52
void
drawTextItem(
const
QPointF &,
const
QTextItem & )
override
{
return
; };
53
void
drawTiledPixmap(
const
QRectF &,
const
QPixmap &,
const
QPointF & )
override
{
return
; };
54
void
drawImage(
const
QRectF &,
const
QImage &,
const
QRectF &, Qt::ImageConversionFlags )
override
{
return
; };
55
};
57
#endif
58
59
65
class
CORE_EXPORT
QgsNullPaintDevice
:
public
QPaintDevice
66
{
67
public
:
68
QgsNullPaintDevice
();
69
70
QPaintEngine *
paintEngine
()
const override
;
71
72
int
metric
( PaintDeviceMetric
metric
)
const override
;
73
77
void
setOutputSize
(
const
QSize &size ) { mSize = size; };
78
82
void
setOutputDpi
(
const
int
dpi ) { mDpi = dpi; };
83
84
private
:
85
std::unique_ptr<QgsNullPaintEngine> mPaintEngine;
86
87
QSize mSize;
88
int
mDpi = 96;
89
};
90
91
92
#endif
// QGSNULLPAINTERDEVICE_H
QgsNullPaintDevice::setOutputSize
void setOutputSize(const QSize &size)
Sets the size of the device in pixels.
Definition
qgsnullpainterdevice.h:77
QgsNullPaintDevice::paintEngine
QPaintEngine * paintEngine() const override
Definition
qgsnullpainterdevice.cpp:23
QgsNullPaintDevice::QgsNullPaintDevice
QgsNullPaintDevice()
Definition
qgsnullpainterdevice.cpp:18
QgsNullPaintDevice::metric
int metric(PaintDeviceMetric metric) const override
Definition
qgsnullpainterdevice.cpp:28
QgsNullPaintDevice::setOutputDpi
void setOutputDpi(const int dpi)
Sets the dpi of the device.
Definition
qgsnullpainterdevice.h:82
qgis_sip.h
Generated on
for QGIS API Documentation by
1.17.0