Qt 4.8
|
The QPaintEngineState class provides information about the active paint engine's current state. More...
#include <qpaintengine.h>
Public Functions | |
QBrush | backgroundBrush () const |
Returns the background brush in the current paint engine state. More... | |
Qt::BGMode | backgroundMode () const |
Returns the background mode in the current paint engine state. More... | |
QBrush | brush () const |
Returns the brush in the current paint engine state. More... | |
bool | brushNeedsResolving () const |
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). More... | |
QPointF | brushOrigin () const |
Returns the brush origin in the current paint engine state. More... | |
Qt::ClipOperation | clipOperation () const |
Returns the clip operation in the current paint engine state. More... | |
QPainterPath | clipPath () const |
Returns the clip path in the current paint engine state. More... | |
QRegion | clipRegion () const |
Returns the clip region in the current paint engine state. More... | |
QPainter::CompositionMode | compositionMode () const |
Returns the composition mode in the current paint engine state. More... | |
QFont | font () const |
Returns the font in the current paint engine state. More... | |
bool | isClipEnabled () const |
Returns whether clipping is enabled or not in the current paint engine state. More... | |
QMatrix | matrix () const |
Returns the matrix in the current paint engine state. More... | |
qreal | opacity () const |
Returns the opacity in the current paint engine state. More... | |
QPainter * | painter () const |
Returns a pointer to the painter currently updating the paint engine. More... | |
QPen | pen () const |
Returns the pen in the current paint engine state. More... | |
bool | penNeedsResolving () const |
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). More... | |
QPainter::RenderHints | renderHints () const |
Returns the render hints in the current paint engine state. More... | |
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. More... | |
QTransform | transform () const |
Returns the matrix in the current paint engine state. More... | |
Protected Variables | |
QPaintEngine::DirtyFlags | dirtyFlags |
Friends | |
class | QMacPrintEnginePrivate |
class | QPaintEngine |
class | QPainter |
class | QPainterPrivate |
class | QRasterPaintEngine |
class | QWidget |
The QPaintEngineState class provides information about the active paint engine's current state.
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:
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.
Definition at line 289 of file qpaintengine.h.
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.
Definition at line 9301 of file qpainter.cpp.
Referenced by QPicturePaintEngine::updateState().
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.
Definition at line 9316 of file qpainter.cpp.
Referenced by QPicturePaintEngine::updateState().
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.
Definition at line 9273 of file qpainter.cpp.
Referenced by QRasterPaintEngine::fill(), QRasterPaintEngine::fillRect(), QGL2PaintEngineExPrivate::fillStencilWithVertexArray(), QRasterPaintEngine::state(), QRasterPaintEngine::updateBrush(), QAlphaPaintEngine::updateState(), QPicturePaintEngine::updateState(), QWin32PrintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), QSvgPaintEngine::updateState(), and QPdfBaseEngine::updateState().
bool QPaintEngineState::brushNeedsResolving | ( | ) | const |
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 9411 of file qpainter.cpp.
Referenced by QPaintEngine::drawRects().
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.
Definition at line 9287 of file qpainter.cpp.
Referenced by QPainterState::init(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
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.
Definition at line 9396 of file qpainter.cpp.
Referenced by QPainterState::init(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QWin32PrintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
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.
Definition at line 9457 of file qpainter.cpp.
Referenced by QPainterState::init(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QWin32PrintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
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.
Definition at line 9443 of file qpainter.cpp.
Referenced by QPainterState::init(), QClipData::initialize(), QOpenGLPaintEngineState::QOpenGLPaintEngineState(), QRasterPaintEngine::setClipRectInDeviceCoords(), QClipData::setClipRegion(), QPicturePaintEngine::updateState(), QWin32PrintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
QPainter::CompositionMode QPaintEngineState::compositionMode | ( | ) | const |
Returns the composition mode in the current paint engine state.
This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyCompositionMode flag.
Definition at line 9503 of file qpainter.cpp.
Referenced by QCoreGraphicsPaintEngine::drawEllipse(), QCoreGraphicsPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawLines(), QCoreGraphicsPaintEngine::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPoints(), QCoreGraphicsPaintEngine::drawPolygon(), QCoreGraphicsPaintEngine::drawRects(), QCoreGraphicsPaintEngine::drawTextItem(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QRasterBuffer::init(), QDirectFBPaintEngine::setState(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), and QOpenGLPaintEngine::updateState().
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.
Definition at line 9331 of file qpainter.cpp.
Referenced by QPainterState::init(), QOpenGLPaintEngine::state(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QSvgPaintEngine::updateState().
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.
Definition at line 9473 of file qpainter.cpp.
Referenced by QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QWin32PrintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
QMatrix QPaintEngineState::matrix | ( | ) | const |
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.
Definition at line 9355 of file qpainter.cpp.
Referenced by QRasterPaintEngine::drawCachedGlyphs(), QRasterPaintEngine::drawTextItem(), QPainterState::init(), QSpanData::setupMatrix(), QPainter::setWorldTransform(), QOpenGLPaintEngine::state(), QRasterPaintEngine::state(), QRasterPaintEngine::updateOutlineMapper(), and QSvgPaintEngine::updateState().
qreal QPaintEngineState::opacity | ( | ) | const |
Returns the opacity in the current paint engine state.
Definition at line 9529 of file qpainter.cpp.
Referenced by QGradientCache::addCacheElement(), QPainter::drawPixmapFragments(), QGradientCache::generateGradientColorTable(), QPainterState::init(), QGradientCache::maxCacheSize(), QAlphaPaintEngine::updateState(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), QSvgPaintEngine::updateState(), and QPdfBaseEngine::updateState().
QPainter * QPaintEngineState::painter | ( | ) | const |
Returns a pointer to the painter currently updating the paint engine.
Definition at line 9514 of file qpainter.cpp.
Referenced by QRasterPaintEngine::drawCachedGlyphs(), QPainterState::init(), QPaintEngine::painter(), and QPainterPrivate::updateStateImpl().
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.
Definition at line 9259 of file qpainter.cpp.
Referenced by QPaintEngine::drawLines(), QWin32PrintEngine::drawTextItem(), QPaintEngine::drawTextItem(), QStaticTextPrivate::get(), QPainterState::init(), penNeedsResolving(), QGL2PaintEngineExPrivate::QGL2PaintEngineExPrivate(), QRasterPaintEnginePrivate::rasterizeLine_dashed(), QOpenGLPaintEngine::state(), QRasterPaintEngine::state(), QRasterPaintEngine::updatePen(), QAlphaPaintEngine::updateState(), QPicturePaintEngine::updateState(), QWin32PrintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), QSvgPaintEngine::updateState(), and QPdfBaseEngine::updateState().
bool QPaintEngineState::penNeedsResolving | ( | ) | const |
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 9428 of file qpainter.cpp.
Referenced by QPaintEngine::drawRects().
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.
Definition at line 9488 of file qpainter.cpp.
Referenced by QCoreGraphicsPaintEngine::drawPoints(), QCoreGraphicsPaintEngine::drawTextItem(), QPainterState::init(), QPicturePaintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), and QOpenGLPaintEngine::updateState().
|
inline |
Returns a combination of flags identifying the set of properties that need to be updated when updating the paint engine's state (i.
e. during a call to the QPaintEngine::updateState() function).
\sa QPaintEngine::updateState()
Definition at line 292 of file qpaintengine.h.
Referenced by QRasterPaintEngine::alphaPenBlt(), QRasterPaintEngine::brushChanged(), QRasterPaintEnginePrivate::brushMatrix(), QRasterPaintEngine::brushOriginChanged(), QRasterPaintEnginePrivate::canUseFastImageBlending(), QRasterPaintEngine::clip(), QRasterPaintEngine::clipEnabledChanged(), QRasterPaintEngine::compositionModeChanged(), QGL2PaintEngineExPrivate::drawCachedGlyphs(), QRasterPaintEngine::drawCachedGlyphs(), QRasterPaintEngine::drawEllipse(), QRasterPaintEngine::drawImage(), QRasterPaintEngine::drawLines(), QRasterPaintEngine::drawPixmap(), QRasterPaintEngine::drawPoints(), QRasterPaintEngine::drawPolygon(), QRasterPaintEngine::drawRects(), QRasterPaintEngine::drawTextItem(), QRasterPaintEngine::drawTiledPixmap(), QRasterPaintEngine::ensureBrush(), QRasterPaintEngine::ensurePen(), QRasterPaintEngine::ensureState(), QRasterPaintEngine::fill(), QRasterPaintEngine::fillPath(), QRasterPaintEngine::fillPolygon(), QRasterPaintEngine::fillRect(), QStaticTextPrivate::get(), QRasterPaintEnginePrivate::getPenFunc(), QRasterPaintEnginePrivate::initializeRasterizer(), QRasterPaintEnginePrivate::isUnclipped(), QRasterPaintEngine::opacityChanged(), QRasterPaintEngine::penChanged(), QRasterPaintEnginePrivate::rasterize(), QRasterPaintEnginePrivate::rasterizeLine_dashed(), QRasterPaintEnginePrivate::recalculateFastImages(), QRasterPaintEngine::renderHintsChanged(), QRasterPaintEngine::setClipRectInDeviceCoords(), QOpenGLPaintEngine::state(), QRasterPaintEngine::stroke(), QGL2PaintEngineExPrivate::stroke(), QRasterPaintEngine::supportsTransformations(), QRasterPaintEngine::transformChanged(), QRasterPaintEngine::updateBrush(), QPainterPrivate::updateEmulationSpecifier(), QRasterPaintEngine::updateOutlineMapper(), QRasterPaintEngine::updatePen(), QAlphaPaintEngine::updateState(), QPicturePaintEngine::updateState(), QWin32PrintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), QSvgPaintEngine::updateState(), QPdfBaseEngine::updateState(), QPainterPrivate::updateState(), and QRasterPaintEngine::updateState().
QTransform QPaintEngineState::transform | ( | ) | const |
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.
Definition at line 9377 of file qpainter.cpp.
Referenced by QProxyFontEngine::canRender(), QVGPaintEngine::clipEnabledChanged(), QFontEngineQPF::draw(), QFontEngineQPF1::draw(), QPainter::drawPixmapFragments(), QDirectFBPaintEngine::setState(), QGL2PaintEngineEx::stroke(), QVGPaintEngine::transformChanged(), QAlphaPaintEngine::updateState(), QPicturePaintEngine::updateState(), QWin32PrintEngine::updateState(), QCoreGraphicsPaintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
|
friend |
Definition at line 323 of file qpaintengine.h.
|
friend |
Definition at line 318 of file qpaintengine.h.
Definition at line 321 of file qpaintengine.h.
|
friend |
Definition at line 322 of file qpaintengine.h.
|
friend |
Definition at line 319 of file qpaintengine.h.
Referenced by QRasterPaintEngine::type().
Definition at line 320 of file qpaintengine.h.
|
protected |
Definition at line 325 of file qpaintengine.h.
Referenced by QPainterPrivate::draw_helper(), QPainterState::init(), QMacPrintEnginePrivate::newPage_helper(), QPainterState::QPainterState(), QPainter::restore(), QPainterPrivate::updateMatrix(), QPainterPrivate::updateState(), and QPainterPrivate::updateStateImpl().