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
qsgcurveglyphatlas_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 QSGCURVEGLYPHATLAS_P_H
5#define QSGCURVEGLYPHATLAS_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 <QtGui/qrawfont.h>
19#include <QtGui/private/qtextengine_p.h>
20#include <QtQuick/qtquickexports.h>
21
23
26
27class Q_QUICK_EXPORT QSGCurveGlyphAtlas
28{
29public:
31 virtual ~QSGCurveGlyphAtlas();
32
33 void populate(const QList<glyph_t> &glyphs);
34 void addGlyph(QSGCurveFillNode *node,
35 glyph_t glyph,
36 const QPointF &position,
37 qreal pixelSize) const;
38 void addStroke(QSGCurveStrokeNode *node,
39 glyph_t glyph,
40 const QPointF &position) const;
41
43 {
44 return m_font.pixelSize();
45 }
46
47private:
48 struct Glyph
49 {
50 QList<QVector2D> vertices;
51 QList<QVector3D> uvs;
52 QList<QVector2D> normals;
53 QList<QVector2D> duvdx;
54 QList<QVector2D> duvdy;
55
56 QList<QVector2D> strokeVertices;
57 QList<QVector2D> strokeUvs;
58 QList<QVector2D> strokeNormals;
59 QList<bool> strokeElementIsLine;
60 };
61
62 QHash<glyph_t, Glyph> m_glyphs;
63 QRawFont m_font;
64};
65
67
68
69#endif // QSGCURVEGLYPHATLAS_P_H
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QRawFont class provides access to a single physical instance of a font.
Definition qrawfont.h:24
Combined button and popup list for selecting options.
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
unsigned int glyph_t
double qreal
Definition qtypes.h:187