Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QRasterPaintEngine Class Reference

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

#include <qpaintengine_raster_p.h>

+ Inheritance diagram for QRasterPaintEngine:
+ Collaboration diagram for QRasterPaintEngine:

Public Types

enum  ClipType { RectClip , ComplexClip }
 
- Public Types inherited from QPaintEngineEx
enum  Flags { DoNotEmulate = 0x01 , IsEmulationEngine = 0x02 }
 
- Public Types inherited from QPaintEngine
enum  PaintEngineFeature {
  PrimitiveTransform = 0x00000001 , PatternTransform = 0x00000002 , PixmapTransform = 0x00000004 , PatternBrush = 0x00000008 ,
  LinearGradientFill = 0x00000010 , RadialGradientFill = 0x00000020 , ConicalGradientFill = 0x00000040 , AlphaBlend = 0x00000080 ,
  PorterDuff = 0x00000100 , PainterPaths = 0x00000200 , Antialiasing = 0x00000400 , BrushStroke = 0x00000800 ,
  ConstantOpacity = 0x00001000 , MaskedBrush = 0x00002000 , PerspectiveTransform = 0x00004000 , BlendModes = 0x00008000 ,
  ObjectBoundingModeGradients = 0x00010000 , RasterOpModes = 0x00020000 , PaintOutsidePaintEvent = 0x20000000 , AllFeatures = 0xffffffff
}
 This enum is used to describe the features or capabilities that the paint engine has. More...
 
enum  DirtyFlag {
  DirtyPen = 0x0001 , DirtyBrush = 0x0002 , DirtyBrushOrigin = 0x0004 , DirtyFont = 0x0008 ,
  DirtyBackground = 0x0010 , DirtyBackgroundMode = 0x0020 , DirtyTransform = 0x0040 , DirtyClipRegion = 0x0080 ,
  DirtyClipPath = 0x0100 , DirtyHints = 0x0200 , DirtyCompositionMode = 0x0400 , DirtyClipEnabled = 0x0800 ,
  DirtyOpacity = 0x1000 , AllDirty = 0xffff
}
 \value DirtyPen The pen is dirty and needs to be updated. More...
 
enum  PolygonDrawMode { OddEvenMode , WindingMode , ConvexMode , PolylineMode }
 \value OddEvenMode The polygon should be drawn using OddEven fill rule. More...
 
enum  Type {
  X11 , Windows , QuickDraw , CoreGraphics ,
  MacPrinter , QWindowSystem , OpenGL , Picture ,
  SVG , Raster , Direct3D , Pdf ,
  OpenVG , OpenGL2 , PaintBuffer , Blitter ,
  Direct2D , User = 50 , MaxUser = 100
}
 \value X11 \value Windows \value MacPrinter \value CoreGraphics \macos's Quartz2D (CoreGraphics) \value QuickDraw \macos's QuickDraw \value QWindowSystem Qt for Embedded Linux \value OpenGL \value Picture QPicture format \value SVG Scalable Vector Graphics XML format \value Raster \value Direct3D Windows only, Direct3D based engine \value Pdf Portable Document Format \value OpenVG \value User First user type ID \value MaxUser Last user type ID \value OpenGL2 \value PaintBuffer \value Blitter \value Direct2D Windows only, Direct2D based engine More...
 

Public Member Functions

 QRasterPaintEngine (QPaintDevice *device)
 
 ~QRasterPaintEngine ()
 Destroys this paint engine.
 
bool begin (QPaintDevice *device) override
 \reimp
 
bool end () override
 \reimp
 
void penChanged () override
 
void brushChanged () override
 
void brushOriginChanged () override
 
void opacityChanged () override
 
void compositionModeChanged () override
 
void renderHintsChanged () override
 
void transformChanged () override
 
void clipEnabledChanged () override
 
void setState (QPainterState *s) override
 
QPainterStatecreateState (QPainterState *orig) const override
 
QRasterPaintEngineStatestate ()
 
const QRasterPaintEngineStatestate () const
 
void updateBrush (const QBrush &brush)
 
void updatePen (const QPen &pen)
 
void updateMatrix (const QTransform &matrix)
 
virtual void fillPath (const QPainterPath &path, QSpanData *fillData)
 
virtual void fillPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode)
 
void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 \reimp
 
void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) override
 \reimp
 
void drawEllipse (const QRectF &rect) override
 \reimp
 
void fillRect (const QRectF &rect, const QBrush &brush) override
 \reimp
 
void fillRect (const QRectF &rect, const QColor &color) override
 \reimp
 
void drawRects (const QRect *rects, int rectCount) override
 \reimp
 
void drawRects (const QRectF *rects, int rectCount) override
 \reimp
 
void drawPixmap (const QPointF &p, const QPixmap &pm) override
 
void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override
 \reimp
 
void drawImage (const QPointF &p, const QImage &img) override
 
void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
 \reimp
 
void drawTiledPixmap (const QRectF &r, const QPixmap &pm, const QPointF &sr) override
 \reimp
 
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 \reimp
 
void drawLines (const QLine *line, int lineCount) override
 \reimp
 
void drawLines (const QLineF *line, int lineCount) override
 \reimp
 
void drawPoints (const QPointF *points, int pointCount) override
 \reimp
 
void drawPoints (const QPoint *points, int pointCount) override
 Draws the first pointCount points in the buffer points.
 
void stroke (const QVectorPath &path, const QPen &pen) override
 
void fill (const QVectorPath &path, const QBrush &brush) override
 
void clip (const QVectorPath &path, Qt::ClipOperation op) override
 
void clip (const QRect &rect, Qt::ClipOperation op) override
 
void clip (const QRegion &region, Qt::ClipOperation op) override
 
const QClipDataclipData () const
 
void drawStaticTextItem (QStaticTextItem *textItem) override
 \reimp
 
virtual bool drawCachedGlyphs (int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QFontEngine *fontEngine)
 
ClipType clipType () const
 
QRectF clipBoundingRect () const
 
QRasterBufferrasterBuffer ()
 
void alphaPenBlt (const void *src, int bpl, int depth, int rx, int ry, int w, int h, bool useGammaCorrection)
 
Type type () const override
 Reimplement this function to return the paint engine \l{Type}.
 
QPoint coordinateOffset () const override
 
bool requiresPretransformedGlyphPositions (QFontEngine *fontEngine, const QTransform &m) const override
 
bool shouldDrawCachedGlyphs (QFontEngine *fontEngine, const QTransform &m) const override
 Returns whether glyph caching is supported by the font engine fontEngine with the given transform m applied.
 
- Public Member Functions inherited from QPaintEngineEx
 QPaintEngineEx ()
 
virtual QPainterStatecreateState (QPainterState *orig) const
 
virtual void draw (const QVectorPath &path)
 
virtual void fill (const QVectorPath &path, const QBrush &brush)=0
 
virtual void stroke (const QVectorPath &path, const QPen &pen)
 
virtual void clip (const QVectorPath &path, Qt::ClipOperation op)=0
 
virtual void clip (const QRect &rect, Qt::ClipOperation op)
 
virtual void clip (const QRegion &region, Qt::ClipOperation op)
 
virtual void clip (const QPainterPath &path, Qt::ClipOperation op)
 
virtual void clipEnabledChanged ()=0
 
virtual void penChanged ()=0
 
virtual void brushChanged ()=0
 
virtual void brushOriginChanged ()=0
 
virtual void opacityChanged ()=0
 
virtual void compositionModeChanged ()=0
 
virtual void renderHintsChanged ()=0
 
virtual void transformChanged ()=0
 
virtual void fillRect (const QRectF &rect, const QBrush &brush)
 
virtual void fillRect (const QRectF &rect, const QColor &color)
 
virtual void drawRoundedRect (const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode)
 
virtual void drawRects (const QRect *rects, int rectCount) override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function.
 
virtual void drawRects (const QRectF *rects, int rectCount) override
 Draws the first rectCount rectangles in the buffer rects.
 
virtual void drawLines (const QLine *lines, int lineCount) override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this function.
 
virtual void drawLines (const QLineF *lines, int lineCount) override
 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.
 
virtual void drawEllipse (const QRectF &r) override
 Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
 
virtual void drawEllipse (const QRect &r) override
 The default implementation of this function calls the floating point version of this function.
 
virtual void drawPath (const QPainterPath &path) override
 The default implementation ignores the path and does nothing.
 
virtual void drawPoints (const QPointF *points, int pointCount) override
 Draws the first pointCount points in the buffer points.
 
virtual void drawPoints (const QPoint *points, int pointCount) override
 Draws the first pointCount points in the buffer points.
 
virtual void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
virtual void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
virtual void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override=0
 Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
 
virtual void drawPixmap (const QPointF &pos, const QPixmap &pm)
 
virtual void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override=0
 Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.
 
virtual void drawImage (const QPointF &pos, const QImage &image)
 
virtual void drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s) override
 Reimplement this function to draw the pixmap in the given rect, starting at the given p.
 
virtual void drawPixmapFragments (const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap, QFlags< QPainter::PixmapFragmentHint > hints)
 
virtual void updateState (const QPaintEngineState &state) override
 Reimplement this function to update the state of a paint engine.
 
virtual void drawStaticTextItem (QStaticTextItem *)
 
virtual void setState (QPainterState *s)
 
QPainterStatestate ()
 
const QPainterStatestate () const
 
virtual void sync ()
 
virtual void beginNativePainting ()
 
virtual void endNativePainting ()
 
virtual uint flags () const
 
virtual bool requiresPretransformedGlyphPositions (QFontEngine *fontEngine, const QTransform &m) const
 
virtual bool shouldDrawCachedGlyphs (QFontEngine *fontEngine, const QTransform &m) const
 
- Public Member Functions inherited from QPaintEngine
 QPaintEngine (PaintEngineFeatures features=PaintEngineFeatures())
 Creates a paint engine with the featureset specified by caps.
 
virtual ~QPaintEngine ()
 Destroys the paint engine.
 
bool isActive () const
 Returns true if the paint engine is actively drawing; otherwise returns false.
 
void setActive (bool newState)
 Sets the active state of the paint engine to state.
 
virtual bool begin (QPaintDevice *pdev)=0
 Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.
 
virtual bool end ()=0
 Reimplement this function to finish painting on the current paint device.
 
virtual void updateState (const QPaintEngineState &state)=0
 Reimplement this function to update the state of a paint engine.
 
virtual void drawRects (const QRect *rects, int rectCount)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function.
 
virtual void drawRects (const QRectF *rects, int rectCount)
 Draws the first rectCount rectangles in the buffer rects.
 
virtual void drawLines (const QLine *lines, int lineCount)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this function.
 
virtual void drawLines (const QLineF *lines, int lineCount)
 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.
 
virtual void drawEllipse (const QRectF &r)
 Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
 
virtual void drawEllipse (const QRect &r)
 The default implementation of this function calls the floating point version of this function.
 
virtual void drawPath (const QPainterPath &path)
 The default implementation ignores the path and does nothing.
 
virtual void drawPoints (const QPointF *points, int pointCount)
 Draws the first pointCount points in the buffer points.
 
virtual void drawPoints (const QPoint *points, int pointCount)
 Draws the first pointCount points in the buffer points.
 
virtual void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode)
 Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
virtual void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
virtual void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr)=0
 Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
 
virtual void drawTextItem (const QPointF &p, const QTextItem &textItem)
 This function draws the text item textItem at position p.
 
virtual void drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s)
 Reimplement this function to draw the pixmap in the given rect, starting at the given p.
 
virtual void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.
 
void setPaintDevice (QPaintDevice *device)
 
QPaintDevicepaintDevice () const
 Returns the device that this engine is painting on, if painting is active; otherwise returns \nullptr.
 
void setSystemClip (const QRegion &baseClip)
 
QRegion systemClip () const
 
void setSystemRect (const QRect &rect)
 
QRect systemRect () const
 
virtual QPoint coordinateOffset () const
 
virtual Type type () const =0
 Reimplement this function to return the paint engine \l{Type}.
 
void fix_neg_rect (int *x, int *y, int *w, int *h)
 
bool testDirty (DirtyFlags df)
 
void setDirty (DirtyFlags df)
 
void clearDirty (DirtyFlags df)
 
bool hasFeature (PaintEngineFeatures feature) const
 Returns true if the paint engine supports the specified feature; otherwise returns false.
 
QPainterpainter () const
 Returns the paint engine's painter.
 
void syncState ()
 
bool isExtended () const
 
virtual QPixmap createPixmap (QSize size)
 
virtual QPixmap createPixmapFromImage (QImage image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 

Protected Member Functions

 QRasterPaintEngine (QRasterPaintEnginePrivate &d, QPaintDevice *)
 
- Protected Member Functions inherited from QPaintEngineEx
 QPaintEngineEx (QPaintEngineExPrivate &data)
 
- Protected Member Functions inherited from QPaintEngine
 QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=PaintEngineFeatures())
 

Friends

struct QSpanData
 
class QBlitterPaintEngine
 
class QBlitterPaintEnginePrivate
 

Additional Inherited Members

- Protected Attributes inherited from QPaintEngine
QPaintEngineStatestate
 
PaintEngineFeatures gccaps
 
uint active: 1
 
uint selfDestruct: 1
 
uint extended: 1
 
QScopedPointer< QPaintEnginePrivated_ptr
 

Detailed Description

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

\inmodule QtGui

Since
4.2

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 and a custom window surface 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 also
QPaintEngine

Definition at line 94 of file qpaintengine_raster_p.h.

Member Enumeration Documentation

◆ ClipType

\value RectClip Indicates that the currently set clip is a single rectangle. \value ComplexClip Indicates that the currently set clip is a combination of several shapes.

Enumerator
RectClip 
ComplexClip 

Definition at line 167 of file qpaintengine_raster_p.h.

Constructor & Destructor Documentation

◆ QRasterPaintEngine() [1/2]

QRasterPaintEngine::QRasterPaintEngine ( QPaintDevice device)
Since
4.5

Creates a raster based paint engine for operating on the given device, with the complete set of \l {QPaintEngine::PaintEngineFeature}{paint engine features and capabilities}.

Definition at line 285 of file qpaintengine_raster.cpp.

References device.

◆ ~QRasterPaintEngine()

QRasterPaintEngine::~QRasterPaintEngine ( )

Destroys this paint engine.

Definition at line 375 of file qpaintengine_raster.cpp.

References d, qt_ft_grays_raster, and QT_FT_Raster_Funcs_::raster_done.

◆ QRasterPaintEngine() [2/2]

QRasterPaintEngine::QRasterPaintEngine ( QRasterPaintEnginePrivate dd,
QPaintDevice device 
)
protected

Definition at line 295 of file qpaintengine_raster.cpp.

References device.

Member Function Documentation

◆ alphaPenBlt()

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

Definition at line 2536 of file qpaintengine_raster.cpp.

References clip(), QRasterBuffer::colorSpace, contains(), QT_FT_Span_::coverage, d, QRasterBuffer::height(), QT_FT_Span_::len, QColorSpace::Linear, monoVal(), qGreen(), qMax(), qMin(), rect, rx(), ry(), state(), QColorSpace::transferFunction(), QRasterBuffer::width(), QT_FT_Span_::x, and QT_FT_Span_::y.

Referenced by drawCachedGlyphs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ begin()

bool QRasterPaintEngine::begin ( QPaintDevice device)
overridevirtual

\reimp

Implements QPaintEngine.

Definition at line 385 of file qpaintengine_raster.cpp.

References QPlatformPixmap::BlitterClass, QPlatformPixmap::buffer(), QPlatformPixmap::classId(), QPainter::CompositionMode_SourceOver, QInternal::CustomRaster, d, device, QPaintEngine::DirtyBrushOrigin, QFontEngine::Format_A32, QFontEngine::Format_A8, QImage::Format_ARGB32_Premultiplied, QFontEngine::Format_Mono, QImage::Format_RGB32, QInternal::Image, QInternal::Pixmap, pixmap, Q_ASSERT, qDebug, QPlatformPixmap::RasterClass, QPaintEngine::setActive(), QPaintEngine::setDirty(), and state().

Referenced by QBlitterPaintEngine::begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ brushChanged()

void QRasterPaintEngine::brushChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 685 of file qpaintengine_raster.cpp.

References QPaintEngine::DirtyBrush, qDebug, and state().

Referenced by QBlitterPaintEngine::brushChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ brushOriginChanged()

void QRasterPaintEngine::brushOriginChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 671 of file qpaintengine_raster.cpp.

References QPaintEngine::DirtyBrushOrigin, qDebug, and state().

+ Here is the call graph for this function:

◆ clip() [1/3]

void QRasterPaintEngine::clip ( const QRect rect,
Qt::ClipOperation  op 
)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1194 of file qpaintengine_raster.cpp.

References QPaintEngineEx::clip(), Qt::NoClip, qDebug, qrasterpaintengine_state_setNoClip(), qt_mapFillRect(), rect, state(), and QTransform::TxScale.

+ Here is the call graph for this function:

◆ clip() [2/3]

void QRasterPaintEngine::clip ( const QRegion region,
Qt::ClipOperation  op 
)
overridevirtual

◆ clip() [3/3]

void QRasterPaintEngine::clip ( const QVectorPath path,
Qt::ClipOperation  op 
)
overridevirtual

Implements QPaintEngineEx.

Definition at line 1120 of file qpaintengine_raster.cpp.

References base, clipData(), d, QClipData::fixup(), i, QClipData::initialize(), Qt::IntersectClip, Qt::NoClip, qDebug, qrasterpaintengine_dirty_clip(), qrasterpaintengine_state_setNoClip(), qt_mapFillRect(), qt_span_clip(), Qt::ReplaceClip, state(), and QTransform::TxScale.

Referenced by alphaPenBlt(), clip(), clipBoundingRect(), clipData(), clipType(), drawImage(), and drawImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipBoundingRect()

QRectF QRasterPaintEngine::clipBoundingRect ( ) const

Returns the bounding rect of the currently set clip.

Definition at line 3490 of file qpaintengine_raster.cpp.

References clip(), and d.

Referenced by QPixmapConvolutionFilter::draw(), drawStaticTextItem(), and drawTextItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipData()

const QClipData * QRasterPaintEngine::clipData ( ) const
inline

Definition at line 441 of file qpaintengine_raster_p.h.

References QRasterPaintEngineState::clip, clip(), d, and state().

Referenced by clip(), QBlitterPaintEngine::drawCachedGlyphs(), QBlitterPaintEngine::drawPixmap(), and QBlitterPaintEngine::fillRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipEnabledChanged()

void QRasterPaintEngine::clipEnabledChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 840 of file qpaintengine_raster.cpp.

References QPaintEngine::DirtyClipEnabled, qDebug, and state().

Referenced by QBlitterPaintEngine::clipEnabledChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipType()

QRasterPaintEngine::ClipType QRasterPaintEngine::clipType ( ) const

Returns the type of the clip currently set.

Definition at line 3475 of file qpaintengine_raster.cpp.

References clip(), ComplexClip, d, and RectClip.

Referenced by QPixmapConvolutionFilter::draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compositionModeChanged()

void QRasterPaintEngine::compositionModeChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 765 of file qpaintengine_raster.cpp.

References d, QPaintEngine::DirtyCompositionMode, qDebug, and state().

Referenced by QBlitterPaintEngine::compositionModeChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ coordinateOffset()

QPoint QRasterPaintEngine::coordinateOffset ( ) const
overridevirtual

Reimplemented from QPaintEngine.

Definition at line 3372 of file qpaintengine_raster.cpp.

◆ createState()

QPainterState * QRasterPaintEngine::createState ( QPainterState orig) const
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 542 of file qpaintengine_raster.cpp.

◆ drawCachedGlyphs()

◆ drawEllipse()

void QRasterPaintEngine::drawEllipse ( const QRectF rect)
overridevirtual

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 3278 of file qpaintengine_raster.cpp.

References d, QPaintEngineEx::drawEllipse(), drawEllipse_midpoint_i(), int_dim, Qt::NoPen, qMax(), qpen_style(), QT_RASTER_COORD_LIMIT, rect, Qt::SolidLine, state(), and QTransform::TxScale.

Referenced by QBlitterPaintEngine::drawEllipse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawImage() [1/2]

void QRasterPaintEngine::drawImage ( const QPointF p,
const QImage img 
)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 2096 of file qpaintengine_raster.cpp.

References clip(), d, drawImage(), fillRect_normalized(), QTextureData::Plain, qBlendFunctions, qDebug, qRound(), state(), QRect::translated(), QTransform::TxTranslate, QPointF::x(), and QPointF::y().

