Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QBlitterPaintEngine Class Reference

#include <qpaintengine_blitter_p.h>

Inheritance diagram for QBlitterPaintEngine:
Collaboration diagram for QBlitterPaintEngine:

Public Member Functions

 QBlitterPaintEngine (QBlittablePlatformPixmap *p)
virtual QPaintEngine::Type type () const override
 Reimplement this function to return the paint engine \l{Type}.
virtual bool begin (QPaintDevice *pdev) override
 Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.
virtual bool end () override
 Reimplement this function to finish painting on the current paint device.
void fill (const QVectorPath &path, const QBrush &brush) override
void fillRect (const QRectF &rect, const QBrush &brush) override
void fillRect (const QRectF &rect, const QColor &color) override
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.
void drawRects (const QRectF *rects, int rectCount) override
 Draws the first rectCount rectangles in the buffer rects.
void drawPixmap (const QPointF &p, const QPixmap &pm) override
void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override
 Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
void setState (QPainterState *s) override
virtual void clipEnabledChanged () override
virtual void penChanged () override
virtual void brushChanged () override
virtual void opacityChanged () override
virtual void compositionModeChanged () override
virtual void renderHintsChanged () override
virtual void transformChanged () override
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.
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.
void fillPath (const QPainterPath &path, QSpanData *fillData) override
void fillPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
void drawEllipse (const QRectF &rect) override
 Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
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
 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 drawTiledPixmap (const QRectF &r, const QPixmap &pm, const QPointF &sr) override
 Reimplement this function to draw the pixmap in the given rect, starting at the given p.
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 This function draws the text item textItem at position p.
void drawPoints (const QPointF *points, int pointCount) override
 Draws the first pointCount points in the buffer points.
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 drawStaticTextItem (QStaticTextItem *) override
bool drawCachedGlyphs (int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QFontEngine *fontEngine) override
Public Member Functions inherited from QRasterPaintEngine
 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)
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
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 void draw (const QVectorPath &path)
virtual void clip (const QPainterPath &path, Qt::ClipOperation op)
virtual void drawRoundedRect (const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode)
virtual void drawEllipse (const QRect &r) 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 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 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.
QPainterStatestate ()
const QPainterStatestate () const
virtual void sync ()
virtual void beginNativePainting ()
virtual void endNativePainting ()
virtual uint flags () 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.
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
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)

Additional Inherited Members

Public Types inherited from QRasterPaintEngine
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...
Protected Member Functions inherited from QRasterPaintEngine
 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())
Protected Attributes inherited from QPaintEngine
QPaintEngineStatestate
PaintEngineFeatures gccaps
uint active: 1
uint selfDestruct: 1
uint extended: 1
QScopedPointer< QPaintEnginePrivated_ptr

Detailed Description

Definition at line 28 of file qpaintengine_blitter_p.h.

Constructor & Destructor Documentation

◆ QBlitterPaintEngine()

QBlitterPaintEngine::QBlitterPaintEngine ( QBlittablePlatformPixmap * p)

Definition at line 409 of file qpaintengine_blitter.cpp.

Member Function Documentation

◆ begin()

bool QBlitterPaintEngine::begin ( QPaintDevice * pdev)
overridevirtual

Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.

Return true if the initialization was successful; otherwise return false.

See also
end(), isActive()

Implements QPaintEngine.

Definition at line 469 of file qpaintengine_blitter.cpp.

◆ brushChanged()

void QBlitterPaintEngine::brushChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 422 of file qpaintengine_blitter.cpp.

◆ clipEnabledChanged()

void QBlitterPaintEngine::clipEnabledChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 462 of file qpaintengine_blitter.cpp.

◆ compositionModeChanged()

void QBlitterPaintEngine::compositionModeChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 438 of file qpaintengine_blitter.cpp.

◆ drawCachedGlyphs()

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

Reimplemented from QRasterPaintEngine.

Definition at line 771 of file qpaintengine_blitter.cpp.

◆ drawEllipse()

void QBlitterPaintEngine::drawEllipse ( const QRectF & rect)
overridevirtual

Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.

The default implementation calls drawPolygon().

Reimplemented from QPaintEngineEx.

Definition at line 697 of file qpaintengine_blitter.cpp.

◆ drawImage() [1/2]

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

Reimplemented from QPaintEngineEx.

Definition at line 705 of file qpaintengine_blitter.cpp.

◆ drawImage() [2/2]

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

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.

Implements QPaintEngineEx.

Definition at line 710 of file qpaintengine_blitter.cpp.

◆ drawPixmap() [1/2]

void QBlitterPaintEngine::drawPixmap ( const QPointF & p,
const QPixmap & pm )
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 628 of file qpaintengine_blitter.cpp.

◆ drawPixmap() [2/2]

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

Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.

Implements QPaintEngineEx.

Definition at line 633 of file qpaintengine_blitter.cpp.

◆ drawPoints() [1/2]

void QBlitterPaintEngine::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 743 of file qpaintengine_blitter.cpp.

◆ drawPoints() [2/2]

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

Draws the first pointCount points in the buffer points.

Reimplemented from QPaintEngineEx.

Definition at line 735 of file qpaintengine_blitter.cpp.

◆ drawPolygon() [1/2]

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

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.

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

Reimplemented from QPaintEngineEx.

Definition at line 673 of file qpaintengine_blitter.cpp.

◆ drawPolygon() [2/2]

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

Reimplement this virtual function 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 QPaintEngineEx.

Definition at line 665 of file qpaintengine_blitter.cpp.

◆ drawRects() [1/2]

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

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.

Reimplemented from QPaintEngineEx.

Definition at line 604 of file qpaintengine_blitter.cpp.

◆ drawRects() [2/2]

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

Draws the first rectCount rectangles in the buffer rects.

The default implementation of this function calls drawPath() or drawPolygon() depending on the feature set of the paint engine.

Reimplemented from QPaintEngineEx.

Definition at line 616 of file qpaintengine_blitter.cpp.

◆ drawStaticTextItem()

void QBlitterPaintEngine::drawStaticTextItem ( QStaticTextItem * sti)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 759 of file qpaintengine_blitter.cpp.

◆ drawTextItem()

void QBlitterPaintEngine::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.

Definition at line 727 of file qpaintengine_blitter.cpp.

◆ drawTiledPixmap()

void QBlitterPaintEngine::drawTiledPixmap ( const QRectF & rect,
const QPixmap & pixmap,
const QPointF & p )
overridevirtual

Reimplement this function to draw the pixmap in the given rect, starting at the given p.

The pixmap will be drawn repeatedly until the rect is filled.

Reimplemented from QPaintEngineEx.

Definition at line 719 of file qpaintengine_blitter.cpp.

◆ end()

bool QBlitterPaintEngine::end ( )
overridevirtual

Reimplement this function to finish painting on the current paint device.

Return true if painting was finished successfully; otherwise return false.

See also
begin(), isActive()

Implements QPaintEngine.

Definition at line 480 of file qpaintengine_blitter.cpp.

◆ fill()

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

Implements QPaintEngineEx.

Definition at line 499 of file qpaintengine_blitter.cpp.

◆ fillPath()

void QBlitterPaintEngine::fillPath ( const QPainterPath & path,
QSpanData * fillData )
overridevirtual

Reimplemented from QRasterPaintEngine.

Definition at line 681 of file qpaintengine_blitter.cpp.

◆ fillPolygon()

void QBlitterPaintEngine::fillPolygon ( const QPointF * points,
int pointCount,
PolygonDrawMode mode )
overridevirtual

Reimplemented from QRasterPaintEngine.

Definition at line 689 of file qpaintengine_blitter.cpp.

◆ fillRect() [1/2]

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

Reimplemented from QPaintEngineEx.

Definition at line 526 of file qpaintengine_blitter.cpp.

◆ fillRect() [2/2]

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

Reimplemented from QPaintEngineEx.

Definition at line 512 of file qpaintengine_blitter.cpp.

◆ opacityChanged()

void QBlitterPaintEngine::opacityChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 430 of file qpaintengine_blitter.cpp.

◆ penChanged()

void QBlitterPaintEngine::penChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 414 of file qpaintengine_blitter.cpp.

◆ renderHintsChanged()

void QBlitterPaintEngine::renderHintsChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 446 of file qpaintengine_blitter.cpp.

◆ setState()

void QBlitterPaintEngine::setState ( QPainterState * s)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 490 of file qpaintengine_blitter.cpp.

◆ stroke()

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

Reimplemented from QPaintEngineEx.

Definition at line 751 of file qpaintengine_blitter.cpp.

◆ transformChanged()

void QBlitterPaintEngine::transformChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 454 of file qpaintengine_blitter.cpp.

◆ type()

virtual QPaintEngine::Type QBlitterPaintEngine::type ( ) const
inlineoverridevirtual

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

Implements QPaintEngine.

Definition at line 34 of file qpaintengine_blitter_p.h.


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