|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QRasterPaintEngine Class Reference
[QtGui module]

The QRasterPaintEngine class enables acceleration of painting operations using the available hardware. More...

     #include <QRasterPaintEngine>

This class is under development and is subject to change.

Inherits QPaintEngine.

This class was introduced in Qt 4.2.

- List of all members, including inherited members

### Public Functions

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

- 24 public functions inherited from QPaintEngine

### Related Non-Members

- typedef QSpan

## Detailed Description

The QRasterPaintEngine class enables acceleration of painting operations using the available hardware.

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.

The painting operations can be accelerated by deriving from the QRasterPaintEngine and QCustomRasterPaintDevice classes. Note that there are several other issues to be aware of; see the Adding an Accelerated Graphics Driver in Qtopia Core documentation for details.

See also QCustomRasterPaintDevice and QPaintEngine.

## Member Function Documentation

### QRasterPaintEngine::QRasterPaintEngine ()

Creates a raster based paint engine with the complete set of paint engine features and capabilities.

### QRasterPaintEngine::~QRasterPaintEngine ()

Destroys the paint engine.

### void QRasterPaintEngine::drawBufferSpan ( const uint * buffer, int size, int x, int y, int length, uint alpha ) `[virtual]`

Reimplement this function to draw a buffer that contains more than one color.

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.

Note that this function must be reimplemented on devices where the framebuffer is not memory-mapped.

See also drawColorSpans().

### void QRasterPaintEngine::drawColorSpans ( const QSpan * spans, int count, uint color ) `[virtual]`

Reimplement this function to draw the given color spans with the specified color. The count parameter specified the number of spans.

Note that this function must be reimplemented on devices where the framebuffer is not memory-mapped.

See also drawBufferSpan().

## Related Non-Members

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