QwtPainter(3) | Qwt User's Guide | QwtPainter(3) |
QwtPainter - A collection of QPainter workarounds.
#include <qwt_painter.h>
static void setPolylineSplitting (bool)
En/Disable line splitting for the raster paint engine. static bool
polylineSplitting ()
static void setRoundingAlignment (bool)
static bool roundingAlignment ()
static bool roundingAlignment (QPainter *)
static void drawText (QPainter *, double x, double y, const QString
&)
Wrapper for QPainter::drawText() static void drawText (QPainter *,
const QPointF &, const QString &)
Wrapper for QPainter::drawText() static void drawText (QPainter *,
double x, double y, double w, double h, int flags, const QString &)
Wrapper for QPainter::drawText() static void drawText (QPainter *,
const QRectF &, int flags, const QString &)
Wrapper for QPainter::drawText() static void drawSimpleRichText
(QPainter *, const QRectF &, int flags, const QTextDocument &)
static void drawRect (QPainter *, double x, double y, double w, double
h)
Wrapper for QPainter::drawRect() static void drawRect (QPainter *,
const QRectF &rect)
Wrapper for QPainter::drawRect() static void fillRect (QPainter *,
const QRectF &, const QBrush &)
Wrapper for QPainter::fillRect() static void drawEllipse (QPainter *,
const QRectF &)
Wrapper for QPainter::drawEllipse() static void drawPie (QPainter *,
const QRectF &, int a, int alen)
Wrapper for QPainter::drawPie() static void drawLine (QPainter *,
double x1, double y1, double x2, double y2)
Wrapper for QPainter::drawLine() static void drawLine (QPainter *,
const QPointF &p1, const QPointF &p2)
Wrapper for QPainter::drawLine() static void drawLine (QPainter *,
const QLineF &)
Wrapper for QPainter::drawLine() static void drawPolygon (QPainter *,
const QPolygonF &)
Wrapper for QPainter::drawPolygon() static void drawPolyline (QPainter
*, const QPolygonF &)
Wrapper for QPainter::drawPolyline() static void drawPolyline (QPainter
*, const QPointF *, int pointCount)
Wrapper for QPainter::drawPolyline() static void drawPolygon (QPainter
*, const QPolygon &)
Wrapper for QPainter::drawPolygon() static void drawPolyline (QPainter
*, const QPolygon &)
Wrapper for QPainter::drawPolyline() static void drawPolyline (QPainter
*, const QPoint *, int pointCount)
Wrapper for QPainter::drawPolyline() static void drawPoint (QPainter *,
const QPoint &)
Wrapper for QPainter::drawPoint() static void drawPoints (QPainter *,
const QPolygon &)
Wrapper for QPainter::drawPoints() static void drawPoints (QPainter *,
const QPoint *, int pointCount)
Wrapper for QPainter::drawPoints() static void drawPoint (QPainter *,
double x, double y)
Wrapper for QPainter::drawPoint() static void drawPoint (QPainter *,
const QPointF &)
Wrapper for QPainter::drawPoint() static void drawPoints (QPainter *,
const QPolygonF &)
Wrapper for QPainter::drawPoints() static void drawPoints (QPainter *,
const QPointF *, int pointCount)
Wrapper for QPainter::drawPoints() static void drawPath (QPainter *,
const QPainterPath &)
Wrapper for QPainter::drawPath() static void drawImage (QPainter *,
const QRectF &, const QImage &)
Wrapper for QPainter::drawImage() static void drawPixmap (QPainter *,
const QRectF &, const QPixmap &)
Wrapper for QPainter::drawPixmap() static void drawRoundFrame (QPainter
*, const QRectF &, const QPalette &, int lineWidth, int frameStyle)
static void drawRoundedFrame (QPainter *, const QRectF &, double
xRadius, double yRadius, const QPalette &, int lineWidth, int
frameStyle)
static void drawFrame (QPainter *, const QRectF &rect, const
QPalette &palette, QPalette::ColorRole foregroundRole, int frameWidth,
int midLineWidth, int frameStyle)
static void drawFocusRect (QPainter *, const QWidget *)
Draw a focus rectangle on a widget using its style. static void
drawFocusRect (QPainter *, const QWidget *, const QRect &)
Draw a focus rectangle on a widget using its style. static void
drawColorBar (QPainter *painter, const QwtColorMap &,
const QwtInterval &, const QwtScaleMap &,
Qt::Orientation, const QRectF &)
static bool isAligning (QPainter *painter)
static bool isX11GraphicsSystem ()
static void fillPixmap (const QWidget *, QPixmap &, const QPoint
&offset=QPoint())
static void drawBackgound (QPainter *painter, const QRectF &rect,
const QWidget *widget)
static QPixmap backingStore (QWidget *, const QSize &)
A collection of QPainter workarounds.
Returns:
Parameters:
Fill rect with the background of a widget
Parameters:
See also:
Draw a color bar into a rectangle
Parameters:
Draw a rectangular frame
Parameters:
Draw a rectangular frame with rounded borders
Parameters:
Draw a round frame
Parameters:
Draw a text document into a rectangle
Parameters:
Fill a pixmap with the content of a widget
In Qt >= 5.0 QPixmap::fill() is a nop, in Qt 4.x it is buggy for backgrounds with gradients. Thus fillPixmap() offers an alternative implementation.
Parameters:
See also:
Check if the painter is using a paint engine, that aligns coordinates to integers. Today these are all paint engines beside QPaintEngine::Pdf and QPaintEngine::SVG.
If we have an integer based paint engine it is also checked if the painter has a transformation matrix, that rotates or scales.
Parameters:
Returns:
See also:
Check is the application is running with the X11 graphics system that has some special capabilities that can be used for incremental painting to a widget.
Returns:
Returns:
See also:
Check whether coordinates should be rounded, before they are painted to a paint engine that rounds to integer values. For other paint engines ( PDF, SVG ), this flag has no effect.
Returns:
See also:
Returns:
Parameters:
En/Disable line splitting for the raster paint engine. In some Qt versions the raster paint engine paints polylines of many points much faster when they are split in smaller chunks: f.e all supported Qt versions >= Qt 5.0 when drawing an antialiased polyline with a pen width >=2.
Also the raster paint engine has a nasty bug in many versions ( Qt 4.8 - ... ) for short lines ( https://codereview.qt-project.org/#/c/99456 ), that is worked around in this mode.
The default setting is true.
See also:
Enable whether coordinates should be rounded, before they are painted to a paint engine that floors to integer values. For other paint engines ( PDF, SVG ) this flag has no effect. QwtPainter stores this flag only, the rounding itself is done in the painting code ( f.e the plot items ).
The default setting is true.
See also:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |