QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
dxf
qgsdxfpaintdevice.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdxpaintdevice.h
3
------------------
4
begin : November 2013
5
copyright : (C) 2013 by Marco Hugentobler
6
email : marco at sourcepole dot ch
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 QGSDXFPAINTDEVICE_H
19
#define QGSDXFPAINTDEVICE_H
20
21
22
#include <memory>
23
24
#include "qgis_core.h"
25
26
#include <QPaintDevice>
27
28
#define SIP_NO_FILE
29
30
class
QgsDxfPaintEngine
;
31
class
QgsDxfExport
;
32
class
QPaintEngine;
33
39
40
class
CORE_EXPORT
QgsDxfPaintDevice
:
public
QPaintDevice
41
{
42
public
:
43
QgsDxfPaintDevice
(
QgsDxfExport
*dxf );
44
~QgsDxfPaintDevice
()
override
;
45
46
QPaintEngine *
paintEngine
()
const override
;
47
48
void
setDrawingSize
( QSizeF size ) { mDrawingSize = size; }
49
void
setOutputSize
(
const
QRectF &r ) { mRectangle = r; }
50
52
double
widthScaleFactor()
const
;
53
55
QPointF dxfCoordinates( QPointF pt )
const
;
56
57
/*int height() const { return mDrawingSize.height(); }
58
int width() const { return mDrawingSize.width(); }*/
59
60
int
metric( PaintDeviceMetric metric )
const override
;
61
62
void
setLayer(
const
QString &layer );
63
64
void
setShift( QPointF shift );
65
66
67
private
:
68
std::unique_ptr<QgsDxfPaintEngine> mPaintEngine;
69
70
QSizeF mDrawingSize;
//size (in source coordinates)
71
QRectF mRectangle;
//size (in dxf coordinates)
72
};
73
74
#endif
// QGSDXFPAINTDEVICE_H
QgsDxfExport
Exports QGIS layers to the DXF format.
Definition
qgsdxfexport.h:70
QgsDxfPaintDevice::paintEngine
QPaintEngine * paintEngine() const override
Definition
qgsdxfpaintdevice.cpp:31
QgsDxfPaintDevice::setOutputSize
void setOutputSize(const QRectF &r)
Definition
qgsdxfpaintdevice.h:49
QgsDxfPaintDevice::setDrawingSize
void setDrawingSize(QSizeF size)
Definition
qgsdxfpaintdevice.h:48
QgsDxfPaintDevice::QgsDxfPaintDevice
QgsDxfPaintDevice(QgsDxfExport *dxf)
Definition
qgsdxfpaintdevice.cpp:23
QgsDxfPaintEngine
Custom paint engine for rendering to DXF drawings.
Definition
qgsdxfpaintengine.h:43
Generated on
for QGIS API Documentation by
1.17.0