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

The QPaintEngineState class provides information about the active paint engine's current state. \reentrant. More...

#include <qpaintengine.h>

+ Inheritance diagram for QPaintEngineState:
+ Collaboration diagram for QPaintEngineState:

Public Member Functions

QPaintEngine::DirtyFlags state () const
 Returns a combination of flags identifying the set of properties that need to be updated when updating the paint engine's state (i.e.
 
QPen pen () const
 Returns the pen in the current paint engine state.
 
QBrush brush () const
 Returns the brush in the current paint engine state.
 
QPointF brushOrigin () const
 Returns the brush origin in the current paint engine state.
 
QBrush backgroundBrush () const
 Returns the background brush in the current paint engine state.
 
Qt::BGMode backgroundMode () const
 Returns the background mode in the current paint engine state.
 
QFont font () const
 Returns the font in the current paint engine state.
 
QTransform transform () const
 
Qt::ClipOperation clipOperation () const
 Returns the clip operation in the current paint engine state.
 
QRegion clipRegion () const
 Returns the clip region in the current paint engine state.
 
QPainterPath clipPath () const
 Returns the clip path in the current paint engine state.
 
bool isClipEnabled () const
 Returns whether clipping is enabled or not in the current paint engine state.
 
QPainter::RenderHints renderHints () const
 Returns the render hints in the current paint engine state.
 
QPainter::CompositionMode compositionMode () const
 Returns the composition mode in the current paint engine state.
 
qreal opacity () const
 
QPainterpainter () const
 Returns a pointer to the painter currently updating the paint engine.
 
bool brushNeedsResolving () const
 
bool penNeedsResolving () const
 

Protected Attributes

QPaintEngine::DirtyFlags dirtyFlags
 

Friends

class QPaintEngine
 
class QRasterPaintEngine
 
class QWidget
 
class QPainter
 
class QPainterPrivate
 
class QMacPrintEnginePrivate
 

Detailed Description

The QPaintEngineState class provides information about the active paint engine's current state. \reentrant.

Since
4.1 \inmodule QtGui

QPaintEngineState records which properties that have changed since the last time the paint engine was updated, as well as their current value.

Which properties that have changed can at any time be retrieved using the state() function. This function returns an instance of the QPaintEngine::DirtyFlags type which stores an OR combination of QPaintEngine::DirtyFlag values. The QPaintEngine::DirtyFlag enum defines whether a property has changed since the last update or not.

If a property is marked with a dirty flag, its current value can be retrieved using the corresponding get function:

\target GetFunction

\table \header

The QPaintEngineState class also provide the painter() function which returns a pointer to the painter that is currently updating the paint engine.

An instance of this class, representing the current state of the active paint engine, is passed as argument to the QPaintEngine::updateState() function. The only situation in which you will have to use this class directly is when implementing your own paint engine.

See also
QPaintEngine

Definition at line 231 of file qpaintengine.h.

Member Function Documentation

◆ backgroundBrush()

QBrush QPaintEngineState::backgroundBrush ( ) const

Returns the background brush in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackground flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7653 of file qpainter.cpp.

Referenced by QPicturePaintEngine::updateState().

+ Here is the caller graph for this function:

◆ backgroundMode()

Qt::BGMode QPaintEngineState::backgroundMode ( ) const

Returns the background mode in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBackgroundMode flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7668 of file qpainter.cpp.

Referenced by QPicturePaintEngine::updateState().

+ Here is the caller graph for this function:

◆ brush()

QBrush QPaintEngineState::brush ( ) const

Returns the brush in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrush flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7625 of file qpainter.cpp.

Referenced by QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), QAlphaPaintEngine::updateState(), QWin32PrintEngine::updateState(), and QSvgPaintEngine::updateState().

+ Here is the caller graph for this function:

◆ brushNeedsResolving()

bool QPaintEngineState::brushNeedsResolving ( ) const
Since
4.3

Returns whether the coordinate of the fill have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

Definition at line 7731 of file qpainter.cpp.

References needsResolving().

Referenced by QPaintEngine::drawRects().

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

◆ brushOrigin()

QPointF QPaintEngineState::brushOrigin ( ) const

Returns the brush origin in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyBrushOrigin flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7639 of file qpainter.cpp.

References brushOrigin().

Referenced by brushOrigin(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), and QX11PaintEngine::updateState().

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

◆ clipOperation()

Qt::ClipOperation QPaintEngineState::clipOperation ( ) const

Returns the clip operation in the current paint engine state.

This variable should only be used when the state() returns a combination which includes either the QPaintEngine::DirtyClipPath or the QPaintEngine::DirtyClipRegion flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7719 of file qpainter.cpp.

References clipOperation().

