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

#include <qquickcontext2d_p.h>

+ Inheritance diagram for QQuickContext2D:
+ Collaboration diagram for QQuickContext2D:

Classes

struct  State
 

Public Types

enum  TextBaseLineType {
  Alphabetic =0 , Top , Middle , Bottom ,
  Hanging
}
 
enum  TextAlignType {
  Start =0 , End , Left , Right ,
  Center
}
 
enum  PaintCommand {
  Invalid = 0 , UpdateMatrix , ClearRect , FillRect ,
  StrokeRect , Fill , Stroke , Clip ,
  UpdateBrush , GlobalAlpha , GlobalCompositeOperation , StrokeStyle ,
  FillStyle , LineWidth , LineCap , LineJoin ,
  LineDash , LineDashOffset , MiterLimit , ShadowOffsetX ,
  ShadowOffsetY , ShadowBlur , ShadowColor , Font ,
  TextBaseline , TextAlign , FillText , StrokeText ,
  DrawImage , DrawPixmap , GetImageData
}
 

Public Member Functions

 QQuickContext2D (QObject *parent=nullptr)
 
 ~QQuickContext2D ()
 
QStringList contextNames () const override
 
void init (QQuickCanvasItem *canvasItem, const QVariantMap &args) override
 
void prepare (const QSize &canvasSize, const QSize &tileSize, const QRect &canvasWindow, const QRect &dirtyRect, bool smooth, bool antialiasing) override
 
void flush () override
 
void sync ()
 
QThreadthread () const
 
QQuickContext2DTexturetexture () const
 
QImage toImage (const QRectF &bounds) override
 
QV4::ReturnedValue v4value () const override
 
QV4::ExecutionEnginev4Engine () const override
 
void setV4Engine (QV4::ExecutionEngine *eng) override
 
QQuickCanvasItemcanvas () const
 
QQuickContext2DCommandBufferbuffer () const
 
bool bufferValid () const
 
void popState ()
 
void pushState ()
 
void reset ()
 
void fill ()
 
void clip ()
 
void stroke ()
 
void fillRect (qreal x, qreal y, qreal w, qreal h)
 
void strokeRect (qreal x, qreal y, qreal w, qreal h)
 
void clearRect (qreal x, qreal y, qreal w, qreal h)
 
void drawText (const QString &text, qreal x, qreal y, bool fill)
 
void scale (qreal x, qreal y)
 
void rotate (qreal angle)
 
void shear (qreal h, qreal v)
 
void translate (qreal x, qreal y)
 
void transform (qreal a, qreal b, qreal c, qreal d, qreal e, qreal f)
 
void setTransform (qreal a, qreal b, qreal c, qreal d, qreal e, qreal f)
 
void beginPath ()
 
void closePath ()
 
void moveTo (qreal x, qreal y)
 
void lineTo (qreal x, qreal y)
 
void quadraticCurveTo (qreal cpx, qreal cpy, qreal x, qreal y)
 
void bezierCurveTo (qreal cp1x, qreal cp1y, qreal cp2x, qreal cp2y, qreal x, qreal y)
 
void arcTo (qreal x1, qreal y1, qreal x2, qreal y2, qreal radius)
 
void rect (qreal x, qreal y, qreal w, qreal h)
 
void roundedRect (qreal x, qreal y, qreal w, qreal h, qreal xr, qreal yr)
 
void ellipse (qreal x, qreal y, qreal w, qreal h)
 
void text (const QString &str, qreal x, qreal y)
 
void arc (qreal x, qreal y, qreal radius, qreal startAngle, qreal endAngle, bool anticlockwise)
 
void addArcTo (const QPointF &p1, const QPointF &p2, qreal radius)
 
bool isPointInPath (qreal x, qreal y) const
 
QPainterPath createTextGlyphs (qreal x, qreal y, const QString &text)
 
QQmlRefPointer< QQuickCanvasPixmapcreatePixmap (const QUrl &url, QSizeF sourceSize=QSizeF())
 
QSurfacesurface () const
 
void setGrabbedImage (const QImage &grab)
 
- Public Member Functions inherited from QQuickCanvasContext
 QQuickCanvasContext (QObject *parent=nullptr)
 
 ~QQuickCanvasContext ()
 
virtual QStringList contextNames () const =0
 
virtual void init (QQuickCanvasItem *canvasItem, const QVariantMap &args)=0
 
virtual void prepare (const QSize &canvasSize, const QSize &tileSize, const QRect &canvasWindow, const QRect &dirtyRect, bool smooth, bool antialiasing)
 
virtual void flush ()
 
virtual QV4::ExecutionEnginev4Engine () const =0
 
virtual void setV4Engine (QV4::ExecutionEngine *engine)=0
 
virtual QV4::ReturnedValue v4value () const =0
 
virtual QImage toImage (const QRectF &bounds)=0
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
template<typename T >
findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 

Public Attributes

State state
 
QStack< QQuickContext2D::Statem_stateStack
 
QQuickCanvasItemm_canvas
 
QQuickContext2DCommandBufferm_buffer
 
QPainterPath m_path
 
QV4::PersistentValue m_fillStyle
 
QV4::PersistentValue m_strokeStyle
 
QV4::PersistentValue m_v4path
 
QV4::ExecutionEnginem_v4engine
 
QScopedPointer< QOffscreenSurfacem_surface
 
QV4::PersistentValue m_v4value
 
QQuickContext2DTexturem_texture
 
QQuickCanvasItem::RenderTarget m_renderTarget
 
QQuickCanvasItem::RenderStrategy m_renderStrategy
 
QQueue< QQuickContext2DCommandBuffer * > m_bufferQueue
 
QThreadm_thread
 
QImage m_grabbedImage
 
bool m_grabbed:1
 

Static Public Attributes

static QMutex mutex
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Signals inherited from QQuickCanvasContext
void textureChanged ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Detailed Description

Definition at line 54 of file qquickcontext2d_p.h.

Member Enumeration Documentation

◆ PaintCommand

Enumerator
Invalid 
UpdateMatrix 
ClearRect 
FillRect 
StrokeRect 
Fill 
Stroke 
Clip 
UpdateBrush 
GlobalAlpha 
GlobalCompositeOperation 
StrokeStyle 
FillStyle 
LineWidth 
LineCap 
LineJoin 
LineDash 
LineDashOffset 
MiterLimit 
ShadowOffsetX 
ShadowOffsetY 
ShadowBlur 
ShadowColor 
Font 
TextBaseline 
TextAlign 
FillText 
StrokeText 
DrawImage 
DrawPixmap 
GetImageData 

Definition at line 63 of file qquickcontext2d_p.h.

◆ TextAlignType

Enumerator
Start 
End 
Left 
Right 
Center 

Definition at line 62 of file qquickcontext2d_p.h.

◆ TextBaseLineType

Enumerator
Alphabetic 
Top 
Middle 
Bottom 
Hanging 

Definition at line 61 of file qquickcontext2d_p.h.

Constructor & Destructor Documentation

◆ QQuickContext2D()

QQuickContext2D::QQuickContext2D ( QObject parent = nullptr)

Definition at line 4230 of file qquickcontext2d.cpp.

◆ ~QQuickContext2D()

QQuickContext2D::~QQuickContext2D ( )

Definition at line 4240 of file qquickcontext2d.cpp.

References QObject::deleteLater(), QMutex::lock(), m_buffer, m_texture, mutex, QQuickContext2DTexture::setItem(), and QMutex::unlock().

+ Here is the call graph for this function:

Member Function Documentation

◆ addArcTo()

void QQuickContext2D::addArcTo ( const QPointF p1,
const QPointF p2,
qreal  radius 
)

Definition at line 3916 of file qquickcontext2d.cpp.

References QPointF::dotProduct(), M_PI, p1, p2, qFuzzyCompare(), QPointF::x(), and QPointF::y().

+ Here is the call graph for this function:

◆ arc()

void QQuickContext2D::arc ( qreal  x,
qreal  y,
qreal  radius,
qreal  startAngle,
qreal  endAngle,
bool  anticlockwise 
)

Definition at line 4048 of file qquickcontext2d.cpp.

References qAbs(), qFuzzyCompare(), qRadiansToDegrees(), qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ arcTo()

void QQuickContext2D::arcTo ( qreal  x1,
qreal  y1,
qreal  x2,
qreal  y2,
qreal  radius 
)

Definition at line 3969 of file qquickcontext2d.cpp.

References qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ beginPath()

void QQuickContext2D::beginPath ( )

Definition at line 3846 of file qquickcontext2d.cpp.

◆ bezierCurveTo()

void QQuickContext2D::bezierCurveTo ( qreal  cp1x,
qreal  cp1y,
qreal  cp2x,
qreal  cp2y,
qreal  x,
qreal  y 
)

Definition at line 3901 of file qquickcontext2d.cpp.

References state.

◆ buffer()

QQuickContext2DCommandBuffer * QQuickContext2D::buffer ( ) const
inline

Definition at line 171 of file qquickcontext2d_p.h.

References m_buffer.

Referenced by popState().

+ Here is the caller graph for this function:

◆ bufferValid()

bool QQuickContext2D::bufferValid ( ) const
inline

Definition at line 173 of file qquickcontext2d_p.h.

References m_buffer.

◆ canvas()

QQuickCanvasItem * QQuickContext2D::canvas ( ) const
inline

Definition at line 170 of file qquickcontext2d_p.h.

References m_canvas.

◆ clearRect()

void QQuickContext2D::clearRect ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
)

Definition at line 3819 of file qquickcontext2d.cpp.

References qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ clip()

void QQuickContext2D::clip ( )

Definition at line 3770 of file qquickcontext2d.cpp.

References QPainterPath::closeSubpath(), QPainterPath::intersected(), and state.

+ Here is the call graph for this function:

◆ closePath()

void QQuickContext2D::closePath ( )

Definition at line 3853 of file qquickcontext2d.cpp.

References QRectF::height(), and QRectF::width().

+ Here is the call graph for this function:

◆ contextNames()

QStringList QQuickContext2D::contextNames ( ) const
overridevirtual

Implements QQuickCanvasContext.

Definition at line 4255 of file qquickcontext2d.cpp.

References QStringLiteral.

◆ createPixmap()

QQmlRefPointer< QQuickCanvasPixmap > QQuickContext2D::createPixmap ( const QUrl url,
QSizeF  sourceSize = QSizeF() 
)

Definition at line 4155 of file qquickcontext2d.cpp.

References url.

◆ createTextGlyphs()

QPainterPath QQuickContext2D::createTextGlyphs ( qreal  x,
qreal  y,
const QString text 
)

Definition at line 4160 of file qquickcontext2d.cpp.

References QPainterPath::addText(), baseLineOffset(), state, text, and textAlignOffset().

+ Here is the call graph for this function:

◆ drawText()

void QQuickContext2D::drawText ( const QString text,
qreal  x,
qreal  y,
bool  fill 
)

Definition at line 3830 of file qquickcontext2d.cpp.

References fill(), qt_is_finite(), state, and text.

+ Here is the call graph for this function:

◆ ellipse()

void QQuickContext2D::ellipse ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
)

Definition at line 4021 of file qquickcontext2d.cpp.

References qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ fill()

void QQuickContext2D::fill ( )

Definition at line 3758 of file qquickcontext2d.cpp.

References state.

◆ fillRect()

void QQuickContext2D::fillRect ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
)

Definition at line 3797 of file qquickcontext2d.cpp.

References qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ flush()

void QQuickContext2D::flush ( )
overridevirtual

Reimplemented from QQuickCanvasContext.

Definition at line 4317 of file qquickcontext2d.cpp.

References QThread::currentThread(), m_buffer, m_texture, QQuickContext2DTexture::paint(), QCoreApplication::postEvent(), and QObject::thread().

Referenced by toImage().

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

◆ init()

◆ isPointInPath()

bool QQuickContext2D::isPointInPath ( qreal  x,
qreal  y 
) const

Definition at line 4184 of file qquickcontext2d.cpp.

References areCollinear(), contains(), i, QTransform::inverted(), QTransform::map(), p1, p2, qAbs(), qt_is_finite(), state, and withinRange().

+ Here is the call graph for this function:

◆ lineTo()

void QQuickContext2D::lineTo ( qreal  x,
qreal  y 
)

Definition at line 3874 of file qquickcontext2d.cpp.

References state.

◆ moveTo()

void QQuickContext2D::moveTo ( qreal  x,
qreal  y 
)

Definition at line 3865 of file qquickcontext2d.cpp.

References state.

◆ popState()

void QQuickContext2D::popState ( )

Definition at line 4396 of file qquickcontext2d.cpp.

References buffer(), QQuickContext2D::State::clip, QQuickContext2DCommandBuffer::clip(), QQuickContext2D::State::clipPath, QQuickContext2D::State::fillStyle, QQuickContext2D::State::globalAlpha, QQuickContext2D::State::globalCompositeOperation, QTransform::inverted(), QList< T >::isEmpty(), QQuickContext2D::State::lineCap, QQuickContext2D::State::lineDash, QQuickContext2D::State::lineJoin, QQuickContext2D::State::lineWidth, m_path, m_stateStack, QTransform::map(), QQuickContext2D::State::matrix, QQuickContext2D::State::miterLimit, newState(), QStack< T >::pop(), QQuickContext2DCommandBuffer::setFillStyle(), QQuickContext2DCommandBuffer::setGlobalAlpha(), QQuickContext2DCommandBuffer::setGlobalCompositeOperation(), QQuickContext2DCommandBuffer::setLineCap(), QQuickContext2DCommandBuffer::setLineDash(), QQuickContext2DCommandBuffer::setLineJoin(), QQuickContext2DCommandBuffer::setLineWidth(), QQuickContext2DCommandBuffer::setMiterLimit(), QQuickContext2DCommandBuffer::setShadowBlur(), QQuickContext2DCommandBuffer::setShadowColor(), QQuickContext2DCommandBuffer::setShadowOffsetX(), QQuickContext2DCommandBuffer::setShadowOffsetY(), QQuickContext2DCommandBuffer::setStrokeStyle(), QQuickContext2D::State::shadowBlur, QQuickContext2D::State::shadowColor, QQuickContext2D::State::shadowOffsetX, QQuickContext2D::State::shadowOffsetY, state, QQuickContext2D::State::strokeStyle, and QQuickContext2DCommandBuffer::updateMatrix().

Referenced by reset().

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

◆ prepare()

void QQuickContext2D::prepare ( const QSize canvasSize,
const QSize tileSize,
const QRect canvasWindow,
const QRect dirtyRect,
bool  smooth,
bool  antialiasing 
)
overridevirtual

Reimplemented from QQuickCanvasContext.

Definition at line 4302 of file qquickcontext2d.cpp.

References QQuickContext2DTexture::canvasChanged(), QThread::currentThread(), e, m_texture, QCoreApplication::postEvent(), QObject::thread(), and tileSize.

+ Here is the call graph for this function:

◆ pushState()

void QQuickContext2D::pushState ( )

Definition at line 4452 of file qquickcontext2d.cpp.

References m_stateStack, QStack< T >::push(), and state.

+ Here is the call graph for this function:

◆ quadraticCurveTo()

void QQuickContext2D::quadraticCurveTo ( qreal  cpx,
qreal  cpy,
qreal  x,
qreal  y 
)

Definition at line 3887 of file qquickcontext2d.cpp.

References state.

◆ rect()

void QQuickContext2D::rect ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
)

Definition at line 3990 of file qquickcontext2d.cpp.

References qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ reset()

void QQuickContext2D::reset ( )

Definition at line 4457 of file qquickcontext2d.cpp.

References QList< T >::clear(), QQuickContext2DCommandBuffer::clearRect(), QQuickItem::height, m_buffer, m_canvas, m_path, m_stateStack, newState(), popState(), QStack< T >::push(), QQuickItem::width, and Qt::WindingFill.

Referenced by init().

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

◆ rotate()

void QQuickContext2D::rotate ( qreal  angle)

Definition at line 3660 of file qquickcontext2d.cpp.

References QTransform::isInvertible(), QTransform::map(), qRadiansToDegrees(), qt_is_finite(), QTransform::rotate(), and state.

+ Here is the call graph for this function:

◆ roundedRect()

void QQuickContext2D::roundedRect ( qreal  x,
qreal  y,
qreal  w,
qreal  h,
qreal  xr,
qreal  yr 
)

Definition at line 4004 of file qquickcontext2d.cpp.

References Qt::AbsoluteSize, qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ scale()

void QQuickContext2D::scale ( qreal  x,
qreal  y 
)

Definition at line 3639 of file qquickcontext2d.cpp.

References QTransform::isInvertible(), QTransform::map(), qt_is_finite(), QTransform::scale(), and state.

+ Here is the call graph for this function:

◆ setGrabbedImage()

void QQuickContext2D::setGrabbedImage ( const QImage grab)

Definition at line 4149 of file qquickcontext2d.cpp.

Referenced by QQuickContext2DImageTexture::grabImage().

+ Here is the caller graph for this function:

◆ setTransform()

void QQuickContext2D::setTransform ( qreal  a,
qreal  b,
qreal  c,
qreal  d,
qreal  e,
qreal  f 
)

Definition at line 3743 of file qquickcontext2d.cpp.

References d, e, QTransform::inverted(), QTransform::isInvertible(), QTransform::map(), qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ setV4Engine()

void QQuickContext2D::setV4Engine ( QV4::ExecutionEngine eng)
overridevirtual

Implements QQuickCanvasContext.

Definition at line 4476 of file qquickcontext2d.cpp.

References QQuickContext2DEngineData::contextPrototype, engine, m_v4engine, m_v4value, QV4::PersistentValue::value(), and wrapper().

+ Here is the call graph for this function:

◆ shear()

void QQuickContext2D::shear ( qreal  h,
qreal  v 
)

Definition at line 3681 of file qquickcontext2d.cpp.

References QTransform::isInvertible(), QTransform::map(), qt_is_finite(), return, QTransform::shear(), and state.

+ Here is the call graph for this function:

◆ stroke()

void QQuickContext2D::stroke ( )

Definition at line 3786 of file qquickcontext2d.cpp.

References state.

◆ strokeRect()

void QQuickContext2D::strokeRect ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
)

Definition at line 3808 of file qquickcontext2d.cpp.

References qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ surface()

QSurface * QQuickContext2D::surface ( ) const
inline

Definition at line 217 of file qquickcontext2d_p.h.

References QScopedPointer< T, Cleanup >::data(), and m_surface.

+ Here is the call graph for this function:

◆ sync()

void QQuickContext2D::sync ( )

◆ text()

void QQuickContext2D::text ( const QString str,
qreal  x,
qreal  y 
)

Definition at line 4038 of file qquickcontext2d.cpp.

References state, and str.

◆ texture()

QQuickContext2DTexture * QQuickContext2D::texture ( ) const

Definition at line 4328 of file qquickcontext2d.cpp.

References m_texture.

◆ thread()

QThread * QQuickContext2D::thread ( ) const
inline

Definition at line 162 of file qquickcontext2d_p.h.

References m_thread.

◆ toImage()

QImage QQuickContext2D::toImage ( const QRectF bounds)
overridevirtual

Implements QQuickCanvasContext.

Definition at line 4333 of file qquickcontext2d.cpp.

References Qt::BlockingQueuedConnection, QQuickCanvasItem::Cooperative, QThread::currentThread(), flush(), QQuickContext2DTexture::grabImage(), QMetaObject::invokeMethod(), m_grabbed, m_grabbedImage, m_renderStrategy, m_texture, QCoreApplication::postEvent(), Q_ARG, qWarning, QObject::thread(), and QEvent::User.

+ Here is the call graph for this function:

◆ transform()

void QQuickContext2D::transform ( qreal  a,
qreal  b,
qreal  c,
qreal  d,
qreal  e,
qreal  f 
)

Definition at line 3723 of file qquickcontext2d.cpp.

References d, e, QTransform::isInvertible(), qt_is_finite(), and state.

+ Here is the call graph for this function:

◆ translate()

void QQuickContext2D::translate ( qreal  x,
qreal  y 
)

Definition at line 3702 of file qquickcontext2d.cpp.

References QTransform::isInvertible(), QTransform::map(), qt_is_finite(), return, state, and QTransform::translate().

+ Here is the call graph for this function:

◆ v4Engine()

QV4::ExecutionEngine * QQuickContext2D::v4Engine ( ) const
overridevirtual

Implements QQuickCanvasContext.

Definition at line 4471 of file qquickcontext2d.cpp.

References m_v4engine.

◆ v4value()

QV4::ReturnedValue QQuickContext2D::v4value ( ) const
overridevirtual

Implements QQuickCanvasContext.

Definition at line 4250 of file qquickcontext2d.cpp.

References m_v4value, and QV4::PersistentValue::value().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_buffer

QQuickContext2DCommandBuffer* QQuickContext2D::m_buffer

Definition at line 223 of file qquickcontext2d_p.h.

Referenced by ~QQuickContext2D(), buffer(), bufferValid(), flush(), and reset().

◆ m_bufferQueue

QQueue<QQuickContext2DCommandBuffer*> QQuickContext2D::m_bufferQueue

Definition at line 234 of file qquickcontext2d_p.h.

◆ m_canvas

QQuickCanvasItem* QQuickContext2D::m_canvas

Definition at line 222 of file qquickcontext2d_p.h.

Referenced by canvas(), init(), and reset().

◆ m_fillStyle

QV4::PersistentValue QQuickContext2D::m_fillStyle

Definition at line 225 of file qquickcontext2d_p.h.

◆ m_grabbed

bool QQuickContext2D::m_grabbed

Definition at line 237 of file qquickcontext2d_p.h.

Referenced by toImage().

◆ m_grabbedImage

QImage QQuickContext2D::m_grabbedImage

Definition at line 236 of file qquickcontext2d_p.h.

Referenced by toImage().

◆ m_path

QPainterPath QQuickContext2D::m_path

Definition at line 224 of file qquickcontext2d_p.h.

Referenced by popState(), and reset().

◆ m_renderStrategy

QQuickCanvasItem::RenderStrategy QQuickContext2D::m_renderStrategy

Definition at line 233 of file qquickcontext2d_p.h.

Referenced by init(), and toImage().

◆ m_renderTarget

QQuickCanvasItem::RenderTarget QQuickContext2D::m_renderTarget

Definition at line 232 of file qquickcontext2d_p.h.

Referenced by init().

◆ m_stateStack

QStack<QQuickContext2D::State> QQuickContext2D::m_stateStack

Definition at line 221 of file qquickcontext2d_p.h.

Referenced by popState(), pushState(), and reset().

◆ m_strokeStyle

QV4::PersistentValue QQuickContext2D::m_strokeStyle

Definition at line 226 of file qquickcontext2d_p.h.

◆ m_surface

QScopedPointer<QOffscreenSurface> QQuickContext2D::m_surface

Definition at line 229 of file qquickcontext2d_p.h.

Referenced by surface().

◆ m_texture

QQuickContext2DTexture* QQuickContext2D::m_texture

Definition at line 231 of file qquickcontext2d_p.h.

Referenced by ~QQuickContext2D(), flush(), init(), prepare(), texture(), and toImage().

◆ m_thread

QThread* QQuickContext2D::m_thread

Definition at line 235 of file qquickcontext2d_p.h.

Referenced by init(), and thread().

◆ m_v4engine

QV4::ExecutionEngine* QQuickContext2D::m_v4engine

Definition at line 228 of file qquickcontext2d_p.h.

Referenced by setV4Engine(), and v4Engine().

◆ m_v4path

QV4::PersistentValue QQuickContext2D::m_v4path

Definition at line 227 of file qquickcontext2d_p.h.

◆ m_v4value

QV4::PersistentValue QQuickContext2D::m_v4value

Definition at line 230 of file qquickcontext2d_p.h.

Referenced by setV4Engine(), and v4value().

◆ mutex

QMutex QQuickContext2D::mutex
static

◆ state

State QQuickContext2D::state

Definition at line 220 of file qquickcontext2d_p.h.

Referenced by popState(), pushState(), and QQuickContext2DTexture::setItem().


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