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
QPaintDevice Class Referenceabstract

#include <qpaintdevice.h>

+ Inheritance diagram for QPaintDevice:
+ Collaboration diagram for QPaintDevice:

Public Types

enum  PaintDeviceMetric {
  PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM ,
  PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY ,
  PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled
}
 

Public Member Functions

virtual ~QPaintDevice ()
 
virtual int devType () const
 
bool paintingActive () const
 
virtual QPaintEnginepaintEngine () const =0
 
int width () const
 
int height () const
 
int widthMM () const
 
int heightMM () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
int physicalDpiX () const
 
int physicalDpiY () const
 
qreal devicePixelRatio () const
 
qreal devicePixelRatioF () const
 
int colorCount () const
 
int depth () const
 

Static Public Member Functions

static qreal devicePixelRatioFScale ()
 

Protected Member Functions

 QPaintDevice () noexcept
 
virtual int metric (PaintDeviceMetric metric) const
 
virtual void initPainter (QPainter *painter) const
 
virtual QPaintDeviceredirected (QPoint *offset) const
 
virtual QPaintersharedPainter () const
 

Protected Attributes

ushort painters
 

Friends

class QPainter
 
class QPainterPrivate
 
class QFontEngineMac
 
class QX11PaintEngine
 
Q_GUI_EXPORT int qt_paint_device_metric (const QPaintDevice *device, PaintDeviceMetric metric)
 

Detailed Description

Definition at line 17 of file qpaintdevice.h.

Member Enumeration Documentation

◆ PaintDeviceMetric

Enumerator
PdmWidth 
PdmHeight 
PdmWidthMM 
PdmHeightMM 
PdmNumColors 
PdmDepth 
PdmDpiX 
PdmDpiY 
PdmPhysicalDpiX 
PdmPhysicalDpiY 
PdmDevicePixelRatio 
PdmDevicePixelRatioScaled 

Definition at line 20 of file qpaintdevice.h.

Constructor & Destructor Documentation

◆ ~QPaintDevice()

QPaintDevice::~QPaintDevice ( )
virtual

Definition at line 13 of file qpaintdevice.cpp.

References paintingActive(), and qWarning.

+ Here is the call graph for this function:

◆ QPaintDevice()

QT_BEGIN_NAMESPACE QPaintDevice::QPaintDevice ( )
protectednoexcept

Definition at line 8 of file qpaintdevice.cpp.

References painters.

Member Function Documentation

◆ colorCount()

int QPaintDevice::colorCount ( ) const
inline

Definition at line 51 of file qpaintdevice.h.

◆ depth()

int QPaintDevice::depth ( ) const
inline

Definition at line 52 of file qpaintdevice.h.

◆ devicePixelRatio()

◆ devicePixelRatioF()

qreal QPaintDevice::devicePixelRatioF ( ) const
inline

Definition at line 50 of file qpaintdevice.h.

Referenced by createAnimationBuffer().

+ Here is the caller graph for this function:

◆ devicePixelRatioFScale()

static qreal QPaintDevice::devicePixelRatioFScale ( )
inlinestatic

◆ devType()

◆ height()

◆ heightMM()

int QPaintDevice::heightMM ( ) const
inline

Definition at line 44 of file qpaintdevice.h.

◆ initPainter()

void QPaintDevice::initPainter ( QPainter * painter) const
protectedvirtual

Reimplemented in QWidget.

Definition at line 24 of file qpaintdevice.cpp.

Referenced by QPainterPrivate::initFrom().

+ Here is the caller graph for this function:

◆ logicalDpiX()

int QPaintDevice::logicalDpiX ( ) const
inline

Definition at line 45 of file qpaintdevice.h.

Referenced by QAlphaPaintEnginePrivate::drawAlphaImage(), and QTextDocument::print().

+ Here is the caller graph for this function:

◆ logicalDpiY()

int QPaintDevice::logicalDpiY ( ) const
inline

◆ metric()

int QPaintDevice::metric ( PaintDeviceMetric metric) const
protectedvirtual

Reimplemented in QPdfWriter, QFakeDevice, QPicture, QImage, QPaintDeviceWindow, QRasterWindow, QOpenGLWindow, QWindowsDirect2DPaintDevice, QPixmap, QPrinter, QWidget, QOpenGLPaintDevice, QOpenGLWidget, and QSvgGenerator.

Definition at line 49 of file qpaintdevice.cpp.

References devicePixelRatioFScale(), metric(), PdmDevicePixelRatio, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmNumColors, qDebug, and qWarning.

Referenced by QPainter::begin(), QFakeDevice::metric(), metric(), QPaintDeviceWindow::metric(), and QWidget::metric().

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

◆ paintEngine()

virtual QPaintEngine * QPaintDevice::paintEngine ( ) const
pure virtual

Implemented in QImage, QFakeDevice, QPicture, QPixmap, QPaintDeviceWindow, QPdfWriter, QOpenGLPaintDevice, QOpenGLWidget, QWindowsDirect2DPaintDevice, QPrinter, QWidget, and QSvgGenerator.

Referenced by QPainter::begin(), and QWidgetPrivate::drawWidget().

+ Here is the caller graph for this function:

◆ paintingActive()

bool QPaintDevice::paintingActive ( ) const
inline

Definition at line 80 of file qpaintdevice.h.

Referenced by ~QPaintDevice(), QWidget::~QWidget(), QPixmap::fill(), QPixmap::operator=(), QPicture::save(), QPicture::save(), and QPixmap::setMask().

+ Here is the caller graph for this function:

◆ physicalDpiX()

int QPaintDevice::physicalDpiX ( ) const
inline

Definition at line 47 of file qpaintdevice.h.

◆ physicalDpiY()

int QPaintDevice::physicalDpiY ( ) const
inline

Definition at line 48 of file qpaintdevice.h.

◆ redirected()

QPaintDevice * QPaintDevice::redirected ( QPoint * offset) const
protectedvirtual

Reimplemented in QRasterWindow, QOpenGLWindow, QWidget, and QOpenGLWidget.

Definition at line 31 of file qpaintdevice.cpp.

Referenced by QPainterPrivate::attachPainterPrivate(), QPainter::begin(), and QWidget::redirected().

+ Here is the caller graph for this function:

◆ sharedPainter()

QPainter * QPaintDevice::sharedPainter ( ) const
protectedvirtual

Reimplemented in QWidget.

Definition at line 39 of file qpaintdevice.cpp.

Referenced by QPainterPrivate::attachPainterPrivate().

+ Here is the caller graph for this function:

◆ width()

◆ widthMM()

int QPaintDevice::widthMM ( ) const
inline

Definition at line 43 of file qpaintdevice.h.

Friends And Related Symbol Documentation

◆ QFontEngineMac

friend class QFontEngineMac
friend

Definition at line 68 of file qpaintdevice.h.

◆ QPainter

friend class QPainter
friend

Definition at line 66 of file qpaintdevice.h.

◆ QPainterPrivate

friend class QPainterPrivate
friend

Definition at line 67 of file qpaintdevice.h.

◆ qt_paint_device_metric

Q_GUI_EXPORT int qt_paint_device_metric ( const QPaintDevice * device,
QPaintDevice::PaintDeviceMetric metric )
friend

Definition at line 44 of file qpaintdevice.cpp.

◆ QX11PaintEngine

friend class QX11PaintEngine
friend

Definition at line 69 of file qpaintdevice.h.

Member Data Documentation

◆ painters

ushort QPaintDevice::painters
protected

Definition at line 62 of file qpaintdevice.h.

Referenced by QPaintDevice(), and QPainter::begin().


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