Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QRasterPaintEngine Class

The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded Linux. More...

 #include <QRasterPaintEngine>

This class is under development and is subject to change.

Inherits: QPaintEngine.

This class was introduced in Qt 4.2.

Public Types

enum DirtyFlag { DirtyPen, DirtyBrush, DirtyBrushOrigin, DirtyFont, ..., AllDirty }
flags DirtyFlags
enum PaintEngineFeature { AlphaBlend, Antialiasing, BlendModes, BrushStroke, ..., AllFeatures }
flags PaintEngineFeatures
enum PolygonDrawMode { OddEvenMode, WindingMode, ConvexMode, PolylineMode }
enum Type { X11, Windows, MacPrinter, CoreGraphics, ..., Blitter }

Public Functions

QPaintEngine(PaintEngineFeatures caps = 0)
QRasterPaintEngine(QPaintDevice * device)
virtual ~QPaintEngine()
~QRasterPaintEngine()
virtual bool begin(QPaintDevice * pdev) = 0
const QClipData * clipData() const
virtual bool drawCachedGlyphs(int numGlyphs, const glyph_t * glyphs, const QFixedPoint * positions, QFontEngine * fontEngine)
virtual void drawEllipse(const QRectF & rect)
virtual void drawEllipse(const QRect & rect)
virtual void drawImage(const QRectF & rectangle, const QImage & image, const QRectF & sr, Qt::ImageConversionFlags flags = Qt::AutoColor)
virtual void drawLines(const QLineF * lines, int lineCount)
virtual void drawLines(const QLine * lines, int lineCount)
virtual void drawPath(const QPainterPath & path)
virtual void drawPixmap(const QRectF & r, const QPixmap & pm, const QRectF & sr) = 0
virtual void drawPoints(const QPointF * points, int pointCount)
virtual void drawPoints(const QPoint * points, int pointCount)
virtual void drawPolygon(const QPointF * points, int pointCount, PolygonDrawMode mode)
virtual void drawPolygon(const QPoint * points, int pointCount, PolygonDrawMode mode)
virtual void drawRects(const QRectF * rects, int rectCount)
virtual void drawRects(const QRect * rects, int rectCount)
virtual void drawTextItem(const QPointF & p, const QTextItem & textItem)
virtual void drawTiledPixmap(const QRectF & rect, const QPixmap & pixmap, const QPointF & p)
virtual bool end() = 0
bool hasFeature(PaintEngineFeatures feature) const
bool isActive() const
QPaintDevice * paintDevice() const
QPainter * painter() const
void setActive(bool state)
bool supportsTransformations(QFontEngine * fontEngine) const
virtual Type type() const = 0
virtual void updateState(const QPaintEngineState & state) = 0

Reimplemented Public Functions

virtual bool begin(QPaintDevice * device)
virtual void drawEllipse(const QRectF & rect)
virtual void drawImage(const QRectF & r, const QImage & img, const QRectF & sr, Qt::ImageConversionFlags flags = Qt::AutoColor)
virtual void drawLines(const QLine * lines, int lineCount)
virtual void drawLines(const QLineF * lines, int lineCount)
virtual void drawPixmap(const QRectF & r, const QPixmap & pixmap, const QRectF & sr)
virtual void drawPoints(const QPointF * points, int pointCount)
virtual void drawPoints(const QPoint * points, int pointCount)
virtual void drawPolygon(const QPointF * points, int pointCount, PolygonDrawMode mode)
virtual void drawPolygon(const QPoint * points, int pointCount, PolygonDrawMode mode)
virtual void drawRects(const QRect * rects, int rectCount)
virtual void drawRects(const QRectF * rects, int rectCount)
virtual void drawStaticTextItem(QStaticTextItem * textItem)
virtual void drawTextItem(const QPointF & p, const QTextItem & textItem)
virtual void drawTiledPixmap(const QRectF & r, const QPixmap & pixmap, const QPointF & sr)
virtual bool end()
virtual void fillRect(const QRectF & r, const QBrush & brush)
virtual void fillRect(const QRectF & r, const QColor & color)
virtual bool supportsTransformations(QFontEngine * fontEngine, const QTransform & m) const
virtual Type type() const

Static Public Members

bool clearTypeFontsEnabled()

Related Non-Members

typedef QSpan

Detailed Description

The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded Linux.

Note that this functionality is only available in Qt for Embedded Linux.

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

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 to Qt for Embedded Linux documentation for details.

See also QCustomRasterPaintDevice and QPaintEngine.

Member Function 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.

This function was introduced in Qt 4.5.

QRasterPaintEngine::~QRasterPaintEngine()

Destroys this paint engine.

bool QRasterPaintEngine::begin(QPaintDevice * device) [virtual]

Reimplemented from QPaintEngine::begin().

bool QRasterPaintEngine::clearTypeFontsEnabled() [static]

const QClipData * QRasterPaintEngine::clipData() const

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

void QRasterPaintEngine::drawEllipse(const QRectF & rect) [virtual]

Reimplemented from QPaintEngine::drawEllipse().

void QRasterPaintEngine::drawImage(const QRectF & r, const QImage & img, const QRectF & sr, Qt::ImageConversionFlags flags = Qt::AutoColor) [virtual]

Reimplemented from QPaintEngine::drawImage().

void QRasterPaintEngine::drawLines(const QLine * lines, int lineCount) [virtual]

Reimplemented from QPaintEngine::drawLines().

void QRasterPaintEngine::drawLines(const QLineF * lines, int lineCount) [virtual]

Reimplemented from QPaintEngine::drawLines().

void QRasterPaintEngine::drawPixmap(const QRectF & r, const QPixmap & pixmap, const QRectF & sr) [virtual]

Reimplemented from QPaintEngine::drawPixmap().

void QRasterPaintEngine::drawPoints(const QPointF * points, int pointCount) [virtual]

Reimplemented from QPaintEngine::drawPoints().

void QRasterPaintEngine::drawPoints(const QPoint * points, int pointCount) [virtual]

Reimplemented from QPaintEngine::drawPoints().

This is an overloaded function.

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.

void QRasterPaintEngine::drawPolygon(const QPointF * points, int pointCount, PolygonDrawMode mode) [virtual]

Reimplemented from QPaintEngine::drawPolygon().

void QRasterPaintEngine::drawPolygon(const QPoint * points, int pointCount, PolygonDrawMode mode) [virtual]

Reimplemented from QPaintEngine::drawPolygon().

void QRasterPaintEngine::drawRects(const QRect * rects, int rectCount) [virtual]

Reimplemented from QPaintEngine::drawRects().

void QRasterPaintEngine::drawRects(const QRectF * rects, int rectCount) [virtual]

Reimplemented from QPaintEngine::drawRects().

void QRasterPaintEngine::drawStaticTextItem(QStaticTextItem * textItem) [virtual]

void QRasterPaintEngine::drawTextItem(const QPointF & p, const QTextItem & textItem) [virtual]

Reimplemented from QPaintEngine::drawTextItem().

void QRasterPaintEngine::drawTiledPixmap(const QRectF & r, const QPixmap & pixmap, const QPointF & sr) [virtual]

Reimplemented from QPaintEngine::drawTiledPixmap().

bool QRasterPaintEngine::end() [virtual]

Reimplemented from QPaintEngine::end().

void QRasterPaintEngine::fillRect(const QRectF & r, const QBrush & brush) [virtual]

void QRasterPaintEngine::fillRect(const QRectF & r, const QColor & color) [virtual]

bool QRasterPaintEngine::supportsTransformations(QFontEngine * fontEngine) const

bool QRasterPaintEngine::supportsTransformations(QFontEngine * fontEngine, const QTransform & m) const [virtual]

Type QRasterPaintEngine::type() const [virtual]

Reimplemented from QPaintEngine::type().

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

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web