![]() |
Qt 6.x
The Qt SDK
|
#include <qpaintdevice.h>
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 QPaintEngine * | paintEngine () 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 QPaintDevice * | redirected (QPoint *offset) const |
virtual QPainter * | sharedPainter () 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) |
Definition at line 17 of file qpaintdevice.h.
Enumerator | |
---|---|
PdmWidth | |
PdmHeight | |
PdmWidthMM | |
PdmHeightMM | |
PdmNumColors | |
PdmDepth | |
PdmDpiX | |
PdmDpiY | |
PdmPhysicalDpiX | |
PdmPhysicalDpiY | |
PdmDevicePixelRatio | |
PdmDevicePixelRatioScaled |
Definition at line 20 of file qpaintdevice.h.
|
virtual |
Definition at line 13 of file qpaintdevice.cpp.
References paintingActive(), and qWarning.
|
protectednoexcept |
Definition at line 8 of file qpaintdevice.cpp.
References painters.
|
inline |
Definition at line 51 of file qpaintdevice.h.
|
inline |
Definition at line 52 of file qpaintdevice.h.
Referenced by createDummyWindow().
|
inline |
Definition at line 49 of file qpaintdevice.h.
Referenced by QQC2::QWindowsStylePrivate::devicePixelRatio(), QWindowsVistaStylePrivate::drawBackground(), QWindowsVistaStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QWidgetPrivate::drawWidget(), QPainterPrivate::effectiveDevicePixelRatio(), QOpenGLWidget::event(), QWidget::grab(), QOpenGLWindow::grabFramebuffer(), QWidget::metric(), operator<<(), QSGSoftwareInternalRectangleNode::paint(), QSGSoftwareGlyphNode::paint(), QIconLoaderEngine::paint(), QSvgIconEngine::paint(), QLabel::paintEvent(), QQuickWidget::paintEvent(), qt_getDevicePixelRatio(), QSGSoftwareRenderer::render(), QWidgetPrivate::render_helper(), QQuickWidget::resizeEvent(), QOpenGLPaintDevice::setDevicePixelRatio(), QWindowsDragCursorWindow::setPixmap(), QShapedPixmapWindow::setPixmap(), QMessageBoxPrivate::standardIcon(), and QMacStyle::standardPixmap().
|
inline |
Definition at line 50 of file qpaintdevice.h.
Referenced by createAnimationBuffer().
|
inlinestatic |
Definition at line 54 of file qpaintdevice.h.
Referenced by QPicture::metric(), metric(), QImage::metric(), QPaintDeviceWindow::metric(), QWindowsDirect2DPaintDevice::metric(), QWidget::metric(), QBlittablePlatformPixmap::metric(), QRasterPlatformPixmap::metric(), QOpenGLPaintDevice::metric(), QX11PlatformPixmap::metric(), QSvgGenerator::metric(), QPdfEngine::metric(), QMacPrintEngine::metric(), and QWin32PrintEngine::metric().
|
inlinevirtual |
Reimplemented in QImage, QPicture, QPixmap, QOpenGLPaintDevice, QWindowsDirect2DPaintDevice, QPrinter, and QWidget.
Definition at line 77 of file qpaintdevice.h.
References QInternal::UnknownDevice.
Referenced by QMacCGContext::QMacCGContext(), QPainter::begin(), QMacPrintEngine::begin(), QOpenGL2PaintEngineEx::begin(), QCoreGraphicsPaintEngine::begin(), QX11PaintEngine::begin(), QPixmapConvolutionFilter::draw(), QWindowsVistaStylePrivate::drawBackground(), QQC2::QWindowsXPStylePrivate::drawBackground(), QRasterPaintEngine::drawCachedGlyphs(), QPainterPrivate::effectiveDevicePixelRatio(), QGraphicsProxyWidget::paint(), qt_x11Handle(), qt_x11Info(), QGraphicsView::render(), and QGraphicsScene::render().
|
inline |
Definition at line 42 of file qpaintdevice.h.
Referenced by QPainterPrivate::attachPainterPrivate(), QWindowsDirect2DPaintEngine::begin(), QX11PaintEngine::begin(), QPainterPrivate::draw_helper(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QPainterPrivate::drawStretchedGradient(), QCoreGraphicsPaintEngine::drawTextItem(), src_gui_text_qtextlayout::Wrapper::elided(), QX11PaintEnginePrivate::fillPolygon_dev(), fillRegion(), QTextDocument::print(), QSGSoftwareRenderer::render(), QGraphicsView::render(), QGraphicsScene::render(), QSGSoftwareRenderableNode::renderNode(), QQuickWindowPrivate::renderSceneGraph(), and QRasterPaintEnginePrivate::systemStateChanged().
|
inline |
Definition at line 44 of file qpaintdevice.h.
Reimplemented in QWidget.
Definition at line 24 of file qpaintdevice.cpp.
Referenced by QPainterPrivate::initFrom().
|
inline |
Definition at line 45 of file qpaintdevice.h.
Referenced by QAlphaPaintEnginePrivate::drawAlphaImage(), and QTextDocument::print().
|
inline |
Definition at line 46 of file qpaintdevice.h.
Referenced by QFont::QFont(), QFontMetrics::QFontMetrics(), QFontMetricsF::QFontMetricsF(), QPrintPreviewWidgetPrivate::_q_fit(), QTextDocumentLayoutPrivate::blockIndent(), QTextEngine::calculateTabWidth(), QAlphaPaintEnginePrivate::drawAlphaImage(), QWidget::event(), getSize(), QTextDocument::print(), QTextDocumentLayoutPrivate::scaleToDevice(), QTextDocumentLayoutPrivate::scaleToDevice(), QPrintPreviewWidget::setViewMode(), and QPrintPreviewWidgetPrivate::setZoomFactor().
|
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().
|
pure virtual |
Implemented in QImage, QFakeDevice, QPicture, QPixmap, QPaintDeviceWindow, QPdfWriter, QOpenGLPaintDevice, QOpenGLWidget, QWindowsDirect2DPaintDevice, QPrinter, QWidget, and QSvgGenerator.
Referenced by QPainter::begin(), and QWidgetPrivate::drawWidget().
|
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().
|
inline |
Definition at line 47 of file qpaintdevice.h.
|
inline |
Definition at line 48 of file qpaintdevice.h.
|
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().
|
protectedvirtual |
Reimplemented in QWidget.
Definition at line 39 of file qpaintdevice.cpp.
Referenced by QPainterPrivate::attachPainterPrivate().
|
inline |
Definition at line 41 of file qpaintdevice.h.
Referenced by QPainterPrivate::attachPainterPrivate(), QWindowsDirect2DPaintEngine::begin(), QX11PaintEngine::begin(), QPainterPrivate::draw_helper(), QTextDocumentLayoutPrivate::drawFrameDecoration(), QPainterPrivate::drawStretchedGradient(), src_gui_text_qtextlayout::Wrapper::elided(), QX11PaintEnginePrivate::fillPolygon_dev(), fillRegion(), QTextDocument::print(), QSGSoftwareRenderer::render(), QGraphicsView::render(), QGraphicsScene::render(), QSGSoftwareRenderableNode::renderNode(), QQuickWindowPrivate::renderSceneGraph(), and QRasterPaintEnginePrivate::systemStateChanged().
|
inline |
Definition at line 43 of file qpaintdevice.h.
|
friend |
Definition at line 68 of file qpaintdevice.h.
|
friend |
Definition at line 66 of file qpaintdevice.h.
|
friend |
Definition at line 67 of file qpaintdevice.h.
|
friend |
Definition at line 44 of file qpaintdevice.cpp.
|
friend |
Definition at line 69 of file qpaintdevice.h.
|
protected |
Definition at line 62 of file qpaintdevice.h.
Referenced by QPaintDevice(), and QPainter::begin().