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

#include <qprintengine_win_p.h>

+ Inheritance diagram for QWin32PrintEnginePrivate:
+ Collaboration diagram for QWin32PrintEnginePrivate:

Public Member Functions

 QWin32PrintEnginePrivate ()
 
 ~QWin32PrintEnginePrivate ()
 
void initialize ()
 
void initHDC ()
 
void release ()
 
void doReinit ()
 
bool resetDC ()
 
void strokePath (const QPainterPath &path, const QColor &color)
 
void fillPath (const QPainterPath &path, const QColor &color)
 
void composeGdiPath (const QPainterPath &path)
 
void fillPath_dev (const QPainterPath &path, const QColor &color)
 
void strokePath_dev (const QPainterPath &path, const QColor &color, qreal width)
 
void setPageSize (const QPageSize &pageSize)
 
void updatePageLayout ()
 
void updateMetrics ()
 
void debugMetrics () const
 
- Public Member Functions inherited from QAlphaPaintEnginePrivate
 QAlphaPaintEnginePrivate ()
 
 ~QAlphaPaintEnginePrivate ()
 
void addAlphaRect (const QRectF &rect)
 
void addDirtyRect (const QRectF &rect)
 
bool canSeeTroughBackground (bool somethingInRectHasAlpha, const QRectF &rect) const
 
QRectF addPenWidth (const QPainterPath &path)
 
void drawAlphaImage (const QRectF &rect)
 
QRect toRect (const QRectF &rect) const
 
bool fullyContained (const QRectF &rect) const
 
void resetState (QPainter *p)
 
- Public Member Functions inherited from QPaintEnginePrivate
 QPaintEnginePrivate ()
 
virtual ~QPaintEnginePrivate ()
 
void updateSystemClip ()
 
void setSystemTransform (const QTransform &xform)
 
void setSystemViewport (const QRegion &region)
 
void setSystemTransformAndViewport (const QTransform &xform, const QRegion &region)
 
virtual void systemStateChanged ()
 
void drawBoxTextItem (const QPointF &p, const QTextItemInt &ti)
 
virtual QPaintEngineaggregateEngine ()
 
virtual Qt::HANDLE nativeHandle ()
 

Static Public Member Functions

static void initializeDevMode (DEVMODE *)
 
- Static Public Member Functions inherited from QPaintEnginePrivate
static QPaintEnginePrivateget (QPaintEngine *paintEngine)
 

Public Attributes

HANDLE hPrinter = nullptr
 
HGLOBAL globalDevMode = nullptr
 
DEVMODE * devMode = nullptr
 
PRINTER_INFO_2 * pInfo = nullptr
 
HGLOBAL hMem = nullptr
 
HDC hdc = nullptr
 
bool ownsDevMode = false
 
QPrinter::PrinterMode mode = QPrinter::ScreenResolution
 
QPrintDevice m_printDevice
 
QString docName
 
QString m_creator
 
QString fileName
 
QPrinter::PrinterState state = QPrinter::Idle
 
int resolution = 0
 
QPageLayout m_pageLayout
 
QRect m_paintRectPixels
 
QSize m_paintSizeMM
 
qreal stretch_x = 1
 
qreal stretch_y = 1
 
int origin_x = 0
 
int origin_y = 0
 
int dpi_x = 96
 
int dpi_y = 96
 
int dpi_display = 96
 
int num_copies = 1
 
uint printToFile: 1
 
uint reinit: 1
 
uint complex_xform: 1
 
uint has_pen: 1
 
uint has_brush: 1
 
uint has_custom_paper_size: 1
 
uint embed_fonts: 1
 
uint txop = 0
 
QColor brush_color
 
QPen pen
 
QColor pen_color
 
QSizeF paper_size
 
QTransform painterMatrix
 
QTransform matrix
 
- Public Attributes inherited from QAlphaPaintEnginePrivate
int m_pass
 
QPicturem_pic
 
QPaintEnginem_picengine
 
QPainterm_picpainter
 
QPaintEngine::PaintEngineFeatures m_savedcaps
 
QPaintDevicem_pdev
 
QRegion m_alphargn
 
QRegion m_cliprgn
 
QRegion m_cachedDirtyRgn
 
int m_numberOfCachedRects
 
QList< QRectm_dirtyRects
 
bool m_hasalpha
 
bool m_alphaPen
 
bool m_alphaBrush
 
bool m_alphaOpacity
 
bool m_advancedPen
 
bool m_advancedBrush
 
bool m_complexTransform
 
bool m_emulateProjectiveTransforms
 
bool m_continueCall
 
QTransform m_transform
 
