#include <qwt_painter.h>
Static Public Member Functions | |
| void | setScaleMetrics (const QPaintDevice *, const QPaintDevice *) |
| void | resetScaleMetrics () |
| double | scaleMetricsX () |
| double | scaleMetricsY () |
| void | setDeviceClipping (bool) |
| bool | deviceClipping () |
| QRect | invScale (const QRect &, const QPainter *=NULL) |
| QPoint | invScale (const QPoint &, const QPainter *=NULL) |
| QRect | scale (const QRect &, const QPainter *=NULL) |
| QPoint | scale (const QPoint &, const QPainter *=NULL) |
| QPointArray | scale (const QPointArray &, const QPainter *=NULL) |
| void | setClipRect (QPainter *, const QRect &) |
| void | drawText (QPainter *, int x, int y, const QString &, int len=-1) |
| void | drawText (QPainter *, const QPoint &, const QString &, int len=-1) |
| void | drawText (QPainter *, int x, int y, int w, int h, int flags, const QString &, int len=-1) |
| void | drawText (QPainter *, const QRect &, int flags, const QString &, int len=-1) |
| void | drawRect (QPainter *, int x, int y, int w, int h) |
| void | drawRect (QPainter *, const QRect &rect) |
| void | fillRect (QPainter *, const QRect &, const QBrush &) |
| void | drawEllipse (QPainter *, const QRect &) |
| void | drawLine (QPainter *, int x1, int y1, int x2, int y2) |
| void | drawLine (QPainter *, const QPoint &p1, const QPoint &p2) |
| void | drawPolygon (QPainter *, const QPointArray &pa) |
| void | drawPolyline (QPainter *, const QPointArray &pa) |
| void | drawPoint (QPainter *, int x, int y) |
| QRect | map (const QWMatrix &, const QRect &) |
| QPointArray | map (const QWMatrix &, const QPointArray &) |
| void | drawRoundFrame (QPainter *, const QRect &, int width, bool sunken) |
Static Private Member Functions | |
| const QRect & | deviceClipRect () |
| bool | insideEdge (const QPoint &p, const QRect &r, int edge) |
| QPoint | intersectEdge (const QPoint &p1, const QPoint &p2, const QRect &r, int edge) |
| QPointArray | clipPolyline (const QRect &r, const QPointArray &pa, int &index, int &npoints) |
| QPointArray | clip (const QPointArray &) |
Static Private Attributes | |
| bool | d_deviceClipping = FALSE |
| double | d_scaleMetricsX = 1.0 |
| double | d_scaleMetricsY = 1.0 |
1) Clipping to coordinate system limits
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).
3) Hide some Qt2/3 incompatibilities
Definition at line 51 of file qwt_painter.h.
|
|
Definition at line 438 of file qwt_painter.cpp. References clipPolyline(), and deviceClipRect(). Referenced by deviceClipRect(), drawPolygon(), and drawPolyline(). |
|
||||||||||||||||||||
|
Sutherland-Hodgman polygon clipping Definition at line 502 of file qwt_painter.cpp. References insideEdge(), and intersectEdge(). Referenced by clip(). |
|
|
Returns whether device clipping is enabled. On X11 the default is enabled, otherwise it is disabled.
Definition at line 43 of file qwt_painter.cpp. References d_deviceClipping. |
|
|
Returns rect for device clipping
Definition at line 52 of file qwt_painter.cpp. References clip(), QWT_COORD_MAX, and QWT_COORD_MIN. Referenced by clip(), drawLine(), and drawPoint(). |
|
||||||||||||
|
Wrapper for QPainter::drawEllipse() Definition at line 332 of file qwt_painter.cpp. References scale(). Referenced by QwtSymbol::draw(). |
|
||||||||||||||||
|
Wrapper for QPainter::drawLine() Definition at line 377 of file qwt_painter.cpp. References d_deviceClipping, deviceClipRect(), drawPolyline(), and scale(). |
|
||||||||||||||||||||||||
|
Wrapper for QPainter::drawLine() Definition at line 398 of file qwt_painter.cpp. Referenced by QwtSymbol::draw(), QwtMarker::draw(), QwtGrid::draw(), QwtScaleDraw::drawBackbone(), QwtPlotCanvas::drawOutline(), QwtCurve::drawSticks(), and QwtScaleDraw::drawTick(). |
|
||||||||||||||||
|
Wrapper for QPainter::drawPoint() Definition at line 430 of file qwt_painter.cpp. References d_deviceClipping, deviceClipRect(), and scale(). Referenced by QwtCurve::drawDots(). |
|
||||||||||||
|
Wrapper for QPainter::drawPolygon() Definition at line 407 of file qwt_painter.cpp. References clip(), d_deviceClipping, and scale(). Referenced by QwtSymbol::draw(), QwtCurve::drawDots(), QwtCurve::drawLines(), QwtCurve::drawSpline(), and QwtCurve::drawSteps(). |
|
||||||||||||
|
Wrapper for QPainter::drawPolyline() Definition at line 418 of file qwt_painter.cpp. References clip(), d_deviceClipping, and scale(). Referenced by drawLine(), QwtCurve::drawLines(), QwtCurve::drawSpline(), and QwtCurve::drawSteps(). |
|
||||||||||||
|
Wrapper for QPainter::drawRect() Definition at line 315 of file qwt_painter.cpp. References scale(). |
|
||||||||||||||||||||||||
|
Wrapper for QPainter::drawRect() Definition at line 307 of file qwt_painter.cpp. Referenced by QwtSymbol::draw(), QwtPlotCanvas::drawOutline(), and QwtPlot::printCanvas(). |
|
||||||||||||||||||||
|
Definition at line 557 of file qwt_painter.cpp. Referenced by QwtDial::drawFrame(), and QwtCompassNeedle4::drawNeedle(). |
|
||||||||||||||||||||||||
|
Wrapper for QPainter::drawText() Definition at line 367 of file qwt_painter.cpp. References scale(). |
|
||||||||||||||||||||||||||||||||||||
|
Wrapper for QPainter::drawText() Definition at line 358 of file qwt_painter.cpp. References drawText(). |
|
||||||||||||||||||||
|
Wrapper for QPainter::drawText() Definition at line 349 of file qwt_painter.cpp. References scale(). |
|
||||||||||||||||||||||||
|
Wrapper for QPainter::drawText() Definition at line 340 of file qwt_painter.cpp. Referenced by QwtMarker::draw(), QwtLegendButton::drawContents(), QwtScaleDraw::drawLabel(), drawText(), QwtScale::drawTitle(), and QwtPlot::printTitle(). |
|
||||||||||||||||
|
Wrapper for QPainter::fillRect() Definition at line 323 of file qwt_painter.cpp. References scale(). Referenced by QwtPlot::printCanvas(). |
|
||||||||||||||||
|
Definition at line 446 of file qwt_painter.cpp. Referenced by clipPolyline(). |
|
||||||||||||||||||||
|
Definition at line 463 of file qwt_painter.cpp. Referenced by clipPolyline(). |
|
||||||||||||
|
Scale a point, with inverted scale metrics
Definition at line 277 of file qwt_painter.cpp. References d_scaleMetricsX, d_scaleMetricsY, and qwtInt. |
|
||||||||||||
|
Scale a rect, with inverted scale metrics
Definition at line 242 of file qwt_painter.cpp. References d_scaleMetricsX, d_scaleMetricsY, map(), and qwtInt. Referenced by QwtPlot::print(). |
|
||||||||||||
|
QPointArray QWMatrix::operator*(const QPointArray &) const. Hides Qt2/3 incompatibilities. Definition at line 132 of file qwt_painter.cpp. |
|
||||||||||||
|
Wrapper for QWMatrix::mapRect. Hides Qt2/3 incompatibilities. Definition at line 118 of file qwt_painter.cpp. Referenced by invScale(), QwtScaleDraw::labelBoundingRect(), and scale(). |
|
|
Disable scaling
Definition at line 91 of file qwt_painter.cpp. References d_scaleMetricsX, and d_scaleMetricsY. Referenced by QwtPlot::print(), and setScaleMetrics(). |
|
||||||||||||
|
Scale a point array.
Definition at line 211 of file qwt_painter.cpp. References d_scaleMetricsX, d_scaleMetricsY, and map(). |
|
||||||||||||
|
Scale a rectangle.
Definition at line 184 of file qwt_painter.cpp. References d_scaleMetricsX, d_scaleMetricsY, and qwtInt. |
|
||||||||||||
|
Scale a rectangle.
Definition at line 148 of file qwt_painter.cpp. References d_scaleMetricsX, d_scaleMetricsY, map(), and qwtInt. Referenced by drawEllipse(), QwtLegendButton::drawIdentifier(), drawLine(), drawPoint(), drawPolygon(), drawPolyline(), drawRect(), drawText(), fillRect(), QwtPlot::print(), and setClipRect(). |
|
|
Return the x-scaling factor Definition at line 100 of file qwt_painter.cpp. References d_scaleMetricsX. Referenced by QwtPlot::print(). |
|
|
Return the y-scaling factor Definition at line 109 of file qwt_painter.cpp. References d_scaleMetricsY. Referenced by QwtPlot::print(). |
|
||||||||||||
|
Wrapper for QPainter::setClipRect() Definition at line 299 of file qwt_painter.cpp. References scale(). Referenced by QwtPlot::printCanvas(), and QwtPlot::printLegend(). |
|
|
En/Disable device clipping. On X11 the default for device clipping is enabled, otherwise it is disabled.
Definition at line 32 of file qwt_painter.cpp. References d_deviceClipping. |
|
||||||||||||
|
Scale all QwtPainter drawing operations using the ratio QwtPaintMetrics(from).logicalDpiX() / QwtPaintMetrics(to).logicalDpiX() and QwtPaintMetrics(from).logicalDpiY() / QwtPaintMetrics(to).logicalDpiY()
Definition at line 72 of file qwt_painter.cpp. References d_scaleMetricsX, d_scaleMetricsY, and resetScaleMetrics(). Referenced by QwtPlot::print(). |
|
|
Definition at line 21 of file qwt_painter.cpp. Referenced by deviceClipping(), drawLine(), drawPoint(), drawPolygon(), drawPolyline(), and setDeviceClipping(). |
|
|
Definition at line 24 of file qwt_painter.cpp. Referenced by invScale(), resetScaleMetrics(), scale(), scaleMetricsX(), and setScaleMetrics(). |
|
|
Definition at line 25 of file qwt_painter.cpp. Referenced by invScale(), resetScaleMetrics(), scale(), scaleMetricsY(), and setScaleMetrics(). |
1.3.2