Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QRasterPlatformPixmap Class Reference

#include <qpixmap_raster_p.h>

+ Inheritance diagram for QRasterPlatformPixmap:
+ Collaboration diagram for QRasterPlatformPixmap:

Public Member Functions

 QRasterPlatformPixmap (PixelType type)
 
 ~QRasterPlatformPixmap ()
 
QPlatformPixmapcreateCompatiblePlatformPixmap () const override
 
void resize (int width, int height) override
 
bool fromData (const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags) override
 
void fromImage (const QImage &image, Qt::ImageConversionFlags flags) override
 
void fromImageInPlace (QImage &image, Qt::ImageConversionFlags flags) override
 
void fromImageReader (QImageReader *imageReader, Qt::ImageConversionFlags flags) override
 
void copy (const QPlatformPixmap *data, const QRect &rect) override
 
bool scroll (int dx, int dy, const QRect &rect) override
 
void fill (const QColor &color) override
 
bool hasAlphaChannel () const override
 
QImage toImage () const override
 
QImage toImage (const QRect &rect) const override
 
QPaintEnginepaintEngine () const override
 
QImagebuffer () override
 
qreal devicePixelRatio () const override
 
void setDevicePixelRatio (qreal scaleFactor) override
 
- Public Member Functions inherited from QPlatformPixmap
 QPlatformPixmap (PixelType pixelType, int classId)
 
virtual ~QPlatformPixmap ()
 
virtual bool fromFile (const QString &filename, const char *format, Qt::ImageConversionFlags flags)
 
virtual QBitmap mask () const
 
virtual void setMask (const QBitmap &mask)
 
virtual QPixmap transformed (const QTransform &matrix, Qt::TransformationMode mode) const
 
int serialNumber () const
 
PixelType pixelType () const
 
ClassId classId () const
 
int width () const
 
int height () const
 
int colorCount () const
 
int depth () const
 
bool isNull () const
 
qint64 cacheKey () const
 

Protected Member Functions

int metric (QPaintDevice::PaintDeviceMetric metric) const override
 
void createPixmapForImage (QImage sourceImage, Qt::ImageConversionFlags flags)
 
void setImage (const QImage &image)
 
- Protected Member Functions inherited from QPlatformPixmap
void setSerialNumber (int serNo)
 
void setDetachNumber (int detNo)
 

Static Protected Member Functions

static QImage::Format systemNativeFormat ()
 

Protected Attributes

QImage image
 
- Protected Attributes inherited from QPlatformPixmap
int w
 
int h
 
int d
 
bool is_null
 

Friends

class QPixmap
 
class QBitmap
 
class QPixmapCacheEntry
 
class QRasterPaintEngine
 

Additional Inherited Members

- Public Types inherited from QPlatformPixmap
enum  PixelType { PixmapType , BitmapType }
 
enum  ClassId {
  RasterClass , DirectFBClass , BlitterClass , Direct2DClass ,
  X11Class , CustomClass = 1024
}
 
- Static Public Member Functions inherited from QPlatformPixmap
static QPlatformPixmapcreate (int w, int h, PixelType type)
 

Detailed Description

Definition at line 24 of file qpixmap_raster_p.h.

Constructor & Destructor Documentation

◆ QRasterPlatformPixmap()

QRasterPlatformPixmap::QRasterPlatformPixmap ( PixelType type)

Definition at line 47 of file qpixmap_raster.cpp.

Referenced by createCompatiblePlatformPixmap().

+ Here is the caller graph for this function:

◆ ~QRasterPlatformPixmap()

QRasterPlatformPixmap::~QRasterPlatformPixmap ( )

Definition at line 52 of file qpixmap_raster.cpp.

Member Function Documentation

◆ buffer()

QImage * QRasterPlatformPixmap::buffer ( )
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 321 of file qpixmap_raster.cpp.

References image.

◆ copy()

void QRasterPlatformPixmap::copy ( const QPlatformPixmap * data,
const QRect & rect )
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 132 of file qpixmap_raster.cpp.

References fromImage(), Qt::NoOpaqueDetection, and rect.

+ Here is the call graph for this function:

◆ createCompatiblePlatformPixmap()

QPlatformPixmap * QRasterPlatformPixmap::createCompatiblePlatformPixmap ( ) const
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 63 of file qpixmap_raster.cpp.

References QRasterPlatformPixmap(), and QPlatformPixmap::pixelType().

+ Here is the call graph for this function:

◆ createPixmapForImage()

void QRasterPlatformPixmap::createPixmapForImage ( QImage sourceImage,
Qt::ImageConversionFlags flags )
protected

Definition at line 265 of file qpixmap_raster.cpp.

References QPlatformPixmap::BitmapType, QPlatformPixmap::d, QImage::Format_ARGB32, QImage::Format_ARGB32_Premultiplied, QImage::Format_MonoLSB, QImage::Format_RGB32, QPlatformPixmap::is_null, Qt::NoFormatConversion, Qt::NoOpaqueDetection, QPlatformPixmap::pixelType(), qt_alphaVersionForPainting(), qt_opaqueVersionForPainting(), QPlatformPixmap::setDetachNumber(), QPlatformPixmap::setSerialNumber(), and systemNativeFormat().

Referenced by fromData(), fromImage(), fromImageInPlace(), and fromImageReader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ devicePixelRatio()

qreal QRasterPlatformPixmap::devicePixelRatio ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 326 of file qpixmap_raster.cpp.

◆ fill()

void QRasterPlatformPixmap::fill ( const QColor & color)
overridevirtual

Implements QPlatformPixmap.

Definition at line 144 of file qpixmap_raster.cpp.

References QImage::Format_Alpha8, QImage::Format_Grayscale16, QImage::Format_Grayscale8, qAbs(), qAlpha(), qGray(), and qt_alphaVersionForPainting().

+ Here is the call graph for this function:

◆ fromData()

bool QRasterPlatformPixmap::fromData ( const uchar * buffer,
uint len,
const char * format,
Qt::ImageConversionFlags flags )
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 91 of file qpixmap_raster.cpp.

References createPixmapForImage(), QByteArray::fromRawData(), QPlatformPixmap::isNull(), QImageReader::read(), and QIODeviceBase::ReadOnly.

+ Here is the call graph for this function:

◆ fromImage()

void QRasterPlatformPixmap::fromImage ( const QImage & image,
Qt::ImageConversionFlags flags )
overridevirtual

Implements QPlatformPixmap.

Definition at line 105 of file qpixmap_raster.cpp.

References createPixmapForImage().

Referenced by copy(), qt_pixmapToWinHBITMAP(), and qt_toRasterPixmap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromImageInPlace()

void QRasterPlatformPixmap::fromImageInPlace ( QImage & image,
Qt::ImageConversionFlags flags )
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 112 of file qpixmap_raster.cpp.

References createPixmapForImage().

+ Here is the call graph for this function:

◆ fromImageReader()

void QRasterPlatformPixmap::fromImageReader ( QImageReader * imageReader,
Qt::ImageConversionFlags flags )
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 118 of file qpixmap_raster.cpp.

References createPixmapForImage(), and Q_UNUSED.

+ Here is the call graph for this function:

◆ hasAlphaChannel()

bool QRasterPlatformPixmap::hasAlphaChannel ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 182 of file qpixmap_raster.cpp.

◆ metric()

int QRasterPlatformPixmap::metric ( QPaintDevice::PaintDeviceMetric metric) const
overrideprotectedvirtual

Implements QPlatformPixmap.

Definition at line 224 of file qpixmap_raster.cpp.

References QPlatformPixmap::d, QPaintDevice::devicePixelRatioFScale(), QPlatformPixmap::h, metric(), QPaintDevice::PdmDepth, QPaintDevice::PdmDevicePixelRatio, QPaintDevice::PdmDevicePixelRatioScaled, QPaintDevice::PdmDpiX, QPaintDevice::PdmDpiY, QPaintDevice::PdmHeight, QPaintDevice::PdmHeightMM, QPaintDevice::PdmNumColors, QPaintDevice::PdmPhysicalDpiX, QPaintDevice::PdmPhysicalDpiY, QPaintDevice::PdmWidth, QPaintDevice::PdmWidthMM, qRound(), qt_defaultDpiX(), qt_defaultDpiY(), qWarning, and QPlatformPixmap::w.

Referenced by metric().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ paintEngine()

QPaintEngine * QRasterPlatformPixmap::paintEngine ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 219 of file qpixmap_raster.cpp.

◆ resize()

void QRasterPlatformPixmap::resize ( int width,
int height )
overridevirtual

Implements QPlatformPixmap.

Definition at line 68 of file qpixmap_raster.cpp.

References QPlatformPixmap::BitmapType, Qt::color0, Qt::color1, QPlatformPixmap::d, QImage::Format_MonoLSB, QPlatformPixmap::height(), QPlatformPixmap::is_null, QPlatformPixmap::pixelType(), QColor::rgba(), QPlatformPixmap::setSerialNumber(), systemNativeFormat(), and QPlatformPixmap::width().

+ Here is the call graph for this function:

◆ scroll()

bool QRasterPlatformPixmap::scroll ( int dx,
int dy,
const QRect & rect )
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 137 of file qpixmap_raster.cpp.

References qt_scrollRectInImage(), and rect.

+ Here is the call graph for this function:

◆ setDevicePixelRatio()

void QRasterPlatformPixmap::setDevicePixelRatio ( qreal scaleFactor)
overridevirtual

Implements QPlatformPixmap.

Definition at line 331 of file qpixmap_raster.cpp.

◆ setImage()

void QRasterPlatformPixmap::setImage ( const QImage & image)
protected

◆ systemNativeFormat()

QImage::Format QRasterPlatformPixmap::systemNativeFormat ( )
staticprotected

Definition at line 56 of file qpixmap_raster.cpp.

References QPlatformScreen::format(), QImage::Format_RGB32, QScreen::handle(), and QGuiApplication::primaryScreen.

Referenced by createPixmapForImage(), and resize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toImage() [1/2]

QImage QRasterPlatformPixmap::toImage ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 187 of file qpixmap_raster.cpp.

References data_ptr(), and image.

+ Here is the call graph for this function:

◆ toImage() [2/2]

QImage QRasterPlatformPixmap::toImage ( const QRect & rect) const
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 201 of file qpixmap_raster.cpp.

References QPlatformPixmap::d, image, QRect::intersected(), rect, and QImage::setDevicePixelRatio().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QBitmap

friend class QBitmap
friend

Definition at line 59 of file qpixmap_raster_p.h.

◆ QPixmap

friend class QPixmap
friend

Definition at line 58 of file qpixmap_raster_p.h.

◆ QPixmapCacheEntry

friend class QPixmapCacheEntry
friend

Definition at line 60 of file qpixmap_raster_p.h.

◆ QRasterPaintEngine

friend class QRasterPaintEngine
friend

Definition at line 61 of file qpixmap_raster_p.h.

Member Data Documentation

◆ image

QImage QRasterPlatformPixmap::image
protected

The documentation for this class was generated from the following files: