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
qwindowsdirect2dbitmap.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 QWINDOWSDIRECT2DBITMAP_H
5#define QWINDOWSDIRECT2DBITMAP_H
6
7#include <QtCore/qnamespace.h>
8#include <QtCore/qrect.h>
9#include <QtCore/qscopedpointer.h>
10
11struct ID2D1DeviceContext;
12struct ID2D1Bitmap1;
13
14QT_BEGIN_NAMESPACE
15
16class QWindowsDirect2DDeviceContext;
18
19class QImage;
20class QSize;
21class QColor;
22
24{
27public:
29 QWindowsDirect2DBitmap(ID2D1Bitmap1 *bitmap, ID2D1DeviceContext *dc);
31
32 bool resize(int width, int height);
33 bool fromImage(const QImage &image, Qt::ImageConversionFlags flags);
34
35 ID2D1Bitmap1* bitmap() const;
37
38 void fill(const QColor &color);
39 QImage toImage(const QRect &rect = QRect());
40
41 QSize size() const;
42
43private:
44 QScopedPointer<QWindowsDirect2DBitmapPrivate> d_ptr;
45};
46
47QT_END_NAMESPACE
48
49#endif // QWINDOWSDIRECT2DBITMAP_H
\inmodule QtCore\reentrant
Definition qpoint.h:28
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.
QWindowsDirect2DDeviceContext * deviceContext() const
void fill(const QColor &color)
ID2D1Bitmap1 * bitmap() const
QWindowsDirect2DBitmap(ID2D1Bitmap1 *bitmap, ID2D1DeviceContext *dc)
bool resize(int width, int height)
bool fromImage(const QImage &image, Qt::ImageConversionFlags flags)
QImage toImage(const QRect &rect=QRect())
ID2D1Factory1 * d2dFactory() const
IDXGIFactory2 * dxgiFactory() const
IDWriteGdiInterop * dwriteGdiInterop() const
ID3D11DeviceContext * d3dDeviceContext() const
IDWriteFactory * dwriteFactory() const
static QWindowsDirect2DContext * instance()
static QWindowsDirect2DIntegration * create(const QStringList &paramList)
QWindowsWindow * createPlatformWindowHelper(QWindow *window, const QWindowsWindowData &) const override
QPlatformNativeInterface * nativeInterface() const override
QWindowsDirect2DContext * direct2DContext() const
QPlatformPixmap * createPlatformPixmap(QPlatformPixmap::PixelType type) const override
Factory function for QPlatformPixmap.
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
static QWindowsDirect2DIntegration * instance()
QPaintEngine * paintEngine() const override
int metric(PaintDeviceMetric metric) const override
QWindowsDirect2DPaintEngineSuspender(QWindowsDirect2DPaintEngine *engine)
void fillRect(const QRectF &rect, const QBrush &brush) override
Type type() const override
Reimplement this function to return the paint engine \l{Type}.
void stroke(ID2D1Geometry *geometry, const QPen &pen)
void fill(ID2D1Geometry *geometry, const QBrush &brush)
void drawRects(const QRect *rects, int rectCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
void draw(const QVectorPath &path) override
void drawEllipse(const QRectF &r) override
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
void drawTextItem(const QPointF &p, const QTextItem &textItem) override
This function draws the text item textItem at position p.
void setState(QPainterState *s) override
void stroke(const QVectorPath &path, const QPen &pen) override
void drawStaticTextItem(QStaticTextItem *staticTextItem) override
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
void fill(const QVectorPath &path, const QBrush &brush) override
void clip(const QVectorPath &path, Qt::ClipOperation op) override
bool end() override
Reimplement this function to finish painting on the current paint device.
void drawImage(const QRectF &rectangle, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
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
Raster or OpenGL Window.
Combined button and popup list for selecting options.
static QWindowsDirect2DPlatformPixmap * platformPixmap(QPixmap *p)
static QWindowsDirect2DWindow * nativeWindow(QWindow *window)
static QWindowsDirect2DBitmap * bitmap(QPixmap *p)