11 #include <qpaintengine.h> 30 virtual bool begin( QPaintDevice * );
34 virtual void updateState(
const QPaintEngineState &);
36 virtual void drawRects(
const QRect *,
int );
37 virtual void drawRects(
const QRectF *,
int );
39 virtual void drawLines(
const QLine *,
int );
40 virtual void drawLines(
const QLineF *,
int );
45 virtual void drawPath(
const QPainterPath &);
47 virtual void drawPoints(
const QPointF *,
int );
50 virtual void drawPolygon(
const QPointF *,
int , PolygonDrawMode );
51 virtual void drawPolygon(
const QPoint *,
int , PolygonDrawMode );
54 const QPixmap &,
const QRectF &);
56 virtual void drawTextItem(
const QPointF &,
const QTextItem &);
59 const QPixmap &,
const QPointF &
s);
62 const QImage &,
const QRectF &, Qt::ImageConversionFlags );
69 QPaintEngine( QPaintEngine::AllFeatures )
87 return QPaintEngine::User;
91 const QRect *rects,
int rectCount)
99 QPaintEngine::drawRects( rects, rectCount );
107 const QRectF *rects,
int rectCount)
110 if ( device == NULL )
115 QPaintEngine::drawRects( rects, rectCount );
123 const QLine *lines,
int lineCount)
126 if ( device == NULL )
131 QPaintEngine::drawLines( lines, lineCount );
139 const QLineF *lines,
int lineCount)
142 if ( device == NULL )
147 QPaintEngine::drawLines( lines, lineCount );
158 if ( device == NULL )
163 QPaintEngine::drawEllipse( rect );
174 if ( device == NULL )
179 QPaintEngine::drawEllipse( rect );
188 const QPainterPath &path)
191 if ( device == NULL )
198 const QPointF *points,
int pointCount)
201 if ( device == NULL )
206 QPaintEngine::drawPoints( points, pointCount );
214 const QPoint *points,
int pointCount)
217 if ( device == NULL )
222 QPaintEngine::drawPoints( points, pointCount );
230 const QPointF *points,
int pointCount, PolygonDrawMode
mode)
233 if ( device == NULL )
240 if ( pointCount > 0 )
242 path.moveTo( points[0] );
243 for (
int i = 1;
i < pointCount;
i++ )
244 path.lineTo( points[
i] );
246 if ( mode != PolylineMode )
258 const QPoint *points,
int pointCount, PolygonDrawMode
mode)
261 if ( device == NULL )
268 if ( pointCount > 0 )
270 path.moveTo( points[0] );
271 for (
int i = 1;
i < pointCount;
i++ )
272 path.lineTo( points[
i] );
274 if ( mode != PolylineMode )
286 const QRectF &rect,
const QPixmap &pm,
const QRectF &subRect )
289 if ( device == NULL )
296 const QPointF &pos,
const QTextItem &textItem)
299 if ( device == NULL )
304 QPaintEngine::drawTextItem( pos, textItem );
312 const QRectF &rect,
const QPixmap &pixmap,
313 const QPointF &subRect)
316 if ( device == NULL )
321 QPaintEngine::drawTiledPixmap( rect, pixmap, subRect );
329 const QRectF &rect,
const QImage &image,
330 const QRectF &subRect, Qt::ImageConversionFlags flags)
333 if ( device == NULL )
336 device->
drawImage( rect, image, subRect, flags );
340 const QPaintEngineState &state)
343 if ( device == NULL )
417 switch ( deviceMetric )
439 case PdmPhysicalDpiX:
440 case PdmPhysicalDpiY:
449 value = qRound(
metric( PdmWidth ) * 25.4 /
metric( PdmDpiX ) );
454 value = qRound(
metric( PdmHeight ) * 25.4 /
metric( PdmDpiY ) );
466 const QRect *rects,
int rectCount)
474 const QRectF *rects,
int rectCount)
482 const QLine *lines,
int lineCount)
490 const QLineF *lines,
int lineCount)
516 const QPointF *points,
int pointCount)
519 Q_UNUSED(pointCount);
524 const QPoint *points,
int pointCount)
527 Q_UNUSED(pointCount);
532 const QPointF *points,
int pointCount,
533 QPaintEngine::PolygonDrawMode
mode)
536 Q_UNUSED(pointCount);
542 const QPoint *points,
int pointCount,
543 QPaintEngine::PolygonDrawMode
mode)
546 Q_UNUSED(pointCount);
552 const QPixmap &pm,
const QRectF &subRect )
561 const QPointF &pos,
const QTextItem &textItem)
569 const QRectF &rect,
const QPixmap &pixmap,
570 const QPointF &subRect)
579 const QRectF &rect,
const QImage &image,
580 const QRectF &subRect, Qt::ImageConversionFlags flags)
590 const QPaintEngineState &state )
virtual bool begin(QPaintDevice *)
virtual ~QwtNullPaintDevice()
Destructor.
virtual void drawRects(const QRect *, int)
See QPaintEngine::drawRects()
QwtNullPaintDevice::Mode mode
QwtNullPaintDevice()
Constructor.
virtual int metric(PaintDeviceMetric metric) const
virtual void drawLines(const QLine *, int)
See QPaintEngine::drawLines()
virtual QPaintEngine * paintEngine() const
See QPaintDevice::paintEngine()
A null paint device doing nothing.
virtual void drawTiledPixmap(const QRectF &, const QPixmap &, const QPointF &s)
See QPaintEngine::drawTiledPixmap()
virtual void drawTextItem(const QPointF &, const QTextItem &)
See QPaintEngine::drawTextItem()
virtual void drawEllipse(const QRectF &)
See QPaintEngine::drawEllipse()
virtual void drawRects(const QRect *, int)
virtual void drawTiledPixmap(const QRectF &, const QPixmap &, const QPointF &s)
virtual void drawPath(const QPainterPath &)
See QPaintEngine::drawPath()
GraphId path[kMaxDeadlockPathLen]
virtual void drawTextItem(const QPointF &, const QTextItem &)
virtual void updateState(const QPaintEngineState &state)
See QPaintEngine::updateState()
virtual void drawPath(const QPainterPath &)
virtual void drawLines(const QLine *, int)
virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)
virtual void drawImage(const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)
See QPaintEngine::drawImage()
virtual QSize sizeMetrics() const =0
virtual void updateState(const QPaintEngineState &)
QwtNullPaintDevice * nullDevice()
virtual void drawPolygon(const QPointF *, int, QPaintEngine::PolygonDrawMode)
See QPaintEngine::drawPolygon()
virtual void drawPoints(const QPointF *, int)
virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &)
virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &)
See QPaintEngine::drawPixmap()
virtual void drawPoints(const QPointF *, int)
See QPaintEngine::drawPoints()
virtual Type type() const
virtual void drawPolygon(const QPointF *, int, PolygonDrawMode)
virtual void drawEllipse(const QRectF &)