CopperSpice API  1.7.2
QRasterPaintEngine Class Reference

The QRasterPaintEngine class enables hardware acceleration of painting operations on Embedded Linux. More...

Inherits QPaintEngineEx.

Inherited by QBlitterPaintEngine.

Public Methods

 QRasterPaintEngine (QPaintDevice *device)
 
 ~QRasterPaintEngine ()
 
void alphaPenBlt (const void *src, int bpl, int depth, int rx, int ry, int w, int h)
 
bool begin (QPaintDevice *device) override
 
QRect clipBoundingRect () const
 
ClipType clipType () const
 
QPoint coordinateOffset () const override
 
virtual bool drawCachedGlyphs (int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QFontEngine *fontEngine)
 
void drawEllipse (const QRectF &rect) override
 
void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
 
void drawLines (const QLine *line, int lineCount) override
 
void drawLines (const QLineF *line, int lineCount) override
 
void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override
 
void drawPoints (const QPoint *points, int pointCount) override
 
void drawPoints (const QPointF *points, int pointCount) override
 
void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) override
 
void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 
void drawRects (const QRect *rects, int rectCount) override
 
void drawRects (const QRectF *rects, int rectCount) override
 
void drawStaticTextItem (QStaticTextItem *textItem) override
 
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 
void drawTiledPixmap (const QRectF &r, const QPixmap &pm, const QPointF &sr) override
 
bool end () override
 
HDC getDC () const
 
QRasterBuffer * rasterBuffer ()
 
void releaseBuffer ()
 
void releaseDC (HDC hdc) const
 
bool requiresPretransformedGlyphPositions (QFontEngine *fontEngine, const QTransform &m) const override
 
void saveBuffer (const QString &s) const
 
void setDC (HDC hdc)
 
bool shouldDrawCachedGlyphs (QFontEngine *fontEngine, const QTransform &m) const override
 
QSize size () const
 
Type type () const override
 

Static Public Methods

static bool clearTypeFontsEnabled ()
 

Related Functions

These are not member functions

typedef QSpan
 

Detailed Description

The QRasterPaintEngine class enables hardware acceleration of painting operations on Embedded Linux.

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 and a custom window surface must be implemented to make Embedded Linux 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 also
QCustomRasterPaintDevice, QPaintEngine

Constructor & Destructor Documentation

QRasterPaintEngine::QRasterPaintEngine ( QPaintDevice device)

Creates a raster based paint engine for operating on the given device, with the complete set of paint engine features and capabilities.

QRasterPaintEngine::~QRasterPaintEngine ( )

Destroys this paint engine.

Method Documentation

void QRasterPaintEngine::alphaPenBlt ( const void *  src,
int  bpl,
int  depth,
int  rx,
int  ry,
int  w,
int  h 
)

Documentation pending.

bool QRasterPaintEngine::begin ( QPaintDevice device)
overridevirtual

Reimplemented from QPaintEngine::begin().

Implements QPaintEngine.

bool QRasterPaintEngine::clearTypeFontsEnabled ( )
static

Documentation pending.

QRect QRasterPaintEngine::clipBoundingRect ( ) const

Documentation pending.

ClipType QRasterPaintEngine::clipType ( ) const

Documentation pending.

QPoint QRasterPaintEngine::coordinateOffset ( ) const
overridevirtual

Documentation pending.

Reimplemented from QPaintEngine.

bool QRasterPaintEngine::drawCachedGlyphs ( int  numGlyphs,
const glyph_t *  glyphs,
const QFixedPoint *  positions,
QFontEngine *  fontEngine 
)
virtual

Documentation pending.

void QRasterPaintEngine::drawEllipse ( const QRectF rect)
overridevirtual

Reimplement this method to draw the largest ellipse which can be contained within rectangle rect.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawImage ( const QRectF rect,
const QImage image,
const QRectF srcRect,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
overridevirtual

Reimplement this method to draw the part of the image specified by srcRect in the given rect using the given conversion flags flags, to convert it to a pixmap.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawLines ( const QLine lines,
int  lineCount 
)
overridevirtual

The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this method.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawLines ( const QLineF lines,
int  lineCount 
)
overridevirtual

The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawPixmap ( const QRectF rect,
const QPixmap pm,
const QRectF srcRect 
)
overridevirtual

Reimplement this method to draw the part of the pm specified by the srcRect rectangle in the given rect.

Implements QPaintEngine.

void QRasterPaintEngine::drawPoints ( const QPoint points,
int  pointCount 
)
overridevirtual

Using the buffer points, the first pointCount elements will be drawn.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawPoints ( const QPointF points,
int  pointCount 
)
overridevirtual

Using the buffer points, the first pointCount elements will be drawn.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawPolygon ( const QPoint points,
int  pointCount,
PolygonDrawMode  mode 
)
overridevirtual

Reimplement this virtual method to draw the polygon defined by the pointCount first points in points, using mode mode.

Note
At least one of the drawPolygon() functions must be reimplemented.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawPolygon ( const QPointF points,
int  pointCount,
PolygonDrawMode  mode 
)
overridevirtual

Reimplement this method to draw the polygon defined by the pointCount first points in points, using mode>.

Note
At least one of the drawPolygon() functions must be reimplemented.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawRects ( const QRect rectBuffer,
int  rectCount 
)
overridevirtual

The default implementation converts the first rectCount rectangles in the buffer rectBuffer to QRectF and calls the floating point version of this method.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawRects ( const QRectF rectBuffer,
int  rectCount 
)
overridevirtual

Draws the first rectCount rectangles in the buffer rectBuffer. The default implementation of this function calls drawPath() or drawPolygon() depending on the feature set of the paint engine.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawStaticTextItem ( QStaticTextItem *  textItem)
override

Documentation pending.

void QRasterPaintEngine::drawTextItem ( const QPointF p,
const QTextItem textItem 
)
overridevirtual

This function draws the text item textItem at position p. The default implementation of this function converts the text to a QPainterPath and paints the resulting path.

Reimplemented from QPaintEngine.

void QRasterPaintEngine::drawTiledPixmap ( const QRectF rect,
const QPixmap pixmap,
const QPointF point 
)
overridevirtual

Reimplement this method to draw the pixmap in the given rect, starting at the given point. The pixmap will be drawn repeatedly until the rect is filled.

Reimplemented from QPaintEngine.

bool QRasterPaintEngine::end ( )
overridevirtual

Reimplement this method to finish painting on the current paint device. Return true if painting was finished successfully, otherwise return false.

See also
begin(), isActive()

Implements QPaintEngine.

HDC QRasterPaintEngine::getDC ( ) const

Documentation pending.

QRasterBuffer * QRasterPaintEngine::rasterBuffer ( )

Documentation pending.

void QRasterPaintEngine::releaseBuffer ( )

Documentation pending.

void QRasterPaintEngine::releaseDC ( HDC  hdc) const

Documentation pending.

bool QRasterPaintEngine::requiresPretransformedGlyphPositions ( QFontEngine *  fontEngine,
const QTransform m 
) const
override

Documentation pending.

void QRasterPaintEngine::saveBuffer ( const QString s) const

Documentation pending.

void QRasterPaintEngine::setDC ( HDC  hdc)

Documentation pending.

bool QRasterPaintEngine::shouldDrawCachedGlyphs ( QFontEngine *  fontEngine,
const QTransform m 
) const
override

Documentation pending.

QSize QRasterPaintEngine::size ( ) const

Documentation pending.

Type QRasterPaintEngine::type ( ) const
inlineoverridevirtual

Reimplement this function to return the paint engine Type.

Implements QPaintEngine.

Friends And Related Function Documentation

typedef QSpan ( )
related

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