Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QWindowsDirect2DPaintEnginePrivate Class Reference
+ Inheritance diagram for QWindowsDirect2DPaintEnginePrivate:
+ Collaboration diagram for QWindowsDirect2DPaintEnginePrivate:

Public Member Functions

 QWindowsDirect2DPaintEnginePrivate (QWindowsDirect2DBitmap *bm, QWindowsDirect2DPaintEngine::Flags flags)
 
ID2D1DeviceContext * dc () const
 
D2D1_INTERPOLATION_MODE interpolationMode () const
 
D2D1_ANTIALIAS_MODE antialiasMode () const
 
D2D1_LAYER_OPTIONS1 layerOptions () const
 
void updateTransform (const QTransform &transform)
 
void updateOpacity (qreal opacity)
 
void pushClip (const QVectorPath &path)
 
void clearClips ()
 
void updateClipEnabled (bool enabled)
 
void clip (const QVectorPath &path, Qt::ClipOperation operation)
 
void updateCompositionMode (QPainter::CompositionMode mode)
 
void updateBrush (const QBrush &newBrush)
 
void updateBrushOrigin (const QPointF &brushOrigin)
 
void negateCurrentBrushOrigin ()
 
void applyBrushOrigin (const QPointF &origin)
 
void updatePen (const QPen &newPen)
 
ComPtr< ID2D1Brush > to_d2d_brush (const QBrush &newBrush, bool *needsEmulation)
 
ComPtr< ID2D1PathGeometry1 > vectorPathToID2D1PathGeometry (const QVectorPath &path)
 
void updateHints ()
 
void drawGlyphRun (const D2D1_POINT_2F &pos, IDWriteFontFace *fontFace, const QFontDef &fontDef, int numGlyphs, const UINT16 *glyphIndices, const FLOAT *glyphAdvances, const DWRITE_GLYPH_OFFSET *glyphOffsets, bool rtl)
 
void stroke (const QVectorPath &path)
 
ComPtr< IDWriteFontFace > fontFaceFromFontEngine (QFontEngine *fe)
 
- Public Member Functions inherited from QPaintEngineExPrivate
 QPaintEngineExPrivate ()
 
 ~QPaintEngineExPrivate ()
 
void replayClipOperations ()
 
bool hasClipOperations () const
 
- 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 ()
 

Public Attributes

QWindowsDirect2DBitmapbitmap
 
QImage fallbackImage
 
unsigned int clipFlags = 0
 
QStack< ClipTypepushedClips
 
QWindowsDirect2DPaintEngine::Flags flags
 
QPointF currentBrushOrigin
 
QHash< QFontDef, ComPtr< IDWriteFontFace > > fontCache
 
struct { 
 
   bool   emulate 
 
   QPen   qpen 
 
   ComPtr< ID2D1Brush >   brush 
 
   ComPtr< ID2D1StrokeStyle1 >   strokeStyle 
 
   ComPtr< ID2D1BitmapBrush1 >   dashBrush 
 
   int   dashLength 
 
pen 
 
struct { 
 
   bool   emulate 
 
   QBrush   qbrush 
 
