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
qwindowsdirect2dplatformpixmap.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 QWINDOWSDIRECT2DPLATFORMPIXMAP_H
5#define QWINDOWSDIRECT2DPLATFORMPIXMAP_H
6
8#include <QtGui/qpa/qplatformpixmap.h>
9#include <QtCore/qscopedpointer.h>
10
12
15
17{
19public:
21
22 // We do NOT take ownership of the bitmap through this constructor!
23 QWindowsDirect2DPlatformPixmap(PixelType pixelType, QWindowsDirect2DPaintEngine::Flags flags, QWindowsDirect2DBitmap *bitmap);
25
26 void resize(int width, int height) override;
27 void fromImage(const QImage &image, Qt::ImageConversionFlags flags) override;
28
29 int metric(QPaintDevice::PaintDeviceMetric metric) const override;
30 void fill(const QColor &color) override;
31
32 bool hasAlphaChannel() const override;
33
34 QImage toImage() const override;
35 QImage toImage(const QRect &rect) const override;
36
37 QPaintEngine* paintEngine() const override;
38
39 qreal devicePixelRatio() const override;
40 void setDevicePixelRatio(qreal scaleFactor) override;
41
43
44private:
45 QScopedPointer<QWindowsDirect2DPlatformPixmapPrivate> d_ptr;
46};
47
48QT_END_NAMESPACE
49
50#endif // QWINDOWSDIRECT2DPLATFORMPIXMAP_H
\inmodule QtCore\reentrant
Definition qpoint.h:29
void resize(const QSize &size, const QRegion &staticContents) override
void beginPaint(const QRegion &) override
This function is called before painting onto the surface begins, with the region in which the paintin...
void endPaint() override
This function is called after painting onto the surface has ended.
void flush(QWindow *targetWindow, const QRegion &region, const QPoint &offset) override
Flushes the given region from the specified window.
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
QImage toImage(const QRect &rect) const override
void fromImage(const QImage &image, Qt::ImageConversionFlags flags) override
void resize(int width, int height) override
QWindowsDirect2DPlatformPixmap(PixelType pixelType, QWindowsDirect2DPaintEngine::Flags flags, QWindowsDirect2DBitmap *bitmap)
void setDevicePixelRatio(qreal scaleFactor) override
void fill(const QColor &color) override
QPaintEngine * paintEngine() const override
int metric(QPaintDevice::PaintDeviceMetric metric) const override
static QWindowsDirect2DPlatformPixmap * platformPixmap(QPixmap *p)
static QWindowsDirect2DWindow * nativeWindow(QWindow *window)
static QWindowsDirect2DBitmap * bitmap(QPixmap *p)