Qt:Документация 4.3.2/qrasterpaintengine
Материал из Wiki.crossplatform.ru
Внимание: Актуальная версия перевода документации находится здесь |
__NOTOC__
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции |
[править] QRasterPaintEngine Class Reference
[модуль QtGui ]
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qtopia Core. Далее...
#include <QRasterPaintEngine>
This class is under development and is subject to change.
Inherits QPaintEngine.
Класс был добавлен в Qt 4.2.
[править] Открытые функции
- QRasterPaintEngine ()
- ~QRasterPaintEngine ()
- virtual void drawBufferSpan ( const uint * buffer, int size, int x, int y, int length, uint alpha )
- virtual void drawColorSpans ( const QSpan * spans, int count, uint color )
- virtual void drawEllipse ( const QRect & rect )
- virtual void drawPoints ( const QPoint * points, int pointCount )
- 24 public functions inherited from QPaintEngine
[править] Связанные не-члены
- typedef QSpan
[править] Подробное описание
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qtopia Core.
Note that this functionality is only available in Qtopia Core.
In Qtopia Core, painting is a pure software implementation. But starting with Qtopia Core 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 Qtopia Core 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 in Qtopia Core documentation for details.
See also QCustomRasterPaintDevice and QPaintEngine.
[править] Описание функций-членов
[править] QRasterPaintEngine::QRasterPaintEngine ()
Creates a raster based paint engine with the complete set of paint engine features and capabilities.
[править] QRasterPaintEngine::~QRasterPaintEngine ()
Destroys this paint engine.
[править] 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 QRect & rect ) [virtual]
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
Reimplemented from QPaintEngine.
[править] void QRasterPaintEngine::drawPoints ( const QPoint * points, int pointCount ) [virtual]
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.
Reimplemented from QPaintEngine.
[править] Связанные не-члены
[править] 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).
Copyright © 2007 Trolltech | Trademarks | Qt 4.3.2
|