1) Clipping to coordinate system limits (Qt3 only)
On X11 pixel coordinates are stored in shorts. Qt produces overruns when mapping QCOORDS to shorts.
2) Scaling to device metrics
QPainter scales fonts, line and fill patterns to the metrics of the paint device. Other values like the geometries of rects, points remain device independend. To enable a device independent widget implementation, QwtPainter adds scaling of these geometries. (Unfortunately QPainter::scale scales both types of paintings, so the objects of the first type would be scaled twice).
Definition at line 62 of file qwt_painter.h.
Static Public Member Functions | |
static void | setMetricsMap (const QPaintDevice *layout, const QPaintDevice *device) |
static void | setMetricsMap (const QwtMetricsMap &) |
static void | resetMetricsMap () |
static const QwtMetricsMap & | metricsMap () |
static void | setDeviceClipping (bool) |
static bool | deviceClipping () |
static void | setClipRect (QPainter *, const QRect &) |
static void | drawText (QPainter *, int x, int y, const QString &) |
static void | drawText (QPainter *, const QPoint &, const QString &) |
static void | drawText (QPainter *, int x, int y, int w, int h, int flags, const QString &) |
static void | drawText (QPainter *, const QRect &, int flags, const QString &) |
static void | drawSimpleRichText (QPainter *, const QRect &, int flags, QTextDocument &) |
static void | drawRect (QPainter *, int x, int y, int w, int h) |
static void | drawRect (QPainter *, const QRect &rect) |
static void | fillRect (QPainter *, const QRect &, const QBrush &) |
static void | drawEllipse (QPainter *, const QRect &) |
static void | drawPie (QPainter *, const QRect &r, int a, int alen) |
static void | drawLine (QPainter *, int x1, int y1, int x2, int y2) |
static void | drawLine (QPainter *, const QPoint &p1, const QPoint &p2) |
static void | drawPolygon (QPainter *, const QwtPolygon &pa) |
static void | drawPolyline (QPainter *, const QwtPolygon &pa) |
static void | drawPoint (QPainter *, int x, int y) |
static void | drawRoundFrame (QPainter *, const QRect &, int width, const QPalette &, bool sunken) |
static void | drawFocusRect (QPainter *, QWidget *) |
static void | drawFocusRect (QPainter *, QWidget *, const QRect &) |
static QwtPolygon | clip (const QwtPolygon &) |
static void | drawColorBar (QPainter *painter, const QwtColorMap &, const QwtDoubleInterval &, const QwtScaleMap &, Qt::Orientation, const QRect &) |
|
Clip a point array.
Definition at line 95 of file qwt_painter.cpp. References QwtRect::clip(). Referenced by drawPolygon(), and drawPolyline(). |
|
Returns whether device clipping is enabled. On X11 the default is enabled, otherwise it is disabled.
Definition at line 73 of file qwt_painter.cpp. |
|
Wrapper for QPainter::drawEllipse() Definition at line 295 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). Referenced by QwtSymbol::draw(), and QwtPicker::drawRubberBand(). |
|
Wrapper for QPainter::drawLine().
Definition at line 143 of file qwt_painter.h. References drawLine(). |
|
Wrapper for QPainter::drawLine() Definition at line 438 of file qwt_painter.cpp. References drawPolyline(), and QwtMetricsMap::isIdentity(). Referenced by QwtSymbol::draw(), QwtPlotMarker::draw(), QwtScaleDraw::drawBackbone(), QwtPlotSpectrogram::drawContourLines(), QwtLegendItem::drawIdentifier(), drawLine(), QwtPicker::drawRubberBand(), QwtPlotCurve::drawSticks(), and QwtRoundScaleDraw::drawTick(). |
|
Wrapper for QPainter::drawPie() Definition at line 280 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). |
|
Wrapper for QPainter::drawPoint() Definition at line 548 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). Referenced by QwtPlotCurve::drawDots(). |
|
Wrapper for QPainter::drawPolygon() Definition at line 488 of file qwt_painter.cpp. References clip(), and QwtMetricsMap::layoutToDevice(). Referenced by QwtSymbol::draw(), and QwtPlotCurve::fillCurve(). |
|
Wrapper for QPainter::drawPolyline() Definition at line 505 of file qwt_painter.cpp. References clip(), and QwtMetricsMap::layoutToDevice(). Referenced by drawLine(), and drawRect(). |
|
Wrapper for QPainter::drawRect() Definition at line 185 of file qwt_painter.cpp. References drawPolyline(), fillRect(), and QwtMetricsMap::layoutToDevice(). |
|
Wrapper for QPainter::drawRect() Definition at line 177 of file qwt_painter.cpp. Referenced by QwtText::draw(), QwtSymbol::draw(), drawColorBar(), and QwtPicker::drawRubberBand(). |
|
Draw a round frame.
Definition at line 622 of file qwt_painter.cpp. Referenced by QwtDial::drawFrame(). |
|
Wrapper for QSimpleRichText::draw() Definition at line 405 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). Referenced by QwtRichTextEngine::draw(). |
|
Wrapper for QPainter::drawText() Definition at line 358 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). |
|
Wrapper for QPainter::drawText() Definition at line 349 of file qwt_painter.cpp. References drawText(). |
|
Wrapper for QPainter::drawText() Definition at line 333 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). |
|
Wrapper for QPainter::drawText() Definition at line 324 of file qwt_painter.cpp. Referenced by QwtPlainTextEngine::draw(), and drawText(). |
|
Wrapper for QPainter::fillRect() Definition at line 242 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). Referenced by drawRect(). |
|
Definition at line 161 of file qwt_painter.cpp. Referenced by QwtText::draw(), QwtSymbol::draw(), QwtLegendItem::drawIdentifier(), QwtLegendItem::drawItem(), QwtPlotCurve::drawSymbols(), QwtScaleDraw::drawTick(), QwtText::heightForWidth(), QwtPlot::print(), and QwtPlot::printScale(). |
|
Reset the metrics map to the ratio 1:1 Definition at line 153 of file qwt_painter.cpp. Referenced by QwtScaleDraw::drawTick(). |
|
Wrapper for QPainter::setClipRect() Definition at line 169 of file qwt_painter.cpp. References QwtMetricsMap::layoutToDevice(). Referenced by drawColorBar(), and QwtPlot::printLegend(). |
|
En/Disable device clipping. On X11 the default for device clipping is enabled, otherwise it is disabled.
Definition at line 62 of file qwt_painter.cpp. |
|
Change the metrics map Definition at line 144 of file qwt_painter.cpp. |
|
Scale all QwtPainter drawing operations using the ratio QwtPaintMetrics(from).logicalDpiX() / QwtPaintMetrics(to).logicalDpiX() and QwtPaintMetrics(from).logicalDpiY() / QwtPaintMetrics(to).logicalDpiY()
Definition at line 134 of file qwt_painter.cpp. References QwtMetricsMap::setMetrics(). Referenced by QwtPlot::print(). |