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 ().