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 (derived from the QCustomRasterPaintDevice class) and a custom window surface (derived from QWSWindowSurface) 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 the Adding an Accelerated Graphics Driver to Qt for Embedded Linux documentation for details.
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.
bool QRasterPaintEngine::begin ( QPaintDevice * device ) [virtual]
Reimplemented from QPaintEngine::begin().
void QRasterPaintEngine::drawBufferSpan ( const uint * buffer, int size, int x, int y, int length, uint alpha ) [virtual]
Draws the given buffer.
The default implementation does nothing; reimplement this function to draw a buffer that contains more than one color. Note that this function must be reimplemented if the framebuffer is not memory-mapped.
The size parameter specifies the total size of the given buffer, while the length parameter specifies the number of pixels to draw. The buffer's position is given by (x, y). The provided alpha value is added to each pixel in the buffer when drawing.
See also drawColorSpans().
void QRasterPaintEngine::drawColorSpans ( const QSpan * spans, int count, uint color ) [virtual]
Draws the given color spans with the specified color. The count parameter specifies the number of spans.
The default implementation does nothing; reimplement this function to draw the given color spans with the specified color. Note that this function must be reimplemented if the framebuffer is not memory-mapped.
See also drawBufferSpan().
void QRasterPaintEngine::drawEllipse ( const QRectF & rect ) [virtual]
Reimplemented from QPaintEngine::drawEllipse().
void QRasterPaintEngine::drawEllipse ( const QRect & rect ) [virtual]
Reimplemented from QPaintEngine::drawEllipse().
This is an overloaded function.
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
void QRasterPaintEngine::drawImage ( const QRectF & r, const QImage & img, const QRectF & sr, Qt::ImageConversionFlags falgs = Qt::AutoColor ) [virtual]
Reimplemented from QPaintEngine::drawImage().
void QRasterPaintEngine::drawLines ( const QLine * lines, int lineCount ) [virtual]
Reimplemented from QPaintEngine::drawLines().
void QRasterPaintEngine::drawLines ( const QLineF * lines, int lineCount ) [virtual]
Reimplemented from QPaintEngine::drawLines().
void QRasterPaintEngine::drawPixmap ( const QRectF & r, const QPixmap & pixmap, const QRectF & sr ) [virtual]
Reimplemented from QPaintEngine::drawPixmap().
void QRasterPaintEngine::drawPoints ( const QPointF * points, int pointCount ) [virtual]
Reimplemented from QPaintEngine::drawPoints().
void QRasterPaintEngine::drawPoints ( const QPoint * points, int pointCount ) [virtual]
Reimplemented from QPaintEngine::drawPoints().
This is an overloaded function.
Draws the first pointCount points in the buffer points
The default implementation converts the first pointCount QPoints in points to QPointFs and calls the floating point version of drawPoints.
void QRasterPaintEngine::drawPolygon ( const QPointF * points, int pointCount, PolygonDrawMode mode ) [virtual]
Reimplemented from QPaintEngine::drawPolygon().
void QRasterPaintEngine::drawPolygon ( const QPoint * points, int pointCount, PolygonDrawMode mode ) [virtual]
Reimplemented from QPaintEngine::drawPolygon().
void QRasterPaintEngine::drawRects ( const QRect * rects, int rectCount ) [virtual]
Reimplemented from QPaintEngine::drawRects().
void QRasterPaintEngine::drawRects ( const QRectF * rects, int rectCount ) [virtual]
Reimplemented from QPaintEngine::drawRects().
void QRasterPaintEngine::drawStaticTextItem ( QStaticTextItem * textItem ) [virtual]
void QRasterPaintEngine::drawTextItem ( const QPointF & p, const QTextItem & textItem ) [virtual]
Reimplemented from QPaintEngine::drawTextItem().
void QRasterPaintEngine::drawTiledPixmap ( const QRectF & r, const QPixmap & pixmap, const QPointF & sr ) [virtual]
Reimplemented from QPaintEngine::drawTiledPixmap().
bool QRasterPaintEngine::end () [virtual]
Reimplemented from QPaintEngine::end().
void QRasterPaintEngine::fillRect ( const QRectF & r, const QBrush & brush ) [virtual]
void QRasterPaintEngine::fillRect ( const QRectF & r, const QColor & color ) [virtual]
Type QRasterPaintEngine::type () const [virtual]
Reimplemented from QPaintEngine::type().