QCustomRasterPaintDevice Class

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

头: #include <QCustomRasterPaintDevice>
Since: Qt 4.2
继承: QPaintDevice

该类在开发且可能改变。

公共函数

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

重实现公共函数

virtual int metric (PaintDeviceMetric m ) const

额外继承成员

详细描述

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

注意,此类只可用于 Qt for Embedded Linux .

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.

Adding an Accelerated Graphics Driver to Qt for Embedded Linux 文档编制了解细节。

另请参阅 QRasterPaintEngine and QPaintDevice .

成员函数文档编制

QCustomRasterPaintDevice:: QCustomRasterPaintDevice ( QWidget * widget )

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

[虚拟] 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.

[虚拟] QImage::Format QCustomRasterPaintDevice:: format () const

Returns the format of the device's memory buffet.

默认格式为 QImage::Format_ARGB32_Premultiplied . The only other valid format is QImage::Format_RGB16 .

[虚拟] void * QCustomRasterPaintDevice:: memory () const

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

[虚拟] int QCustomRasterPaintDevice:: metric ( PaintDeviceMetric m ) const

重实现自 QPaintDevice::metric ().