Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickContext2DCommandBuffer Class Reference

#include <qquickcontext2dcommandbuffer_p.h>

+ Collaboration diagram for QQuickContext2DCommandBuffer:

Public Member Functions

 QQuickContext2DCommandBuffer ()
 
 ~QQuickContext2DCommandBuffer ()
 
void reset ()
 
void clear ()
 
int size () const
 
bool isEmpty () const
 
bool hasNext () const
 
QQuickContext2D::PaintCommand takeNextCommand ()
 
qreal takeGlobalAlpha ()
 
QPainter::CompositionMode takeGlobalCompositeOperation ()
 
QBrush takeStrokeStyle ()
 
QBrush takeFillStyle ()
 
qreal takeLineWidth ()
 
Qt::PenCapStyle takeLineCap ()
 
Qt::PenJoinStyle takeLineJoin ()
 
qreal takeMiterLimit ()
 
void setGlobalAlpha (qreal alpha)
 
void setGlobalCompositeOperation (QPainter::CompositionMode cm)
 
void setStrokeStyle (const QBrush &style, bool repeatX=false, bool repeatY=false)
 
void drawImage (const QImage &image, const QRectF &sr, const QRectF &dr)
 
void drawPixmap (QQmlRefPointer< QQuickCanvasPixmap > pixmap, const QRectF &sr, const QRectF &dr)
 
qreal takeShadowOffsetX ()
 
qreal takeShadowOffsetY ()
 
qreal takeShadowBlur ()
 
QColor takeShadowColor ()
 
void updateMatrix (const QTransform &matrix)
 
void clearRect (const QRectF &r)
 
void fillRect (const QRectF &r)
 
void strokeRect (const QRectF &r)
 
void fill (const QPainterPath &path)
 
void stroke (const QPainterPath &path)
 
void clip (bool enabled, const QPainterPath &path)
 
void setFillStyle (const QBrush &style, bool repeatX=false, bool repeatY=false)
 
void setLineWidth (qreal w)
 
void setLineCap (Qt::PenCapStyle cap)
 
void setLineJoin (Qt::PenJoinStyle join)
 
void setLineDash (const QVector< qreal > &pattern)
 
void setLineDashOffset (qreal offset)
 
void setMiterLimit (qreal limit)
 
void setShadowOffsetX (qreal x)
 
void setShadowOffsetY (qreal y)
 
void setShadowBlur (qreal b)
 
void setShadowColor (const QColor &color)
 
QTransform takeMatrix ()
 
QRectF takeRect ()
 
QPainterPath takePath ()
 
const QImagetakeImage ()
 
QQmlRefPointer< QQuickCanvasPixmaptakePixmap ()
 
int takeInt ()
 
bool takeBool ()
 
qreal takeReal ()
 
QColor takeColor ()
 
QBrush takeBrush ()
 
void replay (QPainter *painter, QQuickContext2D::State &state, const QVector2D &scaleFactor)
 

Detailed Description

Definition at line 30 of file qquickcontext2dcommandbuffer_p.h.

Constructor & Destructor Documentation

◆ QQuickContext2DCommandBuffer()

QQuickContext2DCommandBuffer::QQuickContext2DCommandBuffer ( )

Definition at line 436 of file qquickcontext2dcommandbuffer.cpp.

◆ ~QQuickContext2DCommandBuffer()

QQuickContext2DCommandBuffer::~QQuickContext2DCommandBuffer ( )

Definition at line 457 of file qquickcontext2dcommandbuffer.cpp.

Member Function Documentation

◆ clear()

void QQuickContext2DCommandBuffer::clear ( )

Definition at line 461 of file qquickcontext2dcommandbuffer.cpp.

References reset().

+ Here is the call graph for this function:

◆ clearRect()

void QQuickContext2DCommandBuffer::clearRect ( const QRectF & r)
inline

Definition at line 98 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::ClearRect.

Referenced by QQuickContext2D::reset().

+ Here is the caller graph for this function:

◆ clip()

void QQuickContext2DCommandBuffer::clip ( bool enabled,
const QPainterPath & path )
inline

Definition at line 133 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::Clip, and enabled.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ drawImage()

void QQuickContext2DCommandBuffer::drawImage ( const QImage & image,
const QRectF & sr,
const QRectF & dr )
inline

Definition at line 72 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::DrawImage.

◆ drawPixmap()

void QQuickContext2DCommandBuffer::drawPixmap ( QQmlRefPointer< QQuickCanvasPixmap > pixmap,
const QRectF & sr,
const QRectF & dr )
inline

Definition at line 79 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::DrawPixmap, and pixmap.

◆ fill()

void QQuickContext2DCommandBuffer::fill ( const QPainterPath & path)
inline

Definition at line 120 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::Fill.

◆ fillRect()

void QQuickContext2DCommandBuffer::fillRect ( const QRectF & r)
inline

Definition at line 104 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::FillRect.

◆ hasNext()

bool QQuickContext2DCommandBuffer::hasNext ( ) const
inline

Definition at line 40 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ isEmpty()

bool QQuickContext2DCommandBuffer::isEmpty ( ) const
inline

Definition at line 39 of file qquickcontext2dcommandbuffer_p.h.

◆ replay()

void QQuickContext2DCommandBuffer::replay ( QPainter * painter,
QQuickContext2D::State & state,
const QVector2D & scaleFactor )

Definition at line 226 of file qquickcontext2dcommandbuffer.cpp.

References QQuickContext2D::ClearRect, QQuickContext2D::Clip, QPainter::CompositionMode_Clear, QQuickContext2D::DrawImage, QQuickContext2D::DrawPixmap, QQuickContext2D::Fill, QQuickContext2D::FillRect, fillRectShadow(), fillShadowPath(), QQuickContext2D::FillStyle, QQuickContext2D::GetImageData, QQuickContext2D::GlobalAlpha, QQuickContext2D::GlobalCompositeOperation, HAS_SHADOW, hasNext(), i, QPixmap::isNull(), QQuickContext2D::LineCap, QQuickContext2D::LineDash, QQuickContext2D::LineDashOffset, QQuickContext2D::LineJoin, QQuickContext2D::LineWidth, QQuickContext2D::MiterLimit, pix, Q_ASSERT, qt_drawImage(), reset(), QPen::setBrush(), QPen::setCapStyle(), QPen::setDashOffset(), QPen::setDashPattern(), QPen::setJoinStyle(), QPen::setMiterLimit(), QPen::setWidthF(), QQuickContext2D::ShadowBlur, QQuickContext2D::ShadowColor, QQuickContext2D::ShadowOffsetX, QQuickContext2D::ShadowOffsetY, Qt::SolidLine, state, QQuickContext2D::Stroke, strokeShadowPath(), QQuickContext2D::StrokeStyle, takeBool(), takeColor(), takeFillStyle(), takeGlobalAlpha(), takeGlobalCompositeOperation(), takeImage(), takeLineCap(), takeLineJoin(), takeLineWidth(), takeMatrix(), takeMiterLimit(), takeNextCommand(), takePath(), takePixmap(), takeReal(), takeRect(), takeShadowBlur(), takeShadowOffsetX(), takeShadowOffsetY(), takeStrokeStyle(), QQuickContext2D::TextAlign, QQuickContext2D::TextBaseline, QQuickContext2D::UpdateMatrix, Qt::white, QVector2D::x(), and QVector2D::y().

+ Here is the call graph for this function:

◆ reset()

void QQuickContext2DCommandBuffer::reset ( )

Definition at line 477 of file qquickcontext2dcommandbuffer.cpp.

Referenced by clear(), and replay().

+ Here is the caller graph for this function:

◆ setFillStyle()

void QQuickContext2DCommandBuffer::setFillStyle ( const QBrush & style,
bool repeatX = false,
bool repeatY = false )
inline

Definition at line 142 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::FillStyle.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setGlobalAlpha()

void QQuickContext2DCommandBuffer::setGlobalAlpha ( qreal alpha)
inline

Definition at line 53 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::GlobalAlpha.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setGlobalCompositeOperation()

