39 case QPaintDevice::PdmWidth:
40 return mDrawingSize.
width();
41 case QPaintDevice::PdmHeight:
42 return mDrawingSize.
height();
43 case QPaintDevice::PdmWidthMM:
44 return mDrawingSize.
width();
45 case QPaintDevice::PdmHeightMM:
46 return mDrawingSize.
height();
47 case QPaintDevice::PdmNumColors:
49 case QPaintDevice::PdmDepth:
51 case QPaintDevice::PdmDpiX:
52 case QPaintDevice::PdmDpiY:
53 case QPaintDevice::PdmPhysicalDpiX:
54 case QPaintDevice::PdmPhysicalDpiY:
56 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) 57 case QPaintDevice::PdmDevicePixelRatio:
71 double widthFactor = mRectangle.
width() / mDrawingSize.
width();
72 double heightFactor = mRectangle.
height() / mDrawingSize.
height();
73 return ( widthFactor + heightFactor ) / 2.0;
83 double x = mRectangle.
left() + pt.
x() * ( mRectangle.
width() / mDrawingSize.
width() );
QPaintEngine * paintEngine() const override
void setLayer(const QString &layer)
void setShift(QPointF shift)
void setShift(QPointF shift)
QPointF dxfCoordinates(QPointF pt) const
Converts a point from device coordinates to dxf coordinates.
double widthScaleFactor() const
Returns scale factor for line width.
void setLayer(const QString &layer)
QgsDxfPaintDevice(QgsDxfExport *dxf)
int metric(PaintDeviceMetric metric) const override