QCustomRasterPaintDevice Class

The QCustomRasterPaintDevice class is provided to activate hardware accelerated paint engines in Qt for Embedded Linux. More...

Header: #include <QCustomRasterPaintDevice>
Since: Qt 4.2
Inherits: QPaintDevice

This class is under development and is subject to change.

Public Functions

QCustomRasterPaintDevice(QWidget * widget)
virtual int bytesPerLine() const
virtual QImage::Format format() const
virtual void * memory() const

Reimplemented Public Functions

virtual int metric(PaintDeviceMetric m) const

Additional Inherited Members

Detailed Description

The QCustomRasterPaintDevice class is provided to activate hardware accelerated paint engines in Qt for Embedded Linux.

Note that this class 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.

See the Adding an Accelerated Graphics Driver to Qt for Embedded Linux documentation for details.

See also QRasterPaintEngine and QPaintDevice.

Member Function Documentation

QCustomRasterPaintDevice::QCustomRasterPaintDevice(QWidget * widget)

Constructs a custom raster based paint device for the given top-level widget.

[virtual] int QCustomRasterPaintDevice::bytesPerLine() const

Returns the number of bytes per line in the framebuffer. Note that this number might be larger than the framebuffer width.

[virtual] QImage::Format QCustomRasterPaintDevice::format() const

Returns the format of the device's memory buffet.

The default format is QImage::Format_ARGB32_Premultiplied. The only other valid format is QImage::Format_RGB16.

[virtual] void * QCustomRasterPaintDevice::memory() const

Returns a pointer to the paint device's memory buffer, or 0 if no such buffer exists.

[virtual] int QCustomRasterPaintDevice::metric(PaintDeviceMetric m) const

Reimplemented from QPaintDevice::metric().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.