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>.
|
#include <qpaintdevice.h>
Public Types | |
enum | PaintDeviceMetric { PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM , PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY , PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled , PdmDevicePixelRatioF_EncodedA , PdmDevicePixelRatioF_EncodedB } |
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 () |
static int | encodeMetricF (PaintDeviceMetric metric, double value) |
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 |
double | getDecodedMetricF (PaintDeviceMetric metricA, PaintDeviceMetric metricB) 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.
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 53 of file qpaintdevice.h.
|
inline |
Definition at line 54 of file qpaintdevice.h.
qreal QPaintDevice::devicePixelRatio | ( | ) | const |
Definition at line 37 of file qpaintdevice.cpp.
References devicePixelRatioFScale(), getDecodedMetricF(), metric(), PdmDevicePixelRatioF_EncodedA, PdmDevicePixelRatioF_EncodedB, PdmDevicePixelRatioScaled, and Q_STATIC_ASSERT.
Referenced by QErrorMessage::QErrorMessage(), QQC2::QWindowsStylePrivate::devicePixelRatio(), QWindowsVistaStylePrivate::drawBackground(), QWindows11Style::drawControl(), 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(), QtWaylandClient::QWaylandShmBackingStore::recreateBackBufferIfNeeded(), QSGSoftwareRenderer::render(), QWidgetPrivate::render_helper(), QQuickWidget::resizeEvent(), QOpenGLPaintDevice::setDevicePixelRatio(), QWindowsDragCursorWindow::setPixmap(), QShapedPixmapWindow::setPixmap(), and QMacStyle::standardPixmap().
|
inline |
Definition at line 52 of file qpaintdevice.h.
Referenced by createAnimationBuffer().
|
inlinestatic |
Definition at line 56 of file qpaintdevice.h.
Referenced by devicePixelRatio(), 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 81 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().
|
inlinestatic |
Definition at line 87 of file qpaintdevice.h.
References Q_STATIC_ASSERT.
Referenced by QImage::metric(), QPaintDeviceWindow::metric(), QWidget::metric(), QBlittablePlatformPixmap::metric(), QRasterPlatformPixmap::metric(), and QOpenGLPaintDevice::metric().
|
inlineprotected |
Definition at line 24 of file qpaintdevice.cpp.
References metric().
Referenced by devicePixelRatio().
|
inline |
Definition at line 44 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(), and QRasterPaintEnginePrivate::systemStateChanged().
|
inline |
Definition at line 46 of file qpaintdevice.h.
Reimplemented in QWidget.
Definition at line 57 of file qpaintdevice.cpp.
Referenced by QPainterPrivate::initFrom().
|
inline |
Definition at line 47 of file qpaintdevice.h.
Referenced by QAlphaPaintEnginePrivate::drawAlphaImage(), and QTextDocument::print().
|
inline |
Definition at line 48 of file qpaintdevice.h.
Referenced by QFont::QFont(), 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 82 of file qpaintdevice.cpp.
References devicePixelRatioFScale(), metric(), PdmDevicePixelRatio, PdmDevicePixelRatioF_EncodedA, PdmDevicePixelRatioF_EncodedB, PdmDevicePixelRatioScaled, PdmDpiX, PdmDpiY, PdmNumColors, qDebug, and qWarning.
Referenced by QPainter::begin(), devicePixelRatio(), getDecodedMetricF(), 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 84 of file qpaintdevice.h.
Referenced by ~QPaintDevice(), QWidget::~QWidget(), QPixmap::fill(), QPixmap::operator=(), QPicture::save(), QPicture::save(), and QPixmap::setMask().
|
inline |
Definition at line 49 of file qpaintdevice.h.
|
inline |
Definition at line 50 of file qpaintdevice.h.
|
protectedvirtual |
Reimplemented in QRasterWindow, QOpenGLWindow, QWidget, and QOpenGLWidget.
Definition at line 64 of file qpaintdevice.cpp.
Referenced by QPainterPrivate::attachPainterPrivate(), QPainter::begin(), and QWidget::redirected().
|
protectedvirtual |
Reimplemented in QWidget.
Definition at line 72 of file qpaintdevice.cpp.
Referenced by QPainterPrivate::attachPainterPrivate().
|
inline |
Definition at line 43 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(), and QRasterPaintEnginePrivate::systemStateChanged().
|
inline |
Definition at line 45 of file qpaintdevice.h.
|
friend |
Definition at line 72 of file qpaintdevice.h.
|
friend |
Definition at line 70 of file qpaintdevice.h.
|
friend |
Definition at line 71 of file qpaintdevice.h.
|
friend |
Definition at line 77 of file qpaintdevice.cpp.
|
friend |
Definition at line 73 of file qpaintdevice.h.
|
protected |
Definition at line 66 of file qpaintdevice.h.
Referenced by QPaintDevice(), and QPainter::begin().