23 #ifndef NULL_PAINT_DEVICE_H 24 #define NULL_PAINT_DEVICE_H 26 #include <QPaintDevice> 27 #include <QPaintEngine> 37 virtual void drawImage(
const QRectF & ,
const QImage & ,
const QRectF & , Qt::ImageConversionFlags ) { }
40 virtual void drawPath(
const QPainterPath & ) { }
41 virtual void drawPixmap(
const QRectF & ,
const QPixmap & ,
const QRectF & ) { }
44 virtual void drawPolygon(
const QPointF * ,
int , PolygonDrawMode ) { }
45 virtual void drawPolygon(
const QPoint * ,
int , PolygonDrawMode ) { }
48 virtual void drawTextItem(
const QPointF & ,
const QTextItem & ) { }
49 virtual void drawTiledPixmap(
const QRectF & ,
const QPixmap & ,
const QPointF & ) { }
50 virtual bool end() {
return true; }
52 virtual Type
type()
const {
return QPaintEngine::User; }
62 int metric(PaintDeviceMetric metric)
const 66 case QPaintDevice::PdmWidth:
67 return m_size.width();
68 case QPaintDevice::PdmHeight:
69 return m_size.height();
70 case QPaintDevice::PdmWidthMM:
72 case QPaintDevice::PdmHeightMM:
74 case QPaintDevice::PdmNumColors:
75 return int((uint)(-1));
76 case QPaintDevice::PdmDepth:
78 case QPaintDevice::PdmDpiX:
80 case QPaintDevice::PdmDpiY:
82 case QPaintDevice::PdmPhysicalDpiX:
84 case QPaintDevice::PdmPhysicalDpiY:
86 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 87 case QPaintDevice::PdmDevicePixelRatio:
97 return &nullPaintEngine;
virtual void drawEllipse(const QRectF &)
virtual void drawPolygon(const QPoint *, int, PolygonDrawMode)
virtual void drawPolygon(const QPointF *, int, PolygonDrawMode)
int metric(PaintDeviceMetric metric) const
virtual void drawPath(const QPainterPath &)
virtual void drawLines(const QLine *, int)
virtual bool begin(QPaintDevice *)
virtual void updateState(const QPaintEngineState &)
NullPaintDevice(const QSize &size)
virtual void drawLines(const QLineF *, int)
virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)
virtual void drawPoints(const QPointF *, int)
virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &)
virtual void drawRects(const QRect *, int)
virtual void drawEllipse(const QRect &)
QPaintEngine * paintEngine() const
virtual void drawPoints(const QPoint *, int)
virtual void drawRects(const QRectF *, int)
virtual void drawTiledPixmap(const QRectF &, const QPixmap &, const QPointF &)
virtual void drawTextItem(const QPointF &, const QTextItem &)
virtual Type type() const