Referenced by drawCachedGlyphs(), drawImage(), QBlitterPaintEngine::drawImage(), drawPixmap(), and drawPixmap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawImage() [2/2]

void QRasterPaintEngine::drawImage ( const QRectF r,
const QImage pm,
const QRectF sr,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
overridevirtual

◆ drawLines() [1/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 3175 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawLine(), QPaintEngineEx::drawLines(), i, QLine::p1(), QLine::p2(), qDebug, and state().

+ Here is the call graph for this function:

◆ drawLines() [2/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 3252 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawLine(), QPaintEngineEx::drawLines(), i, line, qDebug, and state().

+ Here is the call graph for this function:

◆ drawPixmap() [1/2]

void QRasterPaintEngine::drawPixmap ( const QPointF pos,
const QPixmap pixmap 
)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1988 of file qpaintengine_raster.cpp.

References QPlatformPixmap::classId(), d, drawImage(), pixmap, pos, qDebug, QPlatformPixmap::RasterClass, state(), and QTransform::TxTranslate.

Referenced by QBlitterPaintEngine::drawPixmap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawPixmap() [2/2]

void QRasterPaintEngine::drawPixmap ( const QRectF r,
const QPixmap pm,
const QRectF sr 
)
overridevirtual

\reimp

Implements QPaintEngineEx.

Definition at line 2029 of file qpaintengine_raster.cpp.

References QPlatformPixmap::classId(), d, drawImage(), QRect::intersected(), pixmap, qDebug, QPlatformPixmap::RasterClass, QRectF::size(), state(), QRectF::toAlignedRect(), QPlatformPixmap::toImage(), QRect::topLeft(), QRectF::translated(), and QTransform::TxTranslate.

+ Here is the call graph for this function:

◆ drawPoints() [1/2]

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

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

Definition at line 3154 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawPoints(), QPaintEngineEx::drawPoints(), and state().

+ Here is the call graph for this function:

◆ drawPoints() [2/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 3135 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawPoints(), QPaintEngineEx::drawPoints(), and state().

Referenced by QBlitterPaintEngine::drawPoints(), and QBlitterPaintEngine::drawPoints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawPolygon() [1/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 1924 of file qpaintengine_raster.cpp.

References d, QVarLengthArray< T, Prealloc >::data(), QCosmeticStroker::drawPath(), drawRects(), i, QVectorPath::isRect(), Qt::OddEvenFill, QVectorPath::polygonFlags(), QPaintEngine::PolylineMode, Q_ASSERT, qDebug, state(), QPaintEngineEx::stroke(), Qt::WindingFill, and QPaintEngine::WindingMode.

+ Here is the call graph for this function:

◆ drawPolygon() [2/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 1883 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawPath(), drawRects(), fillPolygon(), i, QVectorPath::isRect(), QVectorPath::polygonFlags(), QPaintEngine::PolylineMode, Q_ASSERT, qDebug, state(), and QPaintEngineEx::stroke().

Referenced by QBlitterPaintEngine::drawPolygon(), and QBlitterPaintEngine::drawPolygon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawRects() [1/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 1436 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawPath(), fill(), fillRect_normalized(), i, qDebug, rect, state(), stroke(), and QTransform::TxTranslate.

Referenced by drawPolygon(), drawPolygon(), QBlitterPaintEngine::drawRects(), and QBlitterPaintEngine::drawRects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawRects() [2/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 1490 of file qpaintengine_raster.cpp.

References d, QCosmeticStroker::drawPath(), QPaintEngineEx::drawRects(), i, QRectF::normalized(), qDebug, rect, state(), and QPaintEngineEx::stroke().

+ Here is the call graph for this function:

◆ drawStaticTextItem()

void QRasterPaintEngine::drawStaticTextItem ( QStaticTextItem textItem)
overridevirtual

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 3037 of file qpaintengine_raster.cpp.

References clipBoundingRect(), copy(), drawCachedGlyphs(), QPaintEngineEx::drawStaticTextItem(), QStaticTextItem::fontEngine(), QStaticTextItem::glyphPositions, QStaticTextItem::glyphs, QTransform::inverted(), QTransform::mapRect(), QPainterState::matrix, QStaticTextItem::numGlyphs, shouldDrawCachedGlyphs(), state(), QTransform::TxProject, and visibleGlyphRange().

Referenced by QBlitterPaintEngine::drawStaticTextItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawTextItem()

◆ drawTiledPixmap()

void QRasterPaintEngine::drawTiledPixmap ( const QRectF r,
const QPixmap pm,
const QPointF sr 
)
overridevirtual

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 2449 of file qpaintengine_raster.cpp.

References QPlatformPixmap::classId(), copy(), d, fillPath(), fillRect_normalized(), QRectF::normalized(), pixmap, Q_ASSERT, qAbs(), qDebug, QPlatformPixmap::RasterClass, rect, state(), QTextureData::Tiled, QRectF::toRect(), QRectF::translate(), QTransform::TxScale, QTransform::TxTranslate, QPointF::x(), and QPointF::y().

Referenced by QBlitterPaintEngine::drawTiledPixmap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ end()

bool QRasterPaintEngine::end ( )
overridevirtual

\reimp

Implements QPaintEngine.

Definition at line 455 of file qpaintengine_raster.cpp.

References d, and qDebug.

Referenced by QBlitterPaintEngine::end().

+ Here is the caller graph for this function:

◆ fill()

void QRasterPaintEngine::fill ( const QVectorPath path,
const QBrush brush 
)
overridevirtual

Implements QPaintEngineEx.

Definition at line 1631 of file qpaintengine_raster.cpp.

References d, fillRect_normalized(), Qt::hex(), QRectF::intersects(), QRectF::isValid(), QRectF::normalized(), qDebug, QVectorPath::RectangleHint, state(), and QTransform::TxScale.

Referenced by drawRects(), and QBlitterPaintEngine::fill().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPath()

void QRasterPaintEngine::fillPath ( const QPainterPath path,
QSpanData fillData 
)
virtual

Reimplemented in QBlitterPaintEngine.

Definition at line 1331 of file qpaintengine_raster.cpp.

References QSpanData::blend, QRect::bottom(), d, deviceRect, QRect::left(), qDebug, QT_RASTER_COORD_LIMIT, QRect::right(), state(), and QRect::top().

Referenced by drawImage(), drawTiledPixmap(), and QBlitterPaintEngine::fillPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPolygon()

void QRasterPaintEngine::fillPolygon ( const QPointF points,
int  pointCount,
PolygonDrawMode  mode 
)
virtual

Reimplemented in QBlitterPaintEngine.

Definition at line 1849 of file qpaintengine_raster.cpp.

References QList< T >::constData(), d, fillPolygon(), QVectorPath::polygonFlags(), qWarning, QList< T >::size(), splitPolygon(), and state().

Referenced by drawPolygon(), fillPolygon(), and QBlitterPaintEngine::fillPolygon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRect() [1/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 1740 of file qpaintengine_raster.cpp.

References fillRect(), qDebug, and state().

Referenced by drawImage(), QBlitterPaintEngine::fillRect(), fillRect(), QBlitterPaintEngine::fillRect(), and fillRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRect() [2/2]

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

\reimp

Reimplemented from QPaintEngineEx.

Definition at line 1770 of file qpaintengine_raster.cpp.

References QPainter::CompositionMode_SourceOver, d, fillRect(), qDebug, qPremultiplyWithExtraAlpha(), and state().

+ Here is the call graph for this function:

◆ opacityChanged()

void QRasterPaintEngine::opacityChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 747 of file qpaintengine_raster.cpp.

References QPaintEngine::DirtyOpacity, qDebug, and state().

Referenced by QBlitterPaintEngine::opacityChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ penChanged()

void QRasterPaintEngine::penChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 581 of file qpaintengine_raster.cpp.

References QPaintEngine::DirtyPen, QPainterState::pen, Q_ASSERT, qDebug, and state().

Referenced by QBlitterPaintEngine::penChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rasterBuffer()

QRasterBuffer * QRasterPaintEngine::rasterBuffer ( )

Definition at line 2527 of file qpaintengine_raster.cpp.

References d.

◆ renderHintsChanged()

void QRasterPaintEngine::renderHintsChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 786 of file qpaintengine_raster.cpp.

References QPainter::Antialiasing, d, QPaintEngine::DirtyBrush, QPaintEngine::DirtyHints, QPaintEngine::DirtyPen, Qt::hex(), QPainter::NonCosmeticBrushPatterns, qDebug, QPainter::SmoothPixmapTransform, and state().

Referenced by QBlitterPaintEngine::renderHintsChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requiresPretransformedGlyphPositions()

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

Reimplemented from QPaintEngineEx.

Definition at line 3338 of file qpaintengine_raster.cpp.

References QPaintEngineEx::requiresPretransformedGlyphPositions(), and shouldDrawCachedGlyphs().

+ Here is the call graph for this function:

◆ setState()

void QRasterPaintEngine::setState ( QPainterState s)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 556 of file qpaintengine_raster.cpp.

References d, QPaintEngineEx::setState(), and state().

Referenced by QBlitterPaintEngine::setState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shouldDrawCachedGlyphs()

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

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

Reimplemented from QPaintEngineEx.

Definition at line 3352 of file qpaintengine_raster.cpp.

References QFontEngine::hasInternalCaching(), QPaintEngineEx::shouldDrawCachedGlyphs(), QFontEngine::supportsTransformation(), and QTransform::TxProject.

Referenced by drawStaticTextItem(), drawTextItem(), and requiresPretransformedGlyphPositions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ state() [1/2]

◆ state() [2/2]

const QRasterPaintEngineState * QRasterPaintEngine::state ( ) const
inline

Definition at line 118 of file qpaintengine_raster_p.h.

References QPaintEngineEx::state().

+ Here is the call graph for this function:

◆ stroke()

void QRasterPaintEngine::stroke ( const QVectorPath path,
const QPen pen 
)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1542 of file qpaintengine_raster.cpp.

References QList< T >::at(), d, QCosmeticStroker::drawPath(), Qt::FlatCap, i, QString::length(), QLineF::length(), line, QVectorPath::LinesHint, QLineF::p1(), QLineF::p2(), qpen_style(), qpen_widthf(), Qt::SolidLine, Qt::SquareCap, state(), and QPaintEngineEx::stroke().

Referenced by drawRects(), and QBlitterPaintEngine::stroke().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transformChanged()

void QRasterPaintEngine::transformChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 820 of file qpaintengine_raster.cpp.

References d, QPaintEngine::DirtyTransform, qDebug, and state().

Referenced by QBlitterPaintEngine::transformChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type()

Type QRasterPaintEngine::type ( ) const
inlineoverridevirtual

Reimplement this function to return the paint engine \l{Type}.

Implements QPaintEngine.

Definition at line 184 of file qpaintengine_raster_p.h.

References QPaintEngine::Raster.

◆ updateBrush()

void QRasterPaintEngine::updateBrush ( const QBrush brush)

Definition at line 700 of file qpaintengine_raster.cpp.

References d, QPaintEngine::DirtyTransform, qDebug, state(), and QTransform::TxNone.

+ Here is the call graph for this function:

◆ updateMatrix()

void QRasterPaintEngine::updateMatrix ( const QTransform matrix)

Definition at line 471 of file qpaintengine_raster.cpp.

References qt_scaleForTransform(), and state().

+ Here is the call graph for this function:

◆ updatePen()

void QRasterPaintEngine::updatePen ( const QPen pen)

Definition at line 595 of file qpaintengine_raster.cpp.

References QPen::brush(), Qt::CustomDashLine, d, QPen::dashOffset(), QPen::dashPattern(), QPaintEngine::DirtyTransform, QPen::isCosmetic(), QPen::miterLimit(), Qt::NoPen, qDebug, qpen_capStyle(), qpen_joinStyle(), qpen_style(), qpen_widthf(), QList< T >::size(), Qt::SolidLine, Qt::SquareCap, state(), QBrush::transform(), QTransform::TxNone, and QTransform::type().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QBlitterPaintEngine

friend class QBlitterPaintEngine
friend

Definition at line 195 of file qpaintengine_raster_p.h.

◆ QBlitterPaintEnginePrivate

friend class QBlitterPaintEnginePrivate
friend

Definition at line 196 of file qpaintengine_raster_p.h.

◆ QSpanData

friend struct QSpanData
friend

Definition at line 194 of file qpaintengine_raster_p.h.


The documentation for this class was generated from the following files: