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; }
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:
93 return &nullPaintEngine;