   ComPtr< ID2D1Brush >   brush 
 
brush 
 
- Public Attributes inherited from QPaintEngineExPrivate
QStroker stroker
 
QDashStroker dasher
 
StrokeHandlerstrokeHandler
 
QStrokerOpsactiveStroker
 
QPen strokerPen
 
QRect exDeviceRect
 
- 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
 

Additional Inherited Members

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

Detailed Description

Definition at line 224 of file qwindowsdirect2dpaintengine.cpp.

Constructor & Destructor Documentation

◆ QWindowsDirect2DPaintEnginePrivate()

QWindowsDirect2DPaintEnginePrivate::QWindowsDirect2DPaintEnginePrivate ( QWindowsDirect2DBitmap bm,
QWindowsDirect2DPaintEngine::Flags  flags 
)
inline

Definition at line 228 of file qwindowsdirect2dpaintengine.cpp.

References dc(), and pen.

+ Here is the call graph for this function:

Member Function Documentation

◆ antialiasMode()

D2D1_ANTIALIAS_MODE QWindowsDirect2DPaintEnginePrivate::antialiasMode ( ) const
inline

Definition at line 292 of file qwindowsdirect2dpaintengine.cpp.

References QPainter::Antialiasing.

Referenced by drawGlyphRun(), pushClip(), updateHints(), and updatePen().

+ Here is the caller graph for this function:

◆ applyBrushOrigin()

void QWindowsDirect2DPaintEnginePrivate::applyBrushOrigin ( const QPointF origin)
inline

Definition at line 449 of file qwindowsdirect2dpaintengine.cpp.

References currentBrushOrigin, QPointF::isNull(), QPointF::x(), and QPointF::y().

Referenced by updateBrush(), and updateBrushOrigin().

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

◆ clearClips()

void QWindowsDirect2DPaintEnginePrivate::clearClips ( )
inline

Definition at line 358 of file qwindowsdirect2dpaintengine.cpp.

References AxisAlignedClip, dc(), QList< T >::isEmpty(), LayerClip, QStack< T >::pop(), and pushedClips.

Referenced by clip(), and updateClipEnabled().

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

◆ clip()

void QWindowsDirect2DPaintEnginePrivate::clip ( const QVectorPath path,
Qt::ClipOperation  operation 
)
inline

Definition at line 380 of file qwindowsdirect2dpaintengine.cpp.

References clearClips(), Qt::IntersectClip, Qt::NoClip, pushClip(), and Qt::ReplaceClip.

+ Here is the call graph for this function:

◆ dc()

ID2D1DeviceContext * QWindowsDirect2DPaintEnginePrivate::dc ( ) const
inline

Definition at line 279 of file qwindowsdirect2dpaintengine.cpp.

References Q_ASSERT.

Referenced by QWindowsDirect2DPaintEnginePrivate(), clearClips(), drawGlyphRun(), pushClip(), stroke(), to_d2d_brush(), updateCompositionMode(), updateHints(), updatePen(), and updateTransform().

+ Here is the caller graph for this function:

◆ drawGlyphRun()

void QWindowsDirect2DPaintEnginePrivate::drawGlyphRun ( const D2D1_POINT_2F &  pos,
IDWriteFontFace *  fontFace,
const QFontDef fontDef,
int  numGlyphs,
const UINT16 *  glyphIndices,
const FLOAT *  glyphAdvances,
const DWRITE_GLYPH_OFFSET *  glyphOffsets,
bool  rtl 
)
inline

Definition at line 868 of file qwindowsdirect2dpaintengine.cpp.

References antialiasMode(), dc(), QFont::NoAntialias, pen, QFontDef::pixelSize, pos, QFontDef::styleStrategy, QPainter::TextAntialiasing, and QWindowsDirect2DPaintEngine::TranslucentTopLevelWindow.

+ Here is the call graph for this function:

◆ fontFaceFromFontEngine()

ComPtr< IDWriteFontFace > QWindowsDirect2DPaintEnginePrivate::fontFaceFromFontEngine ( QFontEngine fe)
inline

◆ interpolationMode()

D2D1_INTERPOLATION_MODE QWindowsDirect2DPaintEnginePrivate::interpolationMode ( ) const
inline

Definition at line 285 of file qwindowsdirect2dpaintengine.cpp.

References QPainter::SmoothPixmapTransform.

Referenced by to_d2d_brush().

+ Here is the caller graph for this function:

◆ layerOptions()

D2D1_LAYER_OPTIONS1 QWindowsDirect2DPaintEnginePrivate::layerOptions ( ) const
inline

Definition at line 299 of file qwindowsdirect2dpaintengine.cpp.

References QWindowsDirect2DPaintEngine::TranslucentTopLevelWindow.

Referenced by pushClip().

+ Here is the caller graph for this function:

◆ negateCurrentBrushOrigin()

void QWindowsDirect2DPaintEnginePrivate::negateCurrentBrushOrigin ( )
inline

Definition at line 437 of file qwindowsdirect2dpaintengine.cpp.

References currentBrushOrigin, QPointF::isNull(), QPointF::x(), and QPointF::y().

Referenced by updateBrushOrigin().

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

◆ pushClip()

void QWindowsDirect2DPaintEnginePrivate::pushClip ( const QVectorPath path)
inline

Definition at line 320 of file qwindowsdirect2dpaintengine.cpp.

References antialiasMode(), AxisAlignedClip, dc(), LayerClip, layerOptions(), QStack< T >::push(), pushedClips, qWarning, rect, QTransform::TxScale, and vectorPathToID2D1PathGeometry().

Referenced by clip().

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

◆ stroke()

◆ to_d2d_brush()

◆ updateBrush()

void QWindowsDirect2DPaintEnginePrivate::updateBrush ( const QBrush newBrush)
inline

Definition at line 415 of file qwindowsdirect2dpaintengine.cpp.

References applyBrushOrigin(), currentBrushOrigin, qbrush_fast_equals(), and to_d2d_brush().

+ Here is the call graph for this function:

◆ updateBrushOrigin()

void QWindowsDirect2DPaintEnginePrivate::updateBrushOrigin ( const QPointF brushOrigin)
inline

Definition at line 431 of file qwindowsdirect2dpaintengine.cpp.

References applyBrushOrigin(), and negateCurrentBrushOrigin().

+ Here is the call graph for this function:

◆ updateClipEnabled()

void QWindowsDirect2DPaintEnginePrivate::updateClipEnabled ( bool  enabled)
inline

Definition at line 372 of file qwindowsdirect2dpaintengine.cpp.

References clearClips(), QList< T >::isEmpty(), pushedClips, and QPaintEngineExPrivate::replayClipOperations().

+ Here is the call graph for this function:

◆ updateCompositionMode()

void QWindowsDirect2DPaintEnginePrivate::updateCompositionMode ( QPainter::CompositionMode  mode)
inline

Definition at line 396 of file qwindowsdirect2dpaintengine.cpp.

References QPainter::CompositionMode_Source, QPainter::CompositionMode_SourceOver, dc(), and QWindowsDirect2DPaintEngine::EmulateComposition.

+ Here is the call graph for this function:

◆ updateHints()

void QWindowsDirect2DPaintEnginePrivate::updateHints ( )
inline

Definition at line 863 of file qwindowsdirect2dpaintengine.cpp.

References antialiasMode(), and dc().

+ Here is the call graph for this function:

◆ updateOpacity()

void QWindowsDirect2DPaintEnginePrivate::updateOpacity ( qreal  opacity)
inline

Definition at line 312 of file qwindowsdirect2dpaintengine.cpp.

References pen.

◆ updatePen()

◆ updateTransform()

void QWindowsDirect2DPaintEnginePrivate::updateTransform ( const QTransform transform)
inline

Definition at line 307 of file qwindowsdirect2dpaintengine.cpp.

References dc(), and to_d2d_matrix_3x2_f().

+ Here is the call graph for this function:

◆ vectorPathToID2D1PathGeometry()

ComPtr< ID2D1PathGeometry1 > QWindowsDirect2DPaintEnginePrivate::vectorPathToID2D1PathGeometry ( const QVectorPath path)
inline

Member Data Documentation

◆ bitmap

QWindowsDirect2DBitmap* QWindowsDirect2DPaintEnginePrivate::bitmap

Definition at line 238 of file qwindowsdirect2dpaintengine.cpp.

Referenced by to_d2d_brush(), and updatePen().

◆ brush [1/2]

ComPtr<ID2D1Brush> QWindowsDirect2DPaintEnginePrivate::brush

Definition at line 252 of file qwindowsdirect2dpaintengine.cpp.

◆ [struct] [2/2]

struct { ... } QWindowsDirect2DPaintEnginePrivate::brush

◆ clipFlags

unsigned int QWindowsDirect2DPaintEnginePrivate::clipFlags = 0

Definition at line 241 of file qwindowsdirect2dpaintengine.cpp.

◆ currentBrushOrigin

QPointF QWindowsDirect2DPaintEnginePrivate::currentBrushOrigin

◆ dashBrush

ComPtr<ID2D1BitmapBrush1> QWindowsDirect2DPaintEnginePrivate::dashBrush

Definition at line 254 of file qwindowsdirect2dpaintengine.cpp.

◆ dashLength

int QWindowsDirect2DPaintEnginePrivate::dashLength

Definition at line 255 of file qwindowsdirect2dpaintengine.cpp.

◆ emulate

bool QWindowsDirect2DPaintEnginePrivate::emulate

Definition at line 250 of file qwindowsdirect2dpaintengine.cpp.

◆ fallbackImage

QImage QWindowsDirect2DPaintEnginePrivate::fallbackImage

Definition at line 239 of file qwindowsdirect2dpaintengine.cpp.

◆ flags

QWindowsDirect2DPaintEngine::Flags QWindowsDirect2DPaintEnginePrivate::flags

Definition at line 243 of file qwindowsdirect2dpaintengine.cpp.

◆ fontCache

QHash< QFontDef, ComPtr<IDWriteFontFace> > QWindowsDirect2DPaintEnginePrivate::fontCache

Definition at line 247 of file qwindowsdirect2dpaintengine.cpp.

Referenced by fontFaceFromFontEngine().

◆ [struct]

struct { ... } QWindowsDirect2DPaintEnginePrivate::pen

◆ pushedClips

QStack<ClipType> QWindowsDirect2DPaintEnginePrivate::pushedClips

Definition at line 242 of file qwindowsdirect2dpaintengine.cpp.

Referenced by clearClips(), pushClip(), and updateClipEnabled().

◆ qbrush

QBrush QWindowsDirect2DPaintEnginePrivate::qbrush

Definition at line 269 of file qwindowsdirect2dpaintengine.cpp.

◆ qpen

QPen QWindowsDirect2DPaintEnginePrivate::qpen

Definition at line 251 of file qwindowsdirect2dpaintengine.cpp.

◆ strokeStyle

ComPtr<ID2D1StrokeStyle1> QWindowsDirect2DPaintEnginePrivate::strokeStyle

Definition at line 253 of file qwindowsdirect2dpaintengine.cpp.


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