Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QPainterPrivate Class Reference

#include <qpainter_p.h>

Collaboration diagram for QPainterPrivate:

Classes

struct  QPaintEngineDestructor
struct  SmallStack

Public Types

enum  DrawOperation { StrokeDraw = 0x1 , FillDraw = 0x2 , StrokeAndFillDraw = 0x3 }

Public Member Functions

 QPainterPrivate (QPainter *painter)
 ~QPainterPrivate ()
QPainterDummyStatefakeState () const
void updateEmulationSpecifier (QPainterState *s)
void updateStateImpl (QPainterState *state)
void updateState (QPainterState *state)
void updateState (std::unique_ptr< QPainterState > &state)
void draw_helper (const QPainterPath &path, DrawOperation operation=StrokeAndFillDraw)
void drawStretchedGradient (const QPainterPath &path, DrawOperation operation)
void drawOpaqueBackground (const QPainterPath &path, DrawOperation operation)
void drawTextItem (const QPointF &p, const QTextItem &_ti, QTextEngine *textEngine)
void drawGlyphs (const QPointF &decorationPosition, const quint32 *glyphArray, QFixedPoint *positionArray, int glyphCount, QFontEngine *fontEngine, bool overline=false, bool underline=false, bool strikeOut=false)
void updateMatrix ()
void updateInvMatrix ()
void checkEmulation ()
QTransform viewTransform () const
qreal effectiveDevicePixelRatio () const
QTransform hidpiScaleTransform () const
void detachPainterPrivate (QPainter *q)
void initFrom (const QPaintDevice *device)

Static Public Member Functions

static QPainterPrivateget (QPainter *painter)
static bool attachPainterPrivate (QPainter *q, QPaintDevice *pdev)

Public Attributes

QPainterq_ptr
QVarLengthArray< std::unique_ptr< QPainterPrivate >, NDPtrsd_ptrs
std::unique_ptr< QPainterStatestate
SmallStack< std::unique_ptr< QPainterState > > savedStates
std::unique_ptr< QPainterDummyStatedummyState
QTransform invMatrix
uint txinv:1
uint inDestructor: 1
uint refcount = 1
QPaintDevicedevice = nullptr
QPaintDeviceoriginal_device = nullptr
QPaintDevicehelper_device = nullptr
std::unique_ptr< QPaintEngine, QPaintEngineDestructorengine
std::unique_ptr< QEmulationPaintEngineemulationEngine
QPaintEngineExextended = nullptr
QBrush colorBrush

Static Public Attributes

static constexpr qsizetype NDPtrs = 4

Detailed Description

Definition at line 157 of file qpainter_p.h.

Member Enumeration Documentation

◆ DrawOperation

Enumerator
StrokeDraw 
FillDraw 
StrokeAndFillDraw 

Definition at line 185 of file qpainter_p.h.

Constructor & Destructor Documentation

◆ QPainterPrivate()

QPainterPrivate::QPainterPrivate ( QPainter * painter)
explicit

Definition at line 201 of file qpainter.cpp.

References inDestructor, q_ptr, and txinv.

◆ ~QPainterPrivate()

QPainterPrivate::~QPainterPrivate ( )
default

Member Function Documentation

◆ attachPainterPrivate()

bool QPainterPrivate::attachPainterPrivate ( QPainter * q,
QPaintDevice * pdev )
static

Definition at line 239 of file qpainter.cpp.

◆ checkEmulation()

void QPainterPrivate::checkEmulation ( )

Definition at line 173 of file qpainter.cpp.

References extended.

◆ detachPainterPrivate()

void QPainterPrivate::detachPainterPrivate ( QPainter * q)

Definition at line 291 of file qpainter.cpp.

◆ draw_helper()

void QPainterPrivate::draw_helper ( const QPainterPath & path,
DrawOperation operation = StrokeAndFillDraw )

Definition at line 318 of file qpainter.cpp.

References QPainterPathStroker::QPainterPathStroker(), device, drawOpaqueBackground(), drawStretchedGradient(), extended, helper_device, QPaintEngine::QPainter, and txinv.

Referenced by qt_draw_helper().

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

◆ drawGlyphs()

void QPainterPrivate::drawGlyphs ( const QPointF & decorationPosition,
const quint32 * glyphArray,
QFixedPoint * positionArray,
int glyphCount,
QFontEngine * fontEngine,
bool overline = false,
bool underline = false,
bool strikeOut = false )

Definition at line 5402 of file qpainter.cpp.

References extended.

◆ drawOpaqueBackground()

void QPainterPrivate::drawOpaqueBackground ( const QPainterPath & path,
DrawOperation operation )

Definition at line 474 of file qpainter.cpp.

Referenced by draw_helper().

Here is the caller graph for this function:

◆ drawStretchedGradient()

void QPainterPrivate::drawStretchedGradient ( const QPainterPath & path,
DrawOperation operation )

Definition at line 512 of file qpainter.cpp.

References QPainterPathStroker::QPainterPathStroker(), and helper_device.

Referenced by draw_helper().

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

◆ drawTextItem()

void QPainterPrivate::drawTextItem ( const QPointF & p,
const QTextItem & _ti,
QTextEngine * textEngine )

Definition at line 6190 of file qpainter.cpp.

References extended.

◆ effectiveDevicePixelRatio()

qreal QPainterPrivate::effectiveDevicePixelRatio ( ) const

Definition at line 220 of file qpainter.cpp.

References device.

◆ fakeState()

QPainterDummyState * QPainterPrivate::fakeState ( ) const
inline

Definition at line 190 of file qpainter_p.h.

◆ get()

QPainterPrivate * QPainterPrivate::get ( QPainter * painter)
inlinestatic

Definition at line 217 of file qpainter_p.h.

◆ hidpiScaleTransform()

QTransform QPainterPrivate::hidpiScaleTransform ( ) const

Definition at line 229 of file qpainter.cpp.

◆ initFrom()

void QPainterPrivate::initFrom ( const QPaintDevice * device)

Definition at line 1521 of file qpainter.cpp.

References extended.

◆ updateEmulationSpecifier()

void QPainterPrivate::updateEmulationSpecifier ( QPainterState * s)

Definition at line 656 of file qpainter.cpp.

◆ updateInvMatrix()

void QPainterPrivate::updateInvMatrix ( )

Definition at line 647 of file qpainter.cpp.

References txinv.

◆ updateMatrix()

void QPainterPrivate::updateMatrix ( )

Definition at line 627 of file qpainter.cpp.

References extended, and txinv.

◆ updateState() [1/2]

void QPainterPrivate::updateState ( QPainterState * state)

Definition at line 893 of file qpainter.cpp.

◆ updateState() [2/2]

void QPainterPrivate::updateState ( std::unique_ptr< QPainterState > & state)
inline

Definition at line 199 of file qpainter_p.h.

◆ updateStateImpl()

void QPainterPrivate::updateStateImpl ( QPainterState * state)

Definition at line 861 of file qpainter.cpp.

◆ viewTransform()

QTransform QPainterPrivate::viewTransform ( ) const

Definition at line 209 of file qpainter.cpp.

Member Data Documentation

◆ colorBrush

QBrush QPainterPrivate::colorBrush

Definition at line 244 of file qpainter_p.h.

◆ d_ptrs

QVarLengthArray<std::unique_ptr<QPainterPrivate>, NDPtrs> QPainterPrivate::d_ptrs

Definition at line 169 of file qpainter_p.h.

◆ device

QPaintDevice* QPainterPrivate::device = nullptr

Definition at line 229 of file qpainter_p.h.

Referenced by draw_helper(), effectiveDevicePixelRatio(), and qt_cleanup_painter_state().

◆ dummyState

std::unique_ptr<QPainterDummyState> QPainterPrivate::dummyState
mutable

Definition at line 178 of file qpainter_p.h.

◆ emulationEngine

std::unique_ptr<QEmulationPaintEngine> QPainterPrivate::emulationEngine

Definition at line 242 of file qpainter_p.h.

◆ engine

std::unique_ptr<QPaintEngine, QPaintEngineDestructor> QPainterPrivate::engine

Definition at line 240 of file qpainter_p.h.

◆ extended

QPaintEngineEx* QPainterPrivate::extended = nullptr

◆ helper_device

QPaintDevice* QPainterPrivate::helper_device = nullptr

Definition at line 231 of file qpainter_p.h.

Referenced by draw_helper(), and drawStretchedGradient().

◆ inDestructor

uint QPainterPrivate::inDestructor

Definition at line 182 of file qpainter_p.h.

Referenced by QPainterPrivate().

◆ invMatrix

QTransform QPainterPrivate::invMatrix

Definition at line 180 of file qpainter_p.h.

◆ NDPtrs

qsizetype QPainterPrivate::NDPtrs = 4
staticconstexpr

Definition at line 168 of file qpainter_p.h.

◆ original_device

QPaintDevice* QPainterPrivate::original_device = nullptr

Definition at line 230 of file qpainter_p.h.

◆ q_ptr

QPainter* QPainterPrivate::q_ptr

Definition at line 164 of file qpainter_p.h.

Referenced by QPainterPrivate().

◆ refcount

uint QPainterPrivate::refcount = 1

Definition at line 183 of file qpainter_p.h.

◆ savedStates

SmallStack<std::unique_ptr<QPainterState> > QPainterPrivate::savedStates

Definition at line 176 of file qpainter_p.h.

◆ state

std::unique_ptr<QPainterState> QPainterPrivate::state

Definition at line 171 of file qpainter_p.h.

◆ txinv

uint QPainterPrivate::txinv

Definition at line 181 of file qpainter_p.h.

Referenced by QPainterPrivate(), draw_helper(), updateInvMatrix(), and updateMatrix().


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