![]() |
Qt 6.x
The Qt SDK
|
#include "qquickshape_p.h"
#include "qquickshape_p_p.h"
#include "qquickshapegenericrenderer_p.h"
#include "qquickshapesoftwarerenderer_p.h"
#include "qquickshapecurverenderer_p.h"
#include <private/qsgplaintexture_p.h>
#include <private/qquicksvgparser_p.h>
#include <QtGui/private/qdrawhelper_p.h>
#include <QOpenGLFunctions>
#include <QLoggingCategory>
#include <rhi/qrhi.h>
#include "moc_qquickshape_p.cpp"
Go to the source code of this file.
Functions | |
static void | initResources () |
QT_BEGIN_NAMESPACE void | QQuickShapes_initializeModule () |
\qmlmodule QtQuick.Shapes 1. | |
static void | vpe_append (QQmlListProperty< QObject > *property, QObject *obj) |
static void | vpe_clear (QQmlListProperty< QObject > *property) |
static void | generateGradientColorTable (const QQuickShapeGradientCacheKey &gradient, uint *colorTable, int size, float opacity) |
|
static |
Definition at line 1618 of file qquickshape.cpp.
References ARGB2RGBA(), ARGB_COMBINE_ALPHA, dist(), i, INTERPOLATE_PIXEL_256(), pos, Q_ASSERT, qPremultiply(), qRound(), and QQuickShapeGradientCacheKey::stops.
Referenced by QQuickShapeGradientCache::get().
|
static |
Definition at line 16 of file qquickshape.cpp.
References Q_INIT_RESOURCE.
Referenced by QQuickShapesModule::defineModule().
QT_BEGIN_NAMESPACE void QQuickShapes_initializeModule | ( | ) |
\qmlmodule QtQuick.Shapes 1.
\QtMinorVersion \title Qt Quick Shapes QML Types
Provides QML types for drawing stroked and filled shapes.
To use the types in this module, import the module with the following line:
\qml import QtQuick.Shapes \endqml
Qt Quick Shapes provides tools for drawing arbitrary shapes in a Qt Quick scene. \l{Shape}{Shapes} can be constructed from basic building blocks like \l{PathLine}{lines} and \l{PathCubic}{curves} that define sub-shapes. The sub-shapes can then be filled with solid colors or gradients, and an outline stroke can be defined.
Qt Quick Shapes also supports higher level path element types, such as \l{PathText}{text} and \l{PathSvg}{SVG path descriptions}. The currently supported element types is: PathMove, PathLine, PathQuad, PathCubic, PathArc, PathText and PathSvg.
Qt Quick Shapes triangulates the shapes and renders the corresponding triangles on the GPU. Therefore, altering the control points of elements will lead to re-triangulation of the affected paths, at some performance cost. In addition, curves are flattened before they are rendered, so applying a very high scale to the shape may show artifacts where it is visible that the curves are represented by a sequence of smaller, straight lines.
For further information, the \l{Qt Quick Examples - Shapes}{Shapes example} shows how to implement different types of shapes, fills and strokes.
Definition at line 65 of file qquickshape.cpp.
References QQuickShapesModule::defineModule().
Referenced by QmlShapesPlugin::QmlShapesPlugin().
|
static |
Definition at line 934 of file qquickshape.cpp.
References QObject::connect(), d, QQuickItemPrivate::data_append(), QQuickShapePrivate::get(), item, property, SIGNAL, and SLOT.
|
static |
Definition at line 950 of file qquickshape.cpp.
References d, QQuickItemPrivate::data_clear(), QObject::disconnect(), QQuickShapePrivate::get(), item, property, SIGNAL, and SLOT.