QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_null_paintdevice.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *
9 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_NULL_PAINT_DEVICE_H
28#define QWT_NULL_PAINT_DEVICE_H
29
30#include "qwt_global.h"
31
32#include <qpaintdevice.h>
33#include <qpaintengine.h>
34
54class QWT_EXPORT QwtNullPaintDevice : public QPaintDevice
55{
56 public:
67 enum Mode
68 {
71
74
76 PathMode
77 };
78
82 virtual ~QwtNullPaintDevice();
83
85 void setMode( Mode );
87 Mode mode() const;
88
90 virtual QPaintEngine* paintEngine() const override;
91
93 virtual int metric( PaintDeviceMetric ) const override;
94
96 virtual void drawRects(const QRect*, int );
98 virtual void drawRects(const QRectF*, int );
99
101 virtual void drawLines(const QLine*, int );
103 virtual void drawLines(const QLineF*, int );
104
106 virtual void drawEllipse(const QRectF&);
108 virtual void drawEllipse(const QRect&);
109
111 virtual void drawPath(const QPainterPath&);
112
114 virtual void drawPoints(const QPointF*, int );
116 virtual void drawPoints(const QPoint*, int );
117
119 virtual void drawPolygon( const QPointF*, int,
120 QPaintEngine::PolygonDrawMode );
121
123 virtual void drawPolygon( const QPoint*, int,
124 QPaintEngine::PolygonDrawMode );
125
127 virtual void drawPixmap(const QRectF&,
128 const QPixmap&, const QRectF&);
129
131 virtual void drawTextItem(const QPointF&, const QTextItem&);
132
134 virtual void drawTiledPixmap(const QRectF&,
135 const QPixmap&, const QPointF& );
136
138 virtual void drawImage(const QRectF&, const QImage&,
139 const QRectF&, Qt::ImageConversionFlags );
140
142 virtual void updateState( const QPaintEngineState& );
143
144 protected:
146 virtual QSize sizeMetrics() const = 0;
147
148 private:
149 class PaintEngine;
150 PaintEngine* m_engine;
151
152 class PrivateData;
153 PrivateData* m_data;
154};
155
156#endif
Definition qwt_null_paintdevice.cpp:43
一个不执行任何操作的空绘制设备
Definition qwt_null_paintdevice.h:55
Mode
绘制设备的渲染模式
Definition qwt_null_paintdevice.h:68
@ NormalMode
All vector graphic primitives are painted by corresponding draw methods
Definition qwt_null_paintdevice.h:70
@ PolygonPathMode
Vector graphic primitives (beside polygons) are mapped to QPainterPath
Definition qwt_null_paintdevice.h:73
virtual QSize sizeMetrics() const =0