#include <qwt_painter.h>
Static Public Methods | |
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 &) |
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
|
Returns whether device clipping is enabled. On X11 the default is enabled, otherwise it is disabled.
|
|
Wrapper for QPainter::drawEllipse() |
|
Wrapper for QPainter::drawLine() |
|
Wrapper for QPainter::drawLine() |
|
Wrapper for QPainter::drawPoint() |
|
Wrapper for QPainter::drawPolygon() |
|
Wrapper for QPainter::drawPolyline() |
|
Wrapper for QPainter::drawRect() |
|
Wrapper for QPainter::drawRect() |
|
Wrapper for QPainter::drawText() |
|
Wrapper for QPainter::drawText() |
|
Wrapper for QPainter::drawText() |
|
Wrapper for QPainter::drawText() |
|
Wrapper for QPainter::fillRect() |
|
Scale a point, with inverted scale metrics
|
|
Scale a rect, with inverted scale metrics
|
|
QPointArray QWMatrix::operator *(const QPointArray &) const. Hides Qt2/3 incompatibilities. |
|
Wrapper for QWMatrix::mapRect. Hides Qt2/3 incompatibilities. |
|
Disable scaling
|
|
Scale a point array.
|
|
Scale a rectangle.
|
|
Scale a rectangle.
|
|
Return the x-scaling factor
|
|
Return the y-scaling factor
|
|
Wrapper for QPainter::setClipRect() |
|
En/Disable device clipping. On X11 the default for device clipping is enabled, otherwise it is disabled.
|
|
Scale all QwtPainter drawing operations using the ratio QwtPaintMetrics(from).logicalDpiX() / QwtPaintMetrics(to).logicalDpiX() and QwtPaintMetrics(from).logicalDpiY() / QwtPaintMetrics(to).logicalDpiY()
|