QPaintEngineState Class
The QPaintEngineState class describes the state a QPainter hands to its paint engine. More…
| Header | #include <QPaintEngineState> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Gui) |
| Module | Nt GUI C++ Classes |
List of all members, including inherited members
Public Functions
| QPen | pen() const |
| QBrush | brush() const |
| QRegion | clipRegion() const |
| bool | hasClipping() const |
| qreal | opacity() const |
| QPainter::CompositionMode | compositionMode() const |
| QTransform | transform() const |
| QPainter::RenderHints | renderHints() const |
Detailed Description
The painter fills in the state and passes it to QPaintEngine::updateState() before it draws. The state is read-only for the engine, and the clip region is already in device coordinates.
See also QPaintEngine and QPainter.
Differences from Qt
There are no dirty flags: an engine receives the whole state each time. There is no font or background state.
Member Function Documentation
QBrush QPaintEngineState::brush() const
Returns the brush.
QRegion QPaintEngineState::clipRegion() const
Returns the clip region in device coordinates. It only applies when hasClipping() is true.
QPainter::CompositionMode QPaintEngineState::compositionMode() const
Returns the composition mode.
bool QPaintEngineState::hasClipping() const
Returns true if drawing is clipped to clipRegion().
qreal QPaintEngineState::opacity() const
Returns the opacity, from 0.0 to 1.0.
QPen QPaintEngineState::pen() const
Returns the pen.
QPainter::RenderHints QPaintEngineState::renderHints() const
Returns the render hints of the painter.
QTransform QPaintEngineState::transform() const
Returns the transformation from the coordinates of paths given to QPaintEngine::drawPath() to device pixels. The other drawing functions receive device coordinates.