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
qsgcurveglyphnode_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSGCURVEGLYPHNODE_P_H
5#define QSGCURVEGLYPHNODE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qtquickexports.h>
19#include <private/qsgadaptationlayer_p.h>
20#include <private/qsgbasicglyphnode_p.h>
21
23
27
28class Q_QUICK_EXPORT QSGCurveGlyphNode : public QSGGlyphNode
29{
30public:
33 void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override;
34 void update() override;
35 void preprocess() override;
36 void setPreferredAntialiasingMode(AntialiasingMode) override;
37 void updateGeometry();
38 void setColor(const QColor &color) override;
39 void setStyle(QQuickText::TextStyle style) override;
40
41 void setStyleColor(const QColor &color) override;
42 QPointF baseLine() const override { return m_baseLine; }
43
44private:
45 QSGRenderContext *m_context;
46 QSGGeometry m_geometry;
47 QColor m_color = Qt::black;
48
49 struct GlyphInfo {
50 QVector<quint32> indexes;
51 QVector<QPointF> positions;
52 };
53
54 uint m_dirtyGeometry: 1;
55 qreal m_fontSize = 0.0f;
56 QGlyphRun m_glyphs;
58 QColor m_styleColor;
59 QPointF m_baseLine;
60 QPointF m_position;
61
62 QSGCurveFillNode *m_glyphNode = nullptr;
63 QSGCurveAbstractNode *m_styleNode = nullptr;
64};
65
67
68#endif
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
The QGlyphRun class provides direct access to the internal glyphs in a font.
Definition qglyphrun.h:20
\inmodule QtCore\reentrant
Definition qpoint.h:217
QPointF baseLine() const override
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
Definition qsggeometry.h:15
Combined button and popup list for selecting options.
@ black
Definition qnamespace.h:30
static void * context
static const QCssKnownValue positions[NumKnownPositionModes - 1]
GLuint color
[2]
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
unsigned int uint
Definition qtypes.h:34
double qreal
Definition qtypes.h:187
myFilter setColor(QColor(128, 0, 0))
widget setStyle(proxy)