Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowsnativeimage_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QWINDOWSNATIVEIMAGE_H
5#define QWINDOWSNATIVEIMAGE_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/QtGlobal>
19#include <QtCore/qt_windows.h>
20#include <QtGui/QImage>
21#include <QtCore/private/qglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class Q_GUI_EXPORT QWindowsNativeImage
26{
27 Q_DISABLE_COPY_MOVE(QWindowsNativeImage)
28public:
29 QWindowsNativeImage(int width, int height,
30 QImage::Format format);
31
32 ~QWindowsNativeImage();
33
34 inline int width() const { return m_image.width(); }
35 inline int height() const { return m_image.height(); }
36
37 QImage &image() { return m_image; }
38 const QImage &image() const { return m_image; }
39
40 HDC hdc() const { return m_hdc; }
41
42 static QImage::Format systemFormat();
43
44private:
45 const HDC m_hdc;
46 QImage m_image;
47
48 HBITMAP m_bitmap = 0;
49 HBITMAP m_null_bitmap = 0;
50};
51
52QT_END_NAMESPACE
53
54#endif // QWINDOWSNATIVEIMAGE_H
Standard Windows font engine.
void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
FaceId faceId() const override
QImage alphaMapForGlyph(glyph_t, const QTransform &xform) override
void initFontInfo(const QFontDef &request, int dpi)
void initializeHeightMetrics() const override
QFixed emSquareSize() const override
glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QFixedPoint &, const QTransform &matrix, GlyphFormat) override
qreal minLeftBearing() const override
bool hasUnreliableGlyphOutline() const override
QFontEngine * cloneWithSize(qreal pixelSize) const override
void getGlyphBearings(glyph_t glyph, qreal *leftBearing=nullptr, qreal *rightBearing=nullptr) override
QImage alphaRGBMapForGlyph(glyph_t t, const QFixedPoint &subPixelPosition, const QTransform &xform) override
bool supportsTransformation(const QTransform &transform) const override
qreal minRightBearing() const override
Qt::HANDLE handle() const override
void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) override
Properties properties() const override
int synthesized() const override
static bool addGlyphToPath(glyph_t glyph, const QFixedPoint &position, HDC hdc, QPainterPath *path, bool ttf, glyph_metrics_t *metric=nullptr, qreal scale=1.0, qreal stretch=1.0)
#define TT_PRIM_CSPLINE
static const int char_table_entries
#define SPI_SETFONTSMOOTHINGCONTRAST
#define MAKE_LITTLE_ENDIAN_TAG(ch1, ch2, ch3, ch4)
static double qt_fixed_to_double(const FIXED &p)
static QPointF qt_to_qpointf(const POINTFX &pt, qreal scale, qreal stretch)
static const ushort char_table[]
#define SPI_GETFONTSMOOTHINGCONTRAST