CopperSpice API  1.9.1
QRasterPaintEngine Class Reference

Enables hardware acceleration of painting operations on Embedded Linux. More...

Inherits QPaintEngineEx

Inherited by QBlitterPaintEngine

Public Methods

 QRasterPaintEngine (QPaintDevice *device)
 
 ~QRasterPaintEngine ()
 
bool begin (QPaintDevice *device) override
 
void drawEllipse (const QRectF &rect) override
 
void drawImage (const QRectF &rect, const QImage &image, const QRectF &srcRect, Qt::ImageConversionFlags flags=Qt::AutoColor) override
 
void drawLines (const QLine *lines, int lineCount) override
 
void drawLines (const QLineF *lines, int lineCount) override
 
void drawPixmap (const QPointF &point, const QPixmap &pixmap) override
 
void drawPixmap (const QRectF &rect, const QPixmap &pixmap, const QRectF &srcRect) 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 &point, const QTextItem &textItem) override
 
void drawTiledPixmap (const QRectF &rect, const QPixmap &pixmap, const QPointF &srcRect) override
 
bool end () override
 
void fillRect (const QRectF &rect, const QBrush &brush) override
 
void fillRect (const QRectF &rect, const QColor &color) override
 
bool shouldDrawCachedGlyphs (QFontEngine *fontEngine, const QTransform &m) const override
 
Type type () const override
 

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.

The QRasterPaintEngine class does not support 8-bit images. These must be converted to a supported format such as QImage::Format_ARGB32_Premultiplied.

See also
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

bool QRasterPaintEngine::begin ( QPaintDevice device)
overridevirtual
void QRasterPaintEngine::drawEllipse ( const QRectF rect)
overridevirtual

Draws the largest ellipse that can be contained within rect.

Reimplemented from QPaintEngine::drawEllipse()

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

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

Reimplemented from QPaintEngine::drawImage()

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

Converts the list of lines starting at lines for the given number of lines, specified in lineCount, to a QLineF and calls the floating point version of this method.

Reimplemented from QPaintEngine::drawLines()

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

Splits the list of lines starting at lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.

Reimplemented from QPaintEngine::drawLines()

void QRasterPaintEngine::drawPixmap ( const QPointF point,
const QPixmap pixmap 
)
override

Draws the pixmap specified at the given point.

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

Draws a portion of the pixmap specified by the rectangle srcRect, in the given rect.

Implements QPaintEngine::drawPixmap()

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

Draws points starting from points for the given number of points specified in pointCount.

Reimplemented from QPaintEngine::drawPoints()

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

Draws points starting from points for the given number of points specified in pointCount.

Reimplemented from QPaintEngine::drawPoints()

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

This method draws a polygon defined by points starting at points for the given number of points specified in pointCount. The mode specifies the algorithm used to draw the polygon.

Reimplemented from QPaintEngine::drawPolygon()

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

This method draws a polygon defined by points starting at points for the given number of points specified in pointCount. The mode specifies the algorithm used to draw the polygon.

Reimplemented from QPaintEngine::drawPolygon()

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

Draws rectangles starting from rects for the given number of rectangles specified in rectCount.

Reimplemented from QPaintEngine::drawRects()

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

Draws rectangles starting from rects for the given number of rectangles specified in rectCount.

Reimplemented from QPaintEngine::drawRects()

void QRasterPaintEngine::drawStaticTextItem ( QStaticTextItem *  textItem)
override

Draws the given textItem.

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

Draws the text item textItem at position point.

Reimplemented from QPaintEngine::drawTextItem()

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

Draws 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::drawTiledPixmap()

bool QRasterPaintEngine::end ( )
overridevirtual

Finishes painting on the current paint device. Returns true if painting was finished successfully, otherwise return false.

Implements QPaintEngine::end()

void QRasterPaintEngine::fillRect ( const QRectF rect,
const QBrush brush 
)
override

Fills the given rect using the brush. Alternatively, you can specify a QColor instead of a QBrush. The QBrush constructor will automatically create a solid pattern brush.

void QRasterPaintEngine::fillRect ( const QRectF rect,
const QColor color 
)
override

Fills the given rect with the specified color.

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

Returns whether glyph caching is supported by the given fontEngine with the transform m applied.

Type QRasterPaintEngine::type ( ) const
inlineoverridevirtual

Returns QPaintEngine::Type::Raster.

Implements QPaintEngine::type()

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