Qt 5.6 | Qt GUI | C++ Classes | QRasterPaintEngine

Qt 5.6.2 Reference Documentation

# QRasterPaintEngine Class

The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded Linux. More...

Header: | #include <QRasterPaintEngine>
qmake: | QT += gui
Since: | Qt 4.2
Inherits: | QPaintEngineEx

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Functions

| QRasterPaintEngine(QPaintDevice *device)
| ~QRasterPaintEngine()

## Reimplemented Public Functions

virtual bool | begin(QPaintDevice *device)
virtual void | drawEllipse(const QRectF &rect)
virtual void | drawImage(const QRectF &r, const QImage &img, const QRectF &sr, Qt::ImageConversionFlags flags = Qt::AutoColor)
virtual void | drawLines(const QLine *lines, int lineCount)
virtual void | drawLines(const QLineF *lines, int lineCount)
virtual void | drawPixmap(const QRectF &r, const QPixmap &pixmap, const QRectF &sr)
virtual void | drawPoints(const QPointF *points, int pointCount)
virtual void | drawPoints(const QPoint *points, int pointCount)
virtual void | drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
virtual void | drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
virtual void | drawRects(const QRect *rects, int rectCount)
virtual void | drawRects(const QRectF *rects, int rectCount)
virtual void | drawStaticTextItem(QStaticTextItem *textItem)
virtual void | drawTextItem(const QPointF &p, const QTextItem &textItem)
virtual void | drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &sr)
virtual bool | end()
virtual void | fillRect(const QRectF &r, const QBrush &brush)
virtual void | fillRect(const QRectF &r, const QColor &color)
virtual bool | shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
virtual Type | type() const

- 47 public functions inherited from QPaintEngineEx
- 24 public functions inherited from QPaintEngine

## Related Non-Members

typedef | QSpan

## Detailed Description

The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded Linux.

Note that this functionality is only available in Qt for Embedded Linux.

In Qt for Embedded Linux, painting is a pure software implementation. But starting with Qt 4.2, it is possible to add an accelerated graphics driver to take advantage of available hardware resources.

Hardware acceleration is accomplished by creating a custom screen driver, accelerating the copying from memory to the screen, and implementing a custom paint engine accelerating the various painting operations. Then a custom paint device and a custom window surface must be implemented to make Qt for Embedded Linux aware of the accelerated driver.

Note: The QRasterPaintEngine class does not support 8-bit images. Instead, they need to be converted to a supported format, such as QImage::Format_ARGB32_Premultiplied.

See also QPaintEngine.

## Member Function Documentation

### QRasterPaintEngine::QRasterPaintEngine(QPaintDevice *device)

Creates a raster based paint engine for operating on the given device, with the complete set of paint engine features and capabilities.

This function was introduced in Qt 4.5.

### QRasterPaintEngine::~QRasterPaintEngine()

Destroys this paint engine.

### `[virtual]` bool QRasterPaintEngine::begin(QPaintDevice *device)

Reimplemented from QPaintEngine::begin().

### `[virtual]` void QRasterPaintEngine::drawEllipse(const QRectF &rect)

Reimplemented from QPaintEngine::drawEllipse().

### `[virtual]` void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRectF &sr, Qt::ImageConversionFlags flags = Qt::AutoColor)

Reimplemented from QPaintEngine::drawImage().

### `[virtual]` void QRasterPaintEngine::drawLines(const QLine *lines, int lineCount)

Reimplemented from QPaintEngine::drawLines().

### `[virtual]` void QRasterPaintEngine::drawLines(const QLineF *lines, int lineCount)

Reimplemented from QPaintEngine::drawLines().

### `[virtual]` void QRasterPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, const QRectF &sr)

Reimplemented from QPaintEngine::drawPixmap().

### `[virtual]` void QRasterPaintEngine::drawPoints(const QPointF *points, int pointCount)

Reimplemented from QPaintEngine::drawPoints().

### `[virtual]` void QRasterPaintEngine::drawPoints(const QPoint *points, int pointCount)

Reimplemented from QPaintEngine::drawPoints().

This is an overloaded function.

### `[virtual]` void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)

Reimplemented from QPaintEngine::drawPolygon().

### `[virtual]` void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)

Reimplemented from QPaintEngine::drawPolygon().

### `[virtual]` void QRasterPaintEngine::drawRects(const QRect *rects, int rectCount)

Reimplemented from QPaintEngine::drawRects().

### `[virtual]` void QRasterPaintEngine::drawRects(const QRectF *rects, int rectCount)

Reimplemented from QPaintEngine::drawRects().

### `[virtual]` void QRasterPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)

### `[virtual]` void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)

Reimplemented from QPaintEngine::drawTextItem().

### `[virtual]` void QRasterPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &sr)

Reimplemented from QPaintEngine::drawTiledPixmap().

### `[virtual]` bool QRasterPaintEngine::end()

Reimplemented from QPaintEngine::end().

### `[virtual]` void QRasterPaintEngine::fillRect(const QRectF &r, const QBrush &brush)

### `[virtual]` void QRasterPaintEngine::fillRect(const QRectF &r, const QColor &color)

### `[virtual]` bool QRasterPaintEngine::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const

Indicates whether glyph caching is supported by the font engine fontEngine with the given transform m applied.

### `[virtual]` Type QRasterPaintEngine::type() const

Reimplemented from QPaintEngine::type().

## Related Non-Members

### typedef QSpan

A struct equivalent to QT_FT_Span, containing a position (x, y), the span's length in pixels and its color/coverage (a value ranging from 0 to 255).