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
qsvgfont_p.h
Go to the documentation of this file.
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 QSVGFONT_P_H
5
#define QSVGFONT_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 "
qpainterpath.h
"
19
#include "
qhash.h
"
20
#include "
qstring.h
"
21
#include "
qsvgstyle_p.h
"
22
#include "
qtsvgglobal_p.h
"
23
24
QT_BEGIN_NAMESPACE
25
26
class
Q_SVG_EXPORT
QSvgGlyph
27
{
28
public
:
29
QSvgGlyph
(
QChar
unicode,
const
QPainterPath
&
path
,
qreal
horizAdvX);
30
QSvgGlyph
() : m_unicode(0), m_horizAdvX(0) {}
31
32
QChar
m_unicode
;
33
QPainterPath
m_path
;
34
qreal
m_horizAdvX
;
35
};
36
37
38
class
Q_SVG_EXPORT
QSvgFont
:
public
QSvgRefCounted
39
{
40
public
:
41
static
constexpr
qreal
DEFAULT_UNITS_PER_EM = 1000;
42
QSvgFont
(
qreal
horizAdvX);
43
44
void
setFamilyName(
const
QString
&
name
);
45
QString
familyName()
const
;
46
47
void
setUnitsPerEm(
qreal
upem);
48
49
void
addGlyph(
QChar
unicode,
const
QPainterPath
&
path
,
qreal
horizAdvX = -1);
50
51
void
draw
(
QPainter
*
p
,
const
QPointF
&point,
const
QString
&
str
,
qreal
pixelSize, Qt::Alignment
alignment
)
const
;
52
public
:
53
QString
m_familyName
;
54
qreal
m_unitsPerEm = DEFAULT_UNITS_PER_EM;
55
qreal
m_horizAdvX
;
56
QHash<QChar, QSvgGlyph>
m_glyphs
;
57
};
58
59
QT_END_NAMESPACE
60
61
#endif
// QSVGFONT_P_H
QChar
\inmodule QtCore
QPainterPath
\inmodule QtGui
Definition
qpainterpath.h:29
QPainter
The QPainter class performs low-level painting on widgets and other paint devices.
Definition
qpainter.h:46
QPointF
\inmodule QtCore\reentrant
Definition
qpoint.h:217
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:129
QSvgFont
Definition
qsvgfont_p.h:39
QSvgFont::m_horizAdvX
qreal m_horizAdvX
Definition
qsvgfont_p.h:55
QSvgFont::m_familyName
QString m_familyName
Definition
qsvgfont_p.h:53
QSvgFont::m_glyphs
QHash< QChar, QSvgGlyph > m_glyphs
Definition
qsvgfont_p.h:56
QSvgGlyph
Definition
qsvgfont_p.h:27
QSvgGlyph::m_path
QPainterPath m_path
Definition
qsvgfont_p.h:33
QSvgGlyph::m_unicode
QChar m_unicode
Definition
qsvgfont_p.h:32
QSvgGlyph::m_horizAdvX
qreal m_horizAdvX
Definition
qsvgfont_p.h:34
QSvgGlyph::QSvgGlyph
QSvgGlyph()
Definition
qsvgfont_p.h:30
QSvgRefCounted
Definition
qsvgstyle_p.h:85
str
QString str
[2]
Definition
doc_src_containers.cpp:177
alignment
uint alignment
Definition
doc_src_styles.cpp:74
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
qhash.h
name
GLuint name
Definition
qopengles2ext.h:156
path
GLsizei const GLchar *const * path
Definition
qopenglext.h:4283
p
GLfloat GLfloat p
[1]
Definition
qopenglext.h:12698
qpainterpath.h
qstring.h
qsvgstyle_p.h
qtsvgglobal_p.h
qreal
double qreal
Definition
qtypes.h:187
draw
myFilter draw(painter, QPoint(0, 0), originalPixmap)
qtsvg
src
svg
qsvgfont_p.h
Generated by
1.10.0