void QQuickContext2DCommandBuffer::setGlobalCompositeOperation ( QPainter::CompositionMode cm)
inline

Definition at line 59 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::GlobalCompositeOperation.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setLineCap()

void QQuickContext2DCommandBuffer::setLineCap ( Qt::PenCapStyle cap)
inline

Definition at line 156 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::LineCap.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setLineDash()

void QQuickContext2DCommandBuffer::setLineDash ( const QVector< qreal > & pattern)
inline

Definition at line 168 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::LineDash.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setLineDashOffset()

void QQuickContext2DCommandBuffer::setLineDashOffset ( qreal offset)
inline

Definition at line 176 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::LineDashOffset.

◆ setLineJoin()

void QQuickContext2DCommandBuffer::setLineJoin ( Qt::PenJoinStyle join)
inline

Definition at line 162 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::LineJoin.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setLineWidth()

void QQuickContext2DCommandBuffer::setLineWidth ( qreal w)
inline

Definition at line 150 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::LineWidth.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setMiterLimit()

void QQuickContext2DCommandBuffer::setMiterLimit ( qreal limit)
inline

Definition at line 182 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::MiterLimit.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setShadowBlur()

void QQuickContext2DCommandBuffer::setShadowBlur ( qreal b)
inline

Definition at line 200 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::ShadowBlur.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setShadowColor()

void QQuickContext2DCommandBuffer::setShadowColor ( const QColor & color)
inline

Definition at line 206 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::ShadowColor.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setShadowOffsetX()

void QQuickContext2DCommandBuffer::setShadowOffsetX ( qreal x)
inline

Definition at line 188 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::ShadowOffsetX.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setShadowOffsetY()

void QQuickContext2DCommandBuffer::setShadowOffsetY ( qreal y)
inline

Definition at line 194 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::ShadowOffsetY.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ setStrokeStyle()

void QQuickContext2DCommandBuffer::setStrokeStyle ( const QBrush & style,
bool repeatX = false,
bool repeatY = false )
inline

Definition at line 65 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::StrokeStyle.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

◆ size()

int QQuickContext2DCommandBuffer::size ( ) const
inline

Definition at line 38 of file qquickcontext2dcommandbuffer_p.h.

◆ stroke()

void QQuickContext2DCommandBuffer::stroke ( const QPainterPath & path)
inline

Definition at line 127 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::Stroke.

◆ strokeRect()

void QQuickContext2DCommandBuffer::strokeRect ( const QRectF & r)
inline

Definition at line 110 of file qquickcontext2dcommandbuffer_p.h.

References QPainterPath::addRect(), and QQuickContext2D::Stroke.

+ Here is the call graph for this function:

◆ takeBool()

bool QQuickContext2DCommandBuffer::takeBool ( )
inline

Definition at line 222 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takeBrush()

QBrush QQuickContext2DCommandBuffer::takeBrush ( )
inline

Definition at line 225 of file qquickcontext2dcommandbuffer_p.h.

Referenced by takeFillStyle(), and takeStrokeStyle().

+ Here is the caller graph for this function:

◆ takeColor()

QColor QQuickContext2DCommandBuffer::takeColor ( )
inline

Definition at line 224 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay(), and takeShadowColor().

+ Here is the caller graph for this function:

◆ takeFillStyle()

QBrush QQuickContext2DCommandBuffer::takeFillStyle ( )
inline

Definition at line 46 of file qquickcontext2dcommandbuffer_p.h.

References takeBrush().

Referenced by replay().

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

◆ takeGlobalAlpha()

qreal QQuickContext2DCommandBuffer::takeGlobalAlpha ( )
inline

Definition at line 43 of file qquickcontext2dcommandbuffer_p.h.

References takeReal().

Referenced by replay().

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

◆ takeGlobalCompositeOperation()

QPainter::CompositionMode QQuickContext2DCommandBuffer::takeGlobalCompositeOperation ( )
inline

Definition at line 44 of file qquickcontext2dcommandbuffer_p.h.

References takeInt().

Referenced by replay().

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

◆ takeImage()

const QImage & QQuickContext2DCommandBuffer::takeImage ( )
inline

Definition at line 218 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takeInt()

int QQuickContext2DCommandBuffer::takeInt ( )
inline

Definition at line 221 of file qquickcontext2dcommandbuffer_p.h.

Referenced by takeGlobalCompositeOperation(), takeLineCap(), and takeLineJoin().

+ Here is the caller graph for this function:

◆ takeLineCap()

Qt::PenCapStyle QQuickContext2DCommandBuffer::takeLineCap ( )
inline

Definition at line 49 of file qquickcontext2dcommandbuffer_p.h.

References takeInt().

Referenced by replay().

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

◆ takeLineJoin()

Qt::PenJoinStyle QQuickContext2DCommandBuffer::takeLineJoin ( )
inline

Definition at line 50 of file qquickcontext2dcommandbuffer_p.h.

References takeInt().

Referenced by replay().

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

◆ takeLineWidth()

qreal QQuickContext2DCommandBuffer::takeLineWidth ( )
inline

Definition at line 48 of file qquickcontext2dcommandbuffer_p.h.

References takeReal().

Referenced by replay().

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

◆ takeMatrix()

QTransform QQuickContext2DCommandBuffer::takeMatrix ( )
inline

Definition at line 212 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takeMiterLimit()

qreal QQuickContext2DCommandBuffer::takeMiterLimit ( )
inline

Definition at line 51 of file qquickcontext2dcommandbuffer_p.h.

References takeReal().

Referenced by replay().

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

◆ takeNextCommand()

QQuickContext2D::PaintCommand QQuickContext2DCommandBuffer::takeNextCommand ( )
inline

Definition at line 41 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takePath()

QPainterPath QQuickContext2DCommandBuffer::takePath ( )
inline

Definition at line 216 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takePixmap()

QQmlRefPointer< QQuickCanvasPixmap > QQuickContext2DCommandBuffer::takePixmap ( )
inline

Definition at line 219 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takeReal()

qreal QQuickContext2DCommandBuffer::takeReal ( )
inline

Definition at line 223 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay(), takeGlobalAlpha(), takeLineWidth(), takeMiterLimit(), takeShadowBlur(), takeShadowOffsetX(), and takeShadowOffsetY().

+ Here is the caller graph for this function:

◆ takeRect()

QRectF QQuickContext2DCommandBuffer::takeRect ( )
inline

Definition at line 214 of file qquickcontext2dcommandbuffer_p.h.

Referenced by replay().

+ Here is the caller graph for this function:

◆ takeShadowBlur()

qreal QQuickContext2DCommandBuffer::takeShadowBlur ( )
inline

Definition at line 88 of file qquickcontext2dcommandbuffer_p.h.

References takeReal().

Referenced by replay().

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

◆ takeShadowColor()

QColor QQuickContext2DCommandBuffer::takeShadowColor ( )
inline

Definition at line 89 of file qquickcontext2dcommandbuffer_p.h.

References takeColor().

+ Here is the call graph for this function:

◆ takeShadowOffsetX()

qreal QQuickContext2DCommandBuffer::takeShadowOffsetX ( )
inline

Definition at line 86 of file qquickcontext2dcommandbuffer_p.h.

References takeReal().

Referenced by replay().

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

◆ takeShadowOffsetY()

qreal QQuickContext2DCommandBuffer::takeShadowOffsetY ( )
inline

Definition at line 87 of file qquickcontext2dcommandbuffer_p.h.

References takeReal().

Referenced by replay().

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

◆ takeStrokeStyle()

QBrush QQuickContext2DCommandBuffer::takeStrokeStyle ( )
inline

Definition at line 45 of file qquickcontext2dcommandbuffer_p.h.

References takeBrush().

Referenced by replay().

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

◆ updateMatrix()

void QQuickContext2DCommandBuffer::updateMatrix ( const QTransform & matrix)
inline

Definition at line 92 of file qquickcontext2dcommandbuffer_p.h.

References QQuickContext2D::UpdateMatrix.

Referenced by QQuickContext2D::popState().

+ Here is the caller graph for this function:

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