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
QX11PlatformPixmap Class Reference

#include <qpixmap_x11_p.h>

+ Inheritance diagram for QX11PlatformPixmap:
+ Collaboration diagram for QX11PlatformPixmap:

Public Member Functions

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

Static Public Member Functions

static XID createBitmapFromImage (const QImage &image)
 
- Static Public Member Functions inherited from QPlatformPixmap
static QPlatformPixmapcreate (int w, int h, PixelType type)
 

Friends

class QX11PaintEngine
 
const QXcbX11Infoqt_x11Info (const QPixmap &pixmap)
 
void qt_x11SetScreen (QPixmap &pixmap, int screen)
 

Additional Inherited Members

- Public Types inherited from QPlatformPixmap
enum  PixelType { PixmapType , BitmapType }
 
enum  ClassId {
  RasterClass , DirectFBClass , BlitterClass , Direct2DClass ,
  X11Class , CustomClass = 1024
}
 
- Protected Member Functions inherited from QPlatformPixmap
void setSerialNumber (int serNo)
 
void setDetachNumber (int detNo)
 
- Protected Attributes inherited from QPlatformPixmap
int w
 
int h
 
int d
 
bool is_null
 

Detailed Description

Definition at line 23 of file qpixmap_x11_p.h.

Constructor & Destructor Documentation

◆ QX11PlatformPixmap()

QX11PlatformPixmap::QX11PlatformPixmap ( PixelType pixelType)

Definition at line 334 of file qpixmap_x11.cpp.

◆ ~QX11PlatformPixmap()

QX11PlatformPixmap::~QX11PlatformPixmap ( )

Definition at line 340 of file qpixmap_x11.cpp.

References QImagePixmapCleanupHooks::executePlatformPixmapDestructionHooks().

Referenced by transformed().

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

Member Function Documentation

◆ copy()

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

Reimplemented from QPlatformPixmap.

Definition at line 1157 of file qpixmap_x11.cpp.

References attrs, Qt::AutoColor, QPlatformPixmap::BitmapType, QPlatformPixmap::d, QXcbX11Info::display(), QBasicAtomicInteger< T >::fetchAndAddRelaxed(), fromImage(), gc(), QPlatformPixmap::is_null, qt_pixmap_serial, rect, QPlatformPixmap::setSerialNumber(), QXcbX11Info::visual(), and X11.

+ Here is the call graph for this function:

◆ createBitmapFromImage()

XID QX11PlatformPixmap::createBitmapFromImage ( const QImage & image)
static

Definition at line 1692 of file qpixmap_x11.cpp.

References QXcbX11Info::appRootWindow(), Qt::black, QXcbX11Info::display(), QImage::Format_MonoLSB, QPlatformPixmap::h, QRgb, QColor::rgb(), and Qt::white.

+ Here is the call graph for this function:

◆ createCompatiblePlatformPixmap()

QPlatformPixmap * QX11PlatformPixmap::createCompatiblePlatformPixmap ( ) const
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 351 of file qpixmap_x11.cpp.

References devicePixelRatio(), QPlatformPixmap::pixelType(), and QPlatformPixmap::QX11PlatformPixmap.

+ Here is the call graph for this function:

◆ devicePixelRatio()

qreal QX11PlatformPixmap::devicePixelRatio ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 1662 of file qpixmap_x11.cpp.

Referenced by createCompatiblePlatformPixmap(), and metric().

+ Here is the caller graph for this function:

◆ fill()

void QX11PlatformPixmap::fill ( const QColor & fillColor)
overridevirtual

Implements QPlatformPixmap.

Definition at line 1270 of file qpixmap_x11.cpp.

References QColor::alpha(), Qt::AutoColor, QPlatformPixmap::d, QPlatformPixmap::depth(), QXcbX11Info::display(), QImage::fill(), QImage::Format_ARGB32_Premultiplied, fromImage(), gc(), QPlatformPixmap::height(), QXcbColormap::instance(), Qt::OrderedAlphaDither, PREMUL(), qGray(), QColor::rgb(), QColor::rgba(), QXcbX11Info::screen(), QPlatformPixmap::width(), and X11.

Referenced by setMask().

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

◆ fromImage()

void QX11PlatformPixmap::fromImage ( const QImage & img,
Qt::ImageConversionFlags flags )
overridevirtual

Implements QPlatformPixmap.

Definition at line 432 of file qpixmap_x11.cpp.

References QXcbX11Info::appDepth(), Qt::AutoColor, Qt::AutoDither, Qt::AvoidDither, QSysInfo::BigEndian, QPlatformPixmap::BitmapType, QSysInfo::ByteOrder, Qt::ColorMode_Mask, Qt::ColorOnly, CYCLE, QPlatformPixmap::d, defaultScreen, QXcbX11Info::depth(), QXcbX11Info::display(), dist(), Qt::Dither_Mask, Qt::DitherMode_Mask, QBasicAtomicInteger< T >::fetchAndAddRelaxed(), fmt, QImage::Format_ARGB32, QImage::Format_ARGB32_Premultiplied, QImage::Format_Indexed8, QImage::Format_MonoLSB, QImage::Format_RGB32, QBitmap::fromImage(), fromImage(), QXcbX11Info::fromScreen(), gc(), GET_PIXEL, GET_PIXEL_DITHER_TC, GET_PIXEL_DITHER_TC_OPT, QPlatformPixmap::h, highest_bit(), i, init(), QXcbColormap::instance(), QPlatformPixmap::is_null, j, lowest_bit(), Qt::MonoOnly, n_bits(), p2, PIX, pix, QXcbColormap::pixel(), QPlatformPixmap::pixelType(), Qt::PreferDither, Q_ASSERT, Q_CHECK_PTR(), Q_UNUSED, qAlpha(), qBlue(), qFatal, qGreen(), qMax(), qMin(), qRed(), QRgb, qRgb(), qRgba(), qSafeXDestroyImage(), qt_div_255(), qt_pixmap_serial, qt_x11_preferred_pixmap_depth, qWarning, rgb, QXcbX11Info::screen(), QXcbX11Info::setDepth(), setDevicePixelRatio(), setMask(), QPlatformPixmap::setSerialNumber(), Qt::ThresholdDither, QXcbX11Info::visual(), QPlatformPixmap::w, and X11.

Referenced by copy(), fill(), fromImage(), and qt_toX11Pixmap().

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

◆ handle()

Drawable QX11PlatformPixmap::handle ( ) const
inline

Definition at line 46 of file qpixmap_x11_p.h.

Referenced by setMask(), and transformed().

+ Here is the caller graph for this function:

◆ hasAlphaChannel()

bool QX11PlatformPixmap::hasAlphaChannel ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 1404 of file qpixmap_x11.cpp.

References QPlatformPixmap::d.

◆ isBackingStore()

bool QX11PlatformPixmap::isBackingStore ( ) const

Definition at line 1733 of file qpixmap_x11.cpp.

◆ mask()

QBitmap QX11PlatformPixmap::mask ( ) const
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 1306 of file qpixmap_x11.cpp.

References QPlatformPixmap::d, QBitmap::fromImage(), QBitmap::fromPixmap(), mask(), QPlatformPixmap::QPixmap, QXcbX11Info::screen(), and toImage().

Referenced by mask(), and transformed().

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

◆ metric()

int QX11PlatformPixmap::metric ( QPaintDevice::PaintDeviceMetric metric) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 1229 of file qpixmap_x11.cpp.

References QXcbX11Info::appDpiX(), QXcbX11Info::appDpiY(), QPlatformPixmap::d, devicePixelRatio(), QPaintDevice::devicePixelRatioFScale(), QXcbX11Info::display(), 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, qWarning, QXcbX11Info::screen(), screen, and QPlatformPixmap::w.

Referenced by metric().

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

◆ paintEngine()

QPaintEngine * QX11PlatformPixmap::paintEngine ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 1621 of file qpixmap_x11.cpp.

References d, QXcbX11Info::display(), gc(), and QXcbX11Info::screen().

+ Here is the call graph for this function:

◆ resize()

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

Implements QPlatformPixmap.

Definition at line 358 of file qpixmap_x11.cpp.

References QPlatformPixmap::BitmapType, QPlatformPixmap::d, defaultScreen, QXcbX11Info::depth(), QXcbX11Info::display(), QBasicAtomicInteger< T >::fetchAndAddRelaxed(), QXcbX11Info::fromScreen(), QPlatformPixmap::height(), QPlatformPixmap::is_null, QPlatformPixmap::pixelType(), qt_pixmap_serial, qt_x11_preferred_pixmap_depth, qWarning, QXcbX11Info::screen(), QPlatformPixmap::setSerialNumber(), QXcbX11Info::visual(), QPlatformPixmap::width(), and X11.

Referenced by setMask().

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

◆ scroll()

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

Reimplemented from QPlatformPixmap.

Definition at line 1219 of file qpixmap_x11.cpp.

References QXcbX11Info::display(), gc(), and rect.

+ Here is the call graph for this function:

◆ setDevicePixelRatio()

void QX11PlatformPixmap::setDevicePixelRatio ( qreal scaleFactor)
overridevirtual

Implements QPlatformPixmap.

Definition at line 1667 of file qpixmap_x11.cpp.

Referenced by fromImage().

+ Here is the caller graph for this function:

◆ setIsBackingStore()

void QX11PlatformPixmap::setIsBackingStore ( bool on)

Definition at line 1738 of file qpixmap_x11.cpp.

◆ setMask()

void QX11PlatformPixmap::setMask ( const QBitmap & mask)
overridevirtual

Reimplemented from QPlatformPixmap.

Definition at line 1324 of file qpixmap_x11.cpp.

References attrs, Qt::black, QPlatformPixmap::d, QPlatformPixmap::depth(), QXcbX11Info::display(), fill(), gc(), handle(), QPlatformPixmap::height(), QPlatformPixmap::pixelType(), qt_x11Pixmap(), resize(), QXcbX11Info::screen(), QPlatformPixmap::width(), and x11PictureHandle().

Referenced by fromImage().

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

◆ toImage() [1/2]

QImage QX11PlatformPixmap::toImage ( ) const
overridevirtual

Implements QPlatformPixmap.

Definition at line 1574 of file qpixmap_x11.cpp.

References toImage().

Referenced by mask(), toImage(), toImage(), and transformed().

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

◆ toImage() [2/2]

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

Reimplemented from QPlatformPixmap.

Definition at line 1579 of file qpixmap_x11.cpp.

References QXcbX11Info::display(), Q_CHECK_PTR(), qSafeXDestroyImage(), rect, toImage(), and QXImageWrapper::xi.

+ Here is the call graph for this function:

◆ transformed()

◆ x11_info()

const QXcbX11Info * QX11PlatformPixmap::x11_info ( ) const
inline

Definition at line 48 of file qpixmap_x11_p.h.

◆ x11ConvertToDefaultDepth()

Pixmap QX11PlatformPixmap::x11ConvertToDefaultDepth ( )

Definition at line 1672 of file qpixmap_x11.cpp.

References QXcbX11Info::appDepth(), QPlatformPixmap::d, QXcbX11Info::display(), QXcbX11Info::visual(), X11, and XNone.

+ Here is the call graph for this function:

◆ x11PictureHandle()

Picture QX11PlatformPixmap::x11PictureHandle ( ) const
inline

Definition at line 47 of file qpixmap_x11_p.h.

Referenced by setMask().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ qt_x11Info

const QXcbX11Info & qt_x11Info ( const QPixmap & pixmap)
friend

Definition at line 118 of file qpixmap_x11_p.h.

◆ qt_x11SetScreen

void qt_x11SetScreen ( QPixmap & pixmap,
int screen )
friend

Definition at line 294 of file qpixmap_x11.cpp.

◆ QX11PaintEngine

friend class QX11PaintEngine
friend

Definition at line 60 of file qpixmap_x11_p.h.


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