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 50 of file qwt_painter.h.
Public Types | |
enum | TextXorRopMode { XorRopTextNormal = 0, XorRopTextKeepFont = 1, XorRopTextKeepColor = 2 } |
Static Public Member Functions | |
void | setMetricsMap (const QPaintDevice *layout, const QPaintDevice *device) |
void | setMetricsMap (const QwtMetricsMap &) |
void | resetMetricsMap () |
const QwtMetricsMap & | metricsMap () |
void | setDeviceClipping (bool) |
bool | deviceClipping () |
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 | drawSimpleRichText (QPainter *, const QRect &, int flags, QSimpleRichText &) |
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) |
void | drawRoundFrame (QPainter *, const QRect &, int width, const QColorGroup &cg, bool sunken) |
QPointArray | clip (const QPointArray &) |
int | textXorRopMode () |
int | setTextXorRopMode (TextXorRopMode mode) |
|
Indicates a method to work around a bug in the drawing of text using the XorROP raster operator on the X Window system. Has no effect on other platforms.
|
|
Clip a point array. Definition at line 524 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.
|
|
Wrapper for QPainter::drawEllipse() Definition at line 195 of file qwt_painter.cpp. Referenced by QwtSymbol::draw(), and QwtPicker::drawRubberBand(). |
|
Wrapper for QPainter::drawLine() Definition at line 443 of file qwt_painter.cpp. References drawPolyline(). |
|
Wrapper for QPainter::drawLine() Definition at line 481 of file qwt_painter.cpp. Referenced by QwtSymbol::draw(), QwtMarker::draw(), QwtGrid::draw(), QwtScaleDraw::drawBackbone(), QwtLegendItem::drawIdentifier(), QwtPicker::drawRubberBand(), QwtCurve::drawSticks(), and QwtScaleDraw::drawTick(). |
|
Wrapper for QPainter::drawPoint() Definition at line 513 of file qwt_painter.cpp. Referenced by QwtCurve::drawDots(). |
|
Wrapper for QPainter::drawPolygon() Definition at line 490 of file qwt_painter.cpp. References clip(). Referenced by QwtSymbol::draw(), QwtCurve::drawDots(), QwtCurve::drawLines(), QwtCurve::drawSpline(), and QwtCurve::drawSteps(). |
|
Wrapper for QPainter::drawPolyline() Definition at line 501 of file qwt_painter.cpp. References clip(). Referenced by drawLine(), QwtCurve::drawLines(), QwtCurve::drawSpline(), and QwtCurve::drawSteps(). |
|
Wrapper for QPainter::drawRect() Definition at line 168 of file qwt_painter.cpp. |
|
Wrapper for QPainter::drawRect() Definition at line 160 of file qwt_painter.cpp. Referenced by QwtRichText::draw(), QwtPlainText::draw(), QwtSymbol::draw(), QwtPicker::drawRubberBand(), and QwtPlot::printCanvas(). |
|
Draw a round frame. Definition at line 560 of file qwt_painter.cpp. Referenced by QwtDial::drawFrame(). |
|
Wrapper for QSimpleRichText::draw() Definition at line 357 of file qwt_painter.cpp. Referenced by QwtRichText::draw(). |
|
Wrapper for QPainter::drawText() Definition at line 293 of file qwt_painter.cpp. |
|
Wrapper for QPainter::drawText() Definition at line 284 of file qwt_painter.cpp. References drawText(). |
|
Wrapper for QPainter::drawText() Definition at line 217 of file qwt_painter.cpp. |
|
Wrapper for QPainter::drawText() Definition at line 208 of file qwt_painter.cpp. Referenced by QwtPlainText::draw(), QwtScaleDraw::drawLabel(), and drawText(). |
|
Wrapper for QPainter::fillRect() Definition at line 181 of file qwt_painter.cpp. Referenced by QwtPlot::printCanvas(). |
|
Referenced by QwtMarker::draw(), QwtLegendItem::drawIdentifier(), QwtLegendItem::drawItem(), and QwtPlot::print(). |
|
Reset the metrics map to the ratio 1:1 Definition at line 136 of file qwt_painter.cpp.Referenced by QwtPlot::print(). |
|
Wrapper for QPainter::setClipRect() Definition at line 152 of file qwt_painter.cpp. Referenced by QwtPlot::printCanvas(), and QwtPlot::printLegend(). |
|
En/Disable device clipping. On X11 the default for device clipping is enabled, otherwise it is disabled.
|
|
Change the metrics map Definition at line 127 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()
Referenced by QwtPlot::print(). |
|
Selects a method to work around a bug in the drawing of text using the XorROP raster operator on the X Window system. Has no effect on other platforms.
|
|
Return the method to work around a bug in the drawing of text using the XorROP raster operator on the X Window system.
|