QWT API (中文) 7.3.0
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
45class QWT_EXPORT QwtNullPaintDevice : public QPaintDevice
46{
47public:
52 enum Mode
53 {
56
59
61 PathMode
62 };
63
67 ~QwtNullPaintDevice() override;
68
70 void setMode(Mode);
72 Mode mode() const;
73
75 virtual QPaintEngine* paintEngine() const override;
76
78 virtual int metric(PaintDeviceMetric) const override;
79
81 virtual void drawRects(const QRect*, int);
83 virtual void drawRects(const QRectF*, int);
84
86 virtual void drawLines(const QLine*, int);
88 virtual void drawLines(const QLineF*, int);
89
91 virtual void drawEllipse(const QRectF&);
93 virtual void drawEllipse(const QRect&);
94
96 virtual void drawPath(const QPainterPath&);
97
99 virtual void drawPoints(const QPointF*, int);
101 virtual void drawPoints(const QPoint*, int);
102
104 virtual void drawPolygon(const QPointF*, int, QPaintEngine::PolygonDrawMode);
105
107 virtual void drawPolygon(const QPoint*, int, QPaintEngine::PolygonDrawMode);
108
110 virtual void drawPixmap(const QRectF&, const QPixmap&, const QRectF&);
111
113 virtual void drawTextItem(const QPointF&, const QTextItem&);
114
116 virtual void drawTiledPixmap(const QRectF&, const QPixmap&, const QPointF&);
117
119 virtual void drawImage(const QRectF&, const QImage&, const QRectF&, Qt::ImageConversionFlags);
120
122 virtual void updateState(const QPaintEngineState&);
123
124protected:
126 virtual QSize sizeMetrics() const = 0;
127
128private:
129 class PaintEngine;
130 PaintEngine* m_engine;
131
132 QWT_DECLARE_PRIVATE(QwtNullPaintDevice)
133};
134
135#endif
Definition qwt_null_paintdevice.cpp:43
A null paint device that does nothing
Definition qwt_null_paintdevice.h:46
Mode
Render mode for the paint device
Definition qwt_null_paintdevice.h:53
@ NormalMode
All vector graphic primitives are painted by corresponding draw methods
Definition qwt_null_paintdevice.h:55
@ PolygonPathMode
Vector graphic primitives (beside polygons) are mapped to QPainterPath
Definition qwt_null_paintdevice.h:58
virtual QSize sizeMetrics() const =0