QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtNullPaintDevice类 参考abstract

A null paint device that does nothing 更多...

#include <qwt_null_paintdevice.h>

类 QwtNullPaintDevice 继承关系图:
QwtGraphic QwtStyleSheetRecorder

class  PaintEngine
 
class  PrivateData
 

Public 类型

enum  Mode { NormalMode , PolygonPathMode , PathMode }
 Render mode for the paint device 更多...
 

Public 成员函数

 QwtNullPaintDevice ()
 Constructor
 
 ~QwtNullPaintDevice () override
 Destructor
 
void setMode (Mode)
 Set the render mode
 
Mode mode () const
 Get the render mode
 
virtual QPaintEngine * paintEngine () const override
 Return the paint engine
 
virtual int metric (PaintDeviceMetric) const override
 Return metric information for the paint device
 
virtual void drawRects (const QRect *, int)
 Draw rectangles (integer version)
 
virtual void drawRects (const QRectF *, int)
 Draw rectangles (floating point version)
 
virtual void drawLines (const QLine *, int)
 Draw lines (integer version)
 
virtual void drawLines (const QLineF *, int)
 Draw lines (floating point version)
 
virtual void drawEllipse (const QRectF &)
 Draw ellipse (floating point version)
 
virtual void drawEllipse (const QRect &)
 Draw ellipse (integer version)
 
virtual void drawPath (const QPainterPath &)
 Draw a painter path
 
virtual void drawPoints (const QPointF *, int)
 Draw points (floating point version)
 
virtual void drawPoints (const QPoint *, int)
 Draw points (integer version)
 
virtual void drawPolygon (const QPointF *, int, QPaintEngine::PolygonDrawMode)
 Draw polygon (floating point version)
 
virtual void drawPolygon (const QPoint *, int, QPaintEngine::PolygonDrawMode)
 Draw polygon (integer version)
 
virtual void drawPixmap (const QRectF &, const QPixmap &, const QRectF &)
 Draw a pixmap
 
virtual void drawTextItem (const QPointF &, const QTextItem &)
 Draw a text item
 
virtual void drawTiledPixmap (const QRectF &, const QPixmap &, const QPointF &)
 Draw a tiled pixmap
 
virtual void drawImage (const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)
 Draw an image
 
virtual void updateState (const QPaintEngineState &)
 Update the paint engine state
 

Protected 成员函数

virtual QSize sizeMetrics () const =0
 

详细描述

A null paint device that does nothing

Sometimes important layout/rendering geometries are not available or changeable from the public Qt class interface (e.g., hidden in the style implementation). QwtNullPaintDevice can be used to manipulate or filter out this information by analyzing the stream of paint primitives. For example, QwtNullPaintDevice is used by QwtPlotCanvas to identify styled backgrounds with rounded corners.

成员枚举类型说明

◆ Mode

Render mode for the paint device

Controls how vector graphic primitives are processed.

枚举值
NormalMode 

All vector graphic primitives are painted by corresponding draw methods

PolygonPathMode 

Vector graphic primitives (beside polygons) are mapped to QPainterPath

PathMode 

All vector graphic primitives are mapped to QPainterPath

成员函数说明

◆ drawEllipse() [1/2]

void QwtNullPaintDevice::drawEllipse ( const QRect &  rect)
virtual

Draw ellipse (integer version)

See QPaintEngine::drawEllipse()

◆ drawEllipse() [2/2]

void QwtNullPaintDevice::drawEllipse ( const QRectF &  rect)
virtual

Draw ellipse (floating point version)

See QPaintEngine::drawEllipse()

◆ drawImage()

void QwtNullPaintDevice::drawImage ( const QRectF &  rect,
const QImage &  image,
const QRectF &  subRect,
Qt::ImageConversionFlags  flags 
)
virtual

Draw an image

See QPaintEngine::drawImage()

QwtGraphic 重载.

◆ drawLines() [1/2]

void QwtNullPaintDevice::drawLines ( const QLine *  lines,
int  lineCount 
)
virtual

Draw lines (integer version)

See QPaintEngine::drawLines()

◆ drawLines() [2/2]

void QwtNullPaintDevice::drawLines ( const QLineF *  lines,
int  lineCount 
)
virtual

Draw lines (floating point version)

See QPaintEngine::drawLines()

◆ drawPath()

void QwtNullPaintDevice::drawPath ( const QPainterPath &  path)
virtual

Draw a painter path

See QPaintEngine::drawPath()

QwtGraphic , 以及 QwtStyleSheetRecorder 重载.

◆ drawPixmap()

void QwtNullPaintDevice::drawPixmap ( const QRectF &  rect,
const QPixmap &  pm,
const QRectF &  subRect 
)
virtual

Draw a pixmap

See QPaintEngine::drawPixmap()

QwtGraphic 重载.

◆ drawPoints() [1/2]

void QwtNullPaintDevice::drawPoints ( const QPoint *  points,
int  pointCount 
)
virtual

Draw points (integer version)

See QPaintEngine::drawPoints()

◆ drawPoints() [2/2]

void QwtNullPaintDevice::drawPoints ( const QPointF *  points,
int  pointCount 
)
virtual

Draw points (floating point version)

See QPaintEngine::drawPoints()

◆ drawPolygon() [1/2]

void QwtNullPaintDevice::drawPolygon ( const QPoint *  points,
int  pointCount,
QPaintEngine::PolygonDrawMode  mode 
)
virtual

Draw polygon (integer version)

See QPaintEngine::drawPolygon()

◆ drawPolygon() [2/2]

void QwtNullPaintDevice::drawPolygon ( const QPointF *  points,
int  pointCount,
QPaintEngine::PolygonDrawMode  mode 
)
virtual

Draw polygon (floating point version)

See QPaintEngine::drawPolygon()

◆ drawRects() [1/2]

void QwtNullPaintDevice::drawRects ( const QRect *  rects,
int  rectCount 
)
virtual

Draw rectangles (integer version)

See QPaintEngine::drawRects()

QwtStyleSheetRecorder 重载.

◆ drawRects() [2/2]

void QwtNullPaintDevice::drawRects ( const QRectF *  rects,
int  rectCount 
)
virtual

Draw rectangles (floating point version)

See QPaintEngine::drawRects()

QwtStyleSheetRecorder 重载.

◆ drawTextItem()

void QwtNullPaintDevice::drawTextItem ( const QPointF &  pos,
const QTextItem &  textItem 
)
virtual

Draw a text item

See QPaintEngine::drawTextItem()

◆ drawTiledPixmap()

void QwtNullPaintDevice::drawTiledPixmap ( const QRectF &  rect,
const QPixmap &  pixmap,
const QPointF &  subRect 
)
virtual

Draw a tiled pixmap

See QPaintEngine::drawTiledPixmap()

◆ metric()

int QwtNullPaintDevice::metric ( PaintDeviceMetric  deviceMetric) const
overridevirtual

Return metric information for the paint device

Returns information about the device metrics like width, height, DPI, etc. The actual size is determined by sizeMetrics().

参数
[in]deviceMetricType of metric to query
返回
Metric value for the given paint device metric

◆ mode()

QwtNullPaintDevice::Mode QwtNullPaintDevice::mode ( ) const

Get the render mode

返回
Current render mode

◆ paintEngine()

QPaintEngine * QwtNullPaintDevice::paintEngine ( ) const
overridevirtual

Return the paint engine

Return the paint engine for this device

返回
Pointer to the paint engine, created on first call

◆ setMode()

void QwtNullPaintDevice::setMode ( Mode  mode)

Set the render mode

参数
[in]modeNew mode for the paint device

◆ sizeMetrics()

virtual QSize QwtNullPaintDevice::sizeMetrics ( ) const
protectedpure virtual
返回
Size needed to implement metric()

QwtGraphic , 以及 QwtStyleSheetRecorder 内被实现.

◆ updateState()

void QwtNullPaintDevice::updateState ( const QPaintEngineState &  state)
virtual

Update the paint engine state

See QPaintEngine::updateState()

QwtGraphic , 以及 QwtStyleSheetRecorder 重载.


该类的文档由以下文件生成: