1// Copyright (C) 2016 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 QFONTENGINEGLYPHCACHE_P_H
5#define QFONTENGINEGLYPHCACHE_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 <QtCore/qshareddata.h>
19#include <QtGui/private/qtguiglobal_p.h>
20#include "QtCore/qatomic.h"
21#include <QtCore/qvarlengtharray.h>
22#include "private/qfont_p.h"
23#include "private/qfontengine_p.h"
24
25
26
27QT_BEGIN_NAMESPACE
28
29class Q_GUI_EXPORT QFontEngineGlyphCache: public QSharedData
30{
31public:
32 QFontEngineGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color = QColor())
33 : m_format(format)
34 , m_transform(matrix)
35 , m_color(color)
36 {
37 Q_ASSERT(m_format != QFontEngine::Format_None);
38 }
39
40 virtual ~QFontEngineGlyphCache();
41
42 QFontEngine::GlyphFormat glyphFormat() const { return m_format; }
43 const QTransform &transform() const { return m_transform; }
44 const QColor &color() const { return m_color; }
45
46 QFontEngine::GlyphFormat m_format;
47 QTransform m_transform;
48 QColor m_color;
49};
50typedef QHash<void *, QList<QFontEngineGlyphCache *> > GlyphPointerHash;
51typedef QHash<int, QList<QFontEngineGlyphCache *> > GlyphIntHash;
52
53QT_END_NAMESPACE
54
55#endif
56

source code of qtbase/src/gui/text/qfontengineglyphcache_p.h