Referenced by clipOperation(), QSvgPaintEngine::updateClipState(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), and QWin32PrintEngine::updateState().

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

◆ clipPath()

QPainterPath QPaintEngineState::clipPath ( ) const

Returns the clip path in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipPath flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7774 of file qpainter.cpp.

References clipPath().

Referenced by clipPath(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), and QWin32PrintEngine::updateState().

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

◆ clipRegion()

QRegion QPaintEngineState::clipRegion ( ) const

Returns the clip region in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipRegion flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7760 of file qpainter.cpp.

References clipRegion().

Referenced by clipRegion(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), and QWin32PrintEngine::updateState().

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

◆ compositionMode()

QPainter::CompositionMode QPaintEngineState::compositionMode ( ) const

◆ font()

QFont QPaintEngineState::font ( ) const

Returns the font in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyFont flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7683 of file qpainter.cpp.

References font().

Referenced by font(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QX11PaintEngine::updateState(), and QSvgPaintEngine::updateState().

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

◆ isClipEnabled()

bool QPaintEngineState::isClipEnabled ( ) const

Returns whether clipping is enabled or not in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyClipEnabled flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7790 of file qpainter.cpp.

Referenced by QSvgPaintEngine::updateClipState(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), and QWin32PrintEngine::updateState().

+ Here is the caller graph for this function:

◆ opacity()

qreal QPaintEngineState::opacity ( ) const
Since
4.2

Returns the opacity in the current paint engine state.

Definition at line 7843 of file qpainter.cpp.

References opacity().

Referenced by opacity(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), QAlphaPaintEngine::updateState(), and QSvgPaintEngine::updateState().

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

◆ painter()

QPainter * QPaintEngineState::painter ( ) const

Returns a pointer to the painter currently updating the paint engine.

Definition at line 7831 of file qpainter.cpp.

References painter().

Referenced by QAlphaPaintEngine::flushAndInit(), QPaintEngine::painter(), and painter().

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

◆ pen()

QPen QPaintEngineState::pen ( ) const

Returns the pen in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyPen flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7611 of file qpainter.cpp.

References pen().

Referenced by QSvgPaintEngine::drawEllipse(), QPaintEngine::drawLines(), QSvgPaintEngine::drawPath(), QSvgPaintEngine::drawPolygon(), QSvgPaintEngine::drawRects(), QWin32PrintEngine::drawTextItem(), pen(), penNeedsResolving(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), QAlphaPaintEngine::updateState(), QWin32PrintEngine::updateState(), and QSvgPaintEngine::updateState().

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

◆ penNeedsResolving()

bool QPaintEngineState::penNeedsResolving ( ) const
Since
4.3

Returns whether the coordinate of the stroke have been specified as bounded by the current rendering operation and have to be resolved (about the currently rendered primitive).

Definition at line 7745 of file qpainter.cpp.

References QPen::brush(), needsResolving(), and pen().

Referenced by QPaintEngine::drawRects().

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

◆ renderHints()

QPainter::RenderHints QPaintEngineState::renderHints ( ) const

Returns the render hints in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyHints flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7805 of file qpainter.cpp.

References renderHints().

Referenced by QSvgPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawPoints(), QCoreGraphicsPaintEngine::drawTextItem(), renderHints(), QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), and QX11PaintEngine::updateState().

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

◆ state()

◆ transform()

QTransform QPaintEngineState::transform ( ) const
Since
4.3

Returns the matrix in the current paint engine state.

This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag.

See also
state(), QPaintEngine::updateState()

Definition at line 7700 of file qpainter.cpp.

References QPainterState::matrix.

Referenced by QCoreGraphicsPaintEngine::updateState(), QPicturePaintEngine::updateState(), QPdfEngine::updateState(), QX11PaintEngine::updateState(), QAlphaPaintEngine::updateState(), QWin32PrintEngine::updateState(), and QSvgPaintEngine::updateState().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QMacPrintEnginePrivate

friend class QMacPrintEnginePrivate
friend

Definition at line 264 of file qpaintengine.h.

◆ QPaintEngine

friend class QPaintEngine
friend

Definition at line 259 of file qpaintengine.h.

◆ QPainter

friend class QPainter
friend

Definition at line 262 of file qpaintengine.h.

◆ QPainterPrivate

friend class QPainterPrivate
friend

Definition at line 263 of file qpaintengine.h.

◆ QRasterPaintEngine

friend class QRasterPaintEngine
friend

Definition at line 260 of file qpaintengine.h.

◆ QWidget

friend class QWidget
friend

Definition at line 261 of file qpaintengine.h.

Member Data Documentation

◆ dirtyFlags

QPaintEngine::DirtyFlags QPaintEngineState::dirtyFlags
protected

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