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
QQuickShapeGenericRenderer Class Reference

#include <qquickshapegenericrenderer_p.h>

+ Inheritance diagram for QQuickShapeGenericRenderer:
+ Collaboration diagram for QQuickShapeGenericRenderer:

Classes

struct  Color4ub
 

Public Types

enum  Dirty {
  DirtyFillGeom = 0x01 , DirtyStrokeGeom = 0x02 , DirtyColor = 0x04 , DirtyFillGradient = 0x08 ,
  DirtyList = 0x10
}
 
typedef QVector< QSGGeometry::ColoredPoint2DVertexContainerType
 
typedef QVector< quint32IndexContainerType
 
- Public Types inherited from QQuickAbstractPathRenderer
enum  Flag { SupportsAsync = 0x01 }
 
enum  FillGradientType { NoGradient = 0 , LinearGradient , RadialGradient , ConicalGradient }
 

Public Member Functions

 QQuickShapeGenericRenderer (QQuickItem *item)
 
 ~QQuickShapeGenericRenderer ()
 
void beginSync (int totalCount, bool *countChanged) override
 
void setPath (int index, const QQuickPath *path) override
 
void setStrokeColor (int index, const QColor &color) override
 
void setStrokeWidth (int index, qreal w) override
 
void setFillColor (int index, const QColor &color) override
 
void setFillRule (int index, QQuickShapePath::FillRule fillRule) override
 
void setJoinStyle (int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override
 
void setCapStyle (int index, QQuickShapePath::CapStyle capStyle) override
 
void setStrokeStyle (int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector< qreal > &dashPattern) override
 
void setFillGradient (int index, QQuickShapeGradient *gradient) override
 
void setTriangulationScale (qreal scale) override
 
void endSync (bool async) override
 
void setAsyncCallback (void(*)(void *), void *) override
 
Flags flags () const override
 
void updateNode () override
 
void setRootNode (QQuickShapeGenericNode *node)
 
- Public Member Functions inherited from QQuickAbstractPathRenderer
virtual ~QQuickAbstractPathRenderer ()
 

Static Public Member Functions

static void triangulateFill (const QPainterPath &path, const Color4ub &fillColor, VertexContainerType *fillVertices, IndexContainerType *fillIndices, QSGGeometry::Type *indexType, bool supportsElementIndexUint, qreal triangulationScale)
 
static void triangulateStroke (const QPainterPath &path, const QPen &pen, const Color4ub &strokeColor, VertexContainerType *strokeVertices, const QSize &clipSize, qreal triangulationScale)
 

Detailed Description

Definition at line 35 of file qquickshapegenericrenderer_p.h.

Member Typedef Documentation

◆ IndexContainerType

◆ VertexContainerType

Member Enumeration Documentation

◆ Dirty

Enumerator
DirtyFillGeom 
DirtyStrokeGeom 
DirtyColor 
DirtyFillGradient 
DirtyList 

Definition at line 38 of file qquickshapegenericrenderer_p.h.

Constructor & Destructor Documentation

◆ QQuickShapeGenericRenderer()

QQuickShapeGenericRenderer::QQuickShapeGenericRenderer ( QQuickItem * item)
inline

Definition at line 46 of file qquickshapegenericrenderer_p.h.

◆ ~QQuickShapeGenericRenderer()

QQuickShapeGenericRenderer::~QQuickShapeGenericRenderer ( )

Definition at line 78 of file qquickshapegenericrenderer.cpp.

References d.

Member Function Documentation

◆ beginSync()

void QQuickShapeGenericRenderer::beginSync ( int totalCount,
bool * countChanged )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 91 of file qquickshapegenericrenderer.cpp.

References d, and DirtyList.

◆ endSync()

◆ flags()

Flags QQuickShapeGenericRenderer::flags ( ) const
inlineoverridevirtual

◆ setAsyncCallback()

void QQuickShapeGenericRenderer::setAsyncCallback ( void(*)(void *) callback,
void * data )
overridevirtual

Reimplemented from QQuickAbstractPathRenderer.

Definition at line 224 of file qquickshapegenericrenderer.cpp.

◆ setCapStyle()

void QQuickShapeGenericRenderer::setCapStyle ( int index,
QQuickShapePath::CapStyle capStyle )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 157 of file qquickshapegenericrenderer.cpp.

References d, and DirtyStrokeGeom.

◆ setFillColor()

void QQuickShapeGenericRenderer::setFillColor ( int index,
const QColor & color )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 131 of file qquickshapegenericrenderer.cpp.

References colorToColor4ub(), d, DirtyColor, and DirtyFillGeom.

+ Here is the call graph for this function:

◆ setFillGradient()

void QQuickShapeGenericRenderer::setFillGradient ( int index,
QQuickShapeGradient * gradient )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 176 of file qquickshapegenericrenderer.cpp.

References QQuickAbstractPathRenderer::ConicalGradient, d, DirtyFillGradient, QQuickGradient::gradientStops(), QQuickAbstractPathRenderer::LinearGradient, QQuickAbstractPathRenderer::NoGradient, QQuickAbstractPathRenderer::RadialGradient, and QQuickShapeGradient::spread.

+ Here is the call graph for this function:

◆ setFillRule()

void QQuickShapeGenericRenderer::setFillRule ( int index,
QQuickShapePath::FillRule fillRule )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 142 of file qquickshapegenericrenderer.cpp.

References d, and DirtyFillGeom.

◆ setJoinStyle()

void QQuickShapeGenericRenderer::setJoinStyle ( int index,
QQuickShapePath::JoinStyle joinStyle,
int miterLimit )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 149 of file qquickshapegenericrenderer.cpp.

References d, and DirtyStrokeGeom.

◆ setPath()

void QQuickShapeGenericRenderer::setPath ( int index,
const QQuickPath * path )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 104 of file qquickshapegenericrenderer.cpp.

References d, DirtyFillGeom, and DirtyStrokeGeom.

◆ setRootNode()

void QQuickShapeGenericRenderer::setRootNode ( QQuickShapeGenericNode * node)

Definition at line 456 of file qquickshapegenericrenderer.cpp.

References DirtyList.

◆ setStrokeColor()

void QQuickShapeGenericRenderer::setStrokeColor ( int index,
const QColor & color )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 111 of file qquickshapegenericrenderer.cpp.

References colorToColor4ub(), d, DirtyColor, and DirtyStrokeGeom.

+ Here is the call graph for this function:

◆ setStrokeStyle()

void QQuickShapeGenericRenderer::setStrokeStyle ( int index,
QQuickShapePath::StrokeStyle strokeStyle,
qreal dashOffset,
const QVector< qreal > & dashPattern )
overridevirtual

◆ setStrokeWidth()

void QQuickShapeGenericRenderer::setStrokeWidth ( int index,
qreal w )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 122 of file qquickshapegenericrenderer.cpp.

References d, and DirtyStrokeGeom.

◆ setTriangulationScale()

void QQuickShapeGenericRenderer::setTriangulationScale ( qreal scale)
overridevirtual

Reimplemented from QQuickAbstractPathRenderer.

Definition at line 205 of file qquickshapegenericrenderer.cpp.

◆ triangulateFill()

void QQuickShapeGenericRenderer::triangulateFill ( const QPainterPath & path,
const Color4ub & fillColor,
VertexContainerType * fillVertices,
IndexContainerType * fillIndices,
QSGGeometry::Type * indexType,
bool supportsElementIndexUint,
qreal triangulationScale )
static

Definition at line 385 of file qquickshapegenericrenderer.cpp.

References QList< T >::data(), QTransform::fromScale(), i, qTriangulate(), qtVectorPathForPath(), QList< T >::resize(), set, QSGGeometry::UnsignedIntType, QVertexIndexVector::UnsignedShort, and QSGGeometry::UnsignedShortType.

Referenced by endSync(), and QQuickShapeFillRunnable::run().

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

◆ triangulateStroke()

void QQuickShapeGenericRenderer::triangulateStroke ( const QPainterPath & path,
const QPen & pen,
const Color4ub & strokeColor,
VertexContainerType * strokeVertices,
const QSize & clipSize,
qreal triangulationScale )
static

Definition at line 418 of file qquickshapegenericrenderer.cpp.

References QList< T >::clear(), QList< T >::data(), QDashedStrokeProcessor::elementCount(), QDashedStrokeProcessor::elementTypes(), i, QDashedStrokeProcessor::points(), QTriangulatingStroker::process(), QDashedStrokeProcessor::process(), qtVectorPathForPath(), QList< T >::resize(), set, QTriangulatingStroker::setInvScale(), QDashedStrokeProcessor::setInvScale(), Qt::SolidLine, QPen::style(), QTriangulatingStroker::vertexCount(), and QTriangulatingStroker::vertices().

Referenced by endSync(), and QQuickShapeStrokeRunnable::run().

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

◆ updateNode()

void QQuickShapeGenericRenderer::updateNode ( )
overridevirtual

Implements QQuickAbstractPathRenderer.

Definition at line 465 of file qquickshapegenericrenderer.cpp.

References QSGNode::appendChildNode(), d, DirtyColor, DirtyFillGeom, DirtyFillGradient, DirtyList, DirtyStrokeGeom, QQuickShapeGenericNode::m_fillNode, QQuickShapeGenericNode::m_next, QQuickShapeGenericNode::m_strokeNode, Q_ASSERT, QSGNode::removeChildNode(), and QQuickItem::window().

+ Here is the call graph for this function:

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