41 #include <qpa/qplatformpixmap.h>
42 #include <qpa/qplatformintegration.h>
47 #include <private/qguiapplication_p.h>
188 if (
image.color(0) == c0 &&
image.color(1) == c1) {
189 image.invertPixels();
190 image.setColor(0, c1);
191 image.setColor(1, c0);
253 int bytesPerLine = (
size.width() + 7) / 8;
254 for (
int y = 0;
y <
size.height(); ++
y)
255 memcpy(
image.scanLine(
y),
bits + bytesPerLine *
y, bytesPerLine);
274 }
else if (
pixmap.depth() == 1) {
276 if (
pixmap.paintingActive()) {
287 #if QT_DEPRECATED_SINCE(6, 0)
The QBitmap class provides monochrome (1-bit depth) pixmaps.
static QBitmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
QBitmap transformed(const QTransform &matrix) const
static QBitmap fromData(const QSize &size, const uchar *bits, QImage::Format monoFormat=QImage::Format_MonoLSB)
static QBitmap fromPixmap(const QPixmap &pixmap)
The QColor class provides colors based on RGB, HSV or CMYK values.
QRgb rgb() const noexcept
static QPlatformIntegration * platformIntegration()
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QPixmap class is an off-screen image representation that can be used as a paint device.
bool load(const QString &fileName, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
QPixmap transformed(const QTransform &, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap & operator=(const QPixmap &)
The QSize class defines the size of a two-dimensional object using integer point precision.
The QString class provides a Unicode character string.
The QVariant class acts like a union for the most common Qt data types.
static auto fromValue(const T &value) -> std::enable_if_t< std::is_copy_constructible_v< T >, QVariant >
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
QBitmap bm(8, 8, arrow_bits, true)