6#include <private/qfont_p.h>
15#include <QImageReader>
16#include <QGuiApplication>
18#include <private/qsimd_p.h>
19#include <private/qdrawhelper_p.h>
20#include <qpa/qplatformscreen.h>
83 image.setColorCount(2);
92 Qt::ImageConversionFlags
flags)
106 Qt::ImageConversionFlags
flags)
113 Qt::ImageConversionFlags
flags)
119 Qt::ImageConversionFlags
flags)
148 if (
image.depth() == 1) {
155 }
else if (
image.depth() >= 15) {
158 if (!
image.hasAlphaChannel()) {
160 if (!
image.reinterpretAsFormat(toFormat))
172 pixel =
qGray(
c.red(),
c.green(),
c.blue());
184 return image.hasAlphaChannel();
189 if (!
image.isNull()) {
191 if (
data->paintEngine &&
data->paintEngine->isActive()
192 &&
data->paintEngine->paintDevice() == &
image)
208 if ((du % 8 == 0) && (((
uint(clipped.
x()) * du)) % 32 == 0)) {
209 QImage newImage(
image.scanLine(clipped.
y()) + clipped.
x() * (du / 8),
215 return image.copy(clipped);
221 return image.paintEngine();
241 return d->colortable.size();
253 return image.devicePixelRatio();
258 qWarning(
"QRasterPlatformPixmap::metric(): Unhandled metric type %d", metric);
274 if (sourceImage.
depth() == 1) {
300 image = std::move(sourceImage);
328 return image.devicePixelRatio();
333 image.setDevicePixelRatio(scaleFactor);
\inmodule QtCore \reentrant
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
The QColor class provides colors based on RGB, HSV or CMYK values.
QRgb rgba() const noexcept
Returns the RGB value of the color, including its alpha.
QScreen * primaryScreen
the primary (or default) screen of the application.
The QImageReader class provides a format independent interface for reading images from files or other...
QImage read()
Reads an image from the device.
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false.
Format
The following image formats are available in Qt.
@ Format_ARGB32_Premultiplied
Format format() const
Returns the format of the image.
void setDevicePixelRatio(qreal scaleFactor)
Sets the device pixel ratio for the image.
@ PdmDevicePixelRatioScaled
static qreal devicePixelRatioFScale()
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
QPlatformScreen * handle() const
Get the platform screen handle.
Combined button and popup list for selecting options.
int qRound(qfloat16 d) noexcept
Q_GUI_EXPORT int qt_defaultDpiX()
Q_GUI_EXPORT int qt_defaultDpiY()
QImage::Format qt_opaqueVersionForPainting(QImage::Format format)
QImage::Format qt_alphaVersionForPainting(QImage::Format format)
constexpr T qAbs(const T &t)
GLboolean GLboolean GLboolean b
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLfloat GLfloat GLfloat alpha
const void * data_ptr(const QTransform &t)
QT_BEGIN_NAMESPACE QPixmap qt_toRasterPixmap(const QImage &image)
void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)
constexpr int qGray(int r, int g, int b)
constexpr int qAlpha(QRgb rgb)
bool checkForAlphaPixels() const