QPen m_pen
 
- Public Attributes inherited from QPaintEnginePrivate
QPaintDevicepdev
 
QPaintEngineq_ptr
 
QRegion baseSystemClip
 
QRegion systemClip
 
QRect systemRect
 
QRegion systemViewport
 
QTransform systemTransform
 
QPaintDevicecurrentClipDevice
 
uint hasSystemTransform: 1
 
uint hasSystemViewport: 1
 

Detailed Description

Definition at line 81 of file qprintengine_win_p.h.

Constructor & Destructor Documentation

◆ QWin32PrintEnginePrivate()

QWin32PrintEnginePrivate::QWin32PrintEnginePrivate ( )
inline

Definition at line 85 of file qprintengine_win_p.h.

◆ ~QWin32PrintEnginePrivate()

QWin32PrintEnginePrivate::~QWin32PrintEnginePrivate ( )

Definition at line 825 of file qprintengine_win.cpp.

References release().

+ Here is the call graph for this function:

Member Function Documentation

◆ composeGdiPath()

void QWin32PrintEnginePrivate::composeGdiPath ( const QPainterPath & path)

Definition at line 644 of file qprintengine_win.cpp.

References QPainterPath::CurveToElement, hdc, i, QPainterPath::LineToElement, QPainterPath::MoveToElement, qErrnoWarning(), qFatal, qRound(), and Qt::WindingFill.

Referenced by fillPath_dev(), and strokePath_dev().

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

◆ debugMetrics()

void QWin32PrintEnginePrivate::debugMetrics ( ) const

Definition at line 1717 of file qprintengine_win.cpp.

References dpi_x, dpi_y, m_pageLayout, m_paintRectPixels, m_paintSizeMM, origin_x, origin_y, qDebug, resolution, stretch_x, and stretch_y.

Referenced by initialize().

+ Here is the caller graph for this function:

◆ doReinit()

void QWin32PrintEnginePrivate::doReinit ( )

Definition at line 986 of file qprintengine_win.cpp.

References QPrinter::Active, reinit, resetDC(), and state.

+ Here is the call graph for this function:

◆ fillPath()

void QWin32PrintEnginePrivate::fillPath ( const QPainterPath & path,
const QColor & color )

Definition at line 733 of file qprintengine_win.cpp.

References fillPath_dev().

+ Here is the call graph for this function:

◆ fillPath_dev()

void QWin32PrintEnginePrivate::fillPath_dev ( const QPainterPath & path,
const QColor & color )

Definition at line 692 of file qprintengine_win.cpp.

References composeGdiPath(), hdc, and qDebug.

Referenced by fillPath(), and strokePath().

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

◆ initHDC()

void QWin32PrintEnginePrivate::initHDC ( )

Definition at line 927 of file qprintengine_win.cpp.

References dpi_display, dpi_x, dpi_y, hdc, QPrinter::HighResolution, QPrinter::PrinterResolution, Q_ASSERT, qWarning, resolution, QPrinter::ScreenResolution, stretch_x, stretch_y, and updateMetrics().

Referenced by initialize().

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

◆ initialize()

void QWin32PrintEnginePrivate::initialize ( )

Definition at line 830 of file qprintengine_win.cpp.

References debugMetrics(), devMode, hdc, hMem, hPrinter, QPrintDevice::id(), initHDC(), initializeDevMode(), QPrintDevice::isValid(), m_printDevice, num_copies, ok, ownsDevMode, pInfo, Q_ASSERT, qDebug, qErrnoWarning(), release(), QTransform::TxNone, txop, updatePageLayout(), and QString::utf16().

+ Here is the call graph for this function:

◆ initializeDevMode()

void QWin32PrintEnginePrivate::initializeDevMode ( DEVMODE * devMode)
static

Definition at line 920 of file qprintengine_win.cpp.

References devMode.

Referenced by initialize().

+ Here is the caller graph for this function:

◆ release()

void QWin32PrintEnginePrivate::release ( )

Definition at line 961 of file qprintengine_win.cpp.

References devMode, globalDevMode, hdc, hMem, hPrinter, ownsDevMode, and pInfo.

Referenced by ~QWin32PrintEnginePrivate(), and initialize().

+ Here is the caller graph for this function:

◆ resetDC()

bool QWin32PrintEnginePrivate::resetDC ( )

Definition at line 996 of file qprintengine_win.cpp.

References devMode, hdc, qErrnoWarning(), and qWarning.

Referenced by doReinit().

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

◆ setPageSize()

void QWin32PrintEnginePrivate::setPageSize ( const QPageSize & pageSize)

Definition at line 1619 of file qprintengine_win.cpp.

References devMode, DMPAPER_USER, has_custom_paper_size, QPageSize::isValid(), m_pageLayout, m_printDevice, QPageSize::Millimeter, QPageLayout::orientation(), QPageLayout::pageSize(), QPageLayout::Point, QPrintDevice::printableMargins(), Q_ASSERT, qRound(), qt_convertMargins(), resolution, QPageLayout::setPageSize(), QPageSize::size(), QPrintDevice::supportedPageSize(), QPageLayout::units(), updateMetrics(), and QPageSize::windowsId().

Referenced by updatePageLayout().

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

◆ strokePath()

◆ strokePath_dev()

void QWin32PrintEnginePrivate::strokePath_dev ( const QPainterPath & path,
const QColor & color,
qreal width )

Definition at line 706 of file qprintengine_win.cpp.

References QPen::capStyle(), composeGdiPath(), Qt::FlatCap, hdc, QPen::joinStyle(), Qt::MiterJoin, pen, Qt::RoundCap, and Qt::RoundJoin.

Referenced by strokePath().

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

◆ updateMetrics()

void QWin32PrintEnginePrivate::updateMetrics ( )

Definition at line 1695 of file qprintengine_win.cpp.

References dpi_x, dpi_y, QTransform::fromScale(), QPageLayout::FullPageMode, QPageLayout::fullRectPixels(), hdc, QRect::height(), QMarginsF::left(), m_pageLayout, m_paintRectPixels, m_paintSizeMM, QPageLayout::margins(), QPageLayout::Millimeter, QPageLayout::mode(), origin_x, origin_y, QPageLayout::paintRect(), QPageLayout::paintRectPixels(), qRound(), resolution, QRectF::size(), QMarginsF::top(), and QRect::width().

Referenced by initHDC(), setPageSize(), and updatePageLayout().

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

◆ updatePageLayout()

void QWin32PrintEnginePrivate::updatePageLayout ( )

Definition at line 1652 of file qprintengine_win.cpp.

References devMode, DMPAPER_LAST, hdc, QPageSize::id(), QPageLayout::Landscape, m_pageLayout, QPageSize::Millimeter, QPageSize::Point, QPageLayout::Portrait, Q_ASSERT, QPageLayout::setOrientation(), setPageSize(), and updateMetrics().

Referenced by initialize().

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

Member Data Documentation

◆ brush_color

QColor QWin32PrintEnginePrivate::brush_color

Definition at line 185 of file qprintengine_win_p.h.

◆ complex_xform

uint QWin32PrintEnginePrivate::complex_xform

Definition at line 177 of file qprintengine_win_p.h.

◆ devMode

DEVMODE* QWin32PrintEnginePrivate::devMode = nullptr

◆ docName

QString QWin32PrintEnginePrivate::docName

Definition at line 149 of file qprintengine_win_p.h.

◆ dpi_display

int QWin32PrintEnginePrivate::dpi_display = 96

Definition at line 171 of file qprintengine_win_p.h.

Referenced by initHDC().

◆ dpi_x

int QWin32PrintEnginePrivate::dpi_x = 96

Definition at line 169 of file qprintengine_win_p.h.

Referenced by debugMetrics(), initHDC(), and updateMetrics().

◆ dpi_y

int QWin32PrintEnginePrivate::dpi_y = 96

Definition at line 170 of file qprintengine_win_p.h.

Referenced by debugMetrics(), initHDC(), and updateMetrics().

◆ embed_fonts

uint QWin32PrintEnginePrivate::embed_fonts

Definition at line 181 of file qprintengine_win_p.h.

◆ fileName

QString QWin32PrintEnginePrivate::fileName

Definition at line 151 of file qprintengine_win_p.h.

◆ globalDevMode

HGLOBAL QWin32PrintEnginePrivate::globalDevMode = nullptr

Definition at line 133 of file qprintengine_win_p.h.

Referenced by release().

◆ has_brush

uint QWin32PrintEnginePrivate::has_brush

Definition at line 179 of file qprintengine_win_p.h.

◆ has_custom_paper_size

uint QWin32PrintEnginePrivate::has_custom_paper_size

Definition at line 180 of file qprintengine_win_p.h.

Referenced by setPageSize().

◆ has_pen

uint QWin32PrintEnginePrivate::has_pen

Definition at line 178 of file qprintengine_win_p.h.

◆ hdc

HDC QWin32PrintEnginePrivate::hdc = nullptr

◆ hMem

HGLOBAL QWin32PrintEnginePrivate::hMem = nullptr

Definition at line 136 of file qprintengine_win_p.h.

Referenced by initialize(), and release().

◆ hPrinter

HANDLE QWin32PrintEnginePrivate::hPrinter = nullptr

Definition at line 131 of file qprintengine_win_p.h.

Referenced by initialize(), and release().

◆ m_creator

QString QWin32PrintEnginePrivate::m_creator

Definition at line 150 of file qprintengine_win_p.h.

◆ m_pageLayout

QPageLayout QWin32PrintEnginePrivate::m_pageLayout
Initial value:
\inmodule QtCore
Definition qmargins.h:274
\inmodule QtGui
Definition qpagesize.h:22

Definition at line 157 of file qprintengine_win_p.h.

Referenced by debugMetrics(), setPageSize(), updateMetrics(), and updatePageLayout().

◆ m_paintRectPixels

QRect QWin32PrintEnginePrivate::m_paintRectPixels

Definition at line 160 of file qprintengine_win_p.h.

Referenced by debugMetrics(), and updateMetrics().

◆ m_paintSizeMM

QSize QWin32PrintEnginePrivate::m_paintSizeMM

Definition at line 161 of file qprintengine_win_p.h.

Referenced by debugMetrics(), and updateMetrics().

◆ m_printDevice

QPrintDevice QWin32PrintEnginePrivate::m_printDevice

Definition at line 146 of file qprintengine_win_p.h.

Referenced by initialize(), and setPageSize().

◆ matrix

QTransform QWin32PrintEnginePrivate::matrix

Definition at line 191 of file qprintengine_win_p.h.

◆ mode

QPrinter::PrinterMode QWin32PrintEnginePrivate::mode = QPrinter::ScreenResolution

Definition at line 143 of file qprintengine_win_p.h.

◆ num_copies

int QWin32PrintEnginePrivate::num_copies = 1

Definition at line 172 of file qprintengine_win_p.h.

Referenced by initialize().

◆ origin_x

int QWin32PrintEnginePrivate::origin_x = 0

Definition at line 166 of file qprintengine_win_p.h.

Referenced by debugMetrics(), strokePath(), and updateMetrics().

◆ origin_y

int QWin32PrintEnginePrivate::origin_y = 0

Definition at line 167 of file qprintengine_win_p.h.

Referenced by debugMetrics(), strokePath(), and updateMetrics().

◆ ownsDevMode

bool QWin32PrintEnginePrivate::ownsDevMode = false

Definition at line 141 of file qprintengine_win_p.h.

Referenced by initialize(), and release().

◆ painterMatrix

QTransform QWin32PrintEnginePrivate::painterMatrix

Definition at line 190 of file qprintengine_win_p.h.

Referenced by strokePath().

◆ paper_size

QSizeF QWin32PrintEnginePrivate::paper_size

Definition at line 188 of file qprintengine_win_p.h.

◆ pen

QPen QWin32PrintEnginePrivate::pen

Definition at line 186 of file qprintengine_win_p.h.

Referenced by strokePath(), and strokePath_dev().

◆ pen_color

QColor QWin32PrintEnginePrivate::pen_color

Definition at line 187 of file qprintengine_win_p.h.

◆ pInfo

PRINTER_INFO_2* QWin32PrintEnginePrivate::pInfo = nullptr

Definition at line 135 of file qprintengine_win_p.h.

Referenced by initialize(), and release().

◆ printToFile

uint QWin32PrintEnginePrivate::printToFile

Definition at line 174 of file qprintengine_win_p.h.

◆ reinit

uint QWin32PrintEnginePrivate::reinit

Definition at line 175 of file qprintengine_win_p.h.

Referenced by doReinit().

◆ resolution

int QWin32PrintEnginePrivate::resolution = 0

Definition at line 154 of file qprintengine_win_p.h.

Referenced by debugMetrics(), initHDC(), setPageSize(), and updateMetrics().

◆ state

QPrinter::PrinterState QWin32PrintEnginePrivate::state = QPrinter::Idle

Definition at line 153 of file qprintengine_win_p.h.

Referenced by doReinit().

◆ stretch_x

qreal QWin32PrintEnginePrivate::stretch_x = 1

Definition at line 164 of file qprintengine_win_p.h.

Referenced by debugMetrics(), initHDC(), and strokePath().

◆ stretch_y

qreal QWin32PrintEnginePrivate::stretch_y = 1

Definition at line 165 of file qprintengine_win_p.h.

Referenced by debugMetrics(), initHDC(), and strokePath().

◆ txop

uint QWin32PrintEnginePrivate::txop = 0

Definition at line 183 of file qprintengine_win_p.h.

Referenced by initialize().


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