Struct rute::auto::paint_engine_state::PaintEngineState
source · pub struct PaintEngineState<'a> { /* private fields */ }
Expand description
Notice these docs are heavy WIP and not very relevent yet
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:
- Property Flag
- Current Property Value
- QPaintEngine::DirtyBackground
- backgroundBrush()
- QPaintEngine::DirtyBackgroundMode
- backgroundMode()
- QPaintEngine::DirtyBrush
- brush()
- QPaintEngine::DirtyBrushOrigin
- brushOrigin()
- QPaintEngine::DirtyClipRegion or QPaintEngine::DirtyClipPath
- clipOperation()
- QPaintEngine::DirtyClipPath
- clipPath()
- QPaintEngine::DirtyClipRegion
- clipRegion()
- QPaintEngine::DirtyCompositionMode
- compositionMode()
- QPaintEngine::DirtyFont
- font()
- QPaintEngine::DirtyTransform
- transform()
- QPaintEngine::DirtyClipEnabled
- isClipEnabled()
- QPaintEngine::DirtyPen
- pen()
- QPaintEngine::DirtyHints
- renderHints()
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
Licence
The documentation is an adoption of the original Qt Documentation and provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Implementations
sourceimpl<'a> PaintEngineState<'a>
impl<'a> PaintEngineState<'a>
pub fn new() -> PaintEngineState<'a>
sourcepub fn state(&self) -> DirtyFlags
pub fn state(&self) -> DirtyFlags
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).
See also: QPaintEngine::updateState()
sourcepub fn pen(&self) -> Pen<'_>
pub fn pen(&self) -> Pen<'_>
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()
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).
sourcepub fn brush(&self) -> Brush<'_>
pub fn brush(&self) -> Brush<'_>
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()
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()
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).
sourcepub fn brush_origin(&self) -> PointF<'_>
pub fn brush_origin(&self) -> PointF<'_>
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()
sourcepub fn background_brush(&self) -> Brush<'_>
pub fn background_brush(&self) -> Brush<'_>
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()
sourcepub fn background_mode(&self) -> BGMode
pub fn background_mode(&self) -> BGMode
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()
sourcepub fn font(&self) -> Font<'_>
pub fn font(&self) -> Font<'_>
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()
sourcepub fn clip_operation(&self) -> ClipOperation
pub fn clip_operation(&self) -> ClipOperation
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()
sourcepub fn clip_region(&self) -> Region<'_>
pub fn clip_region(&self) -> Region<'_>
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()
sourcepub fn is_clip_enabled(&self) -> bool
pub fn is_clip_enabled(&self) -> bool
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()
sourcepub fn render_hints(&self) -> RenderHints
pub fn render_hints(&self) -> RenderHints
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()
sourcepub fn composition_mode(&self) -> CompositionMode
pub fn composition_mode(&self) -> CompositionMode
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.
See also: state() QPaintEngine::updateState()
sourcepub fn painter(&self) -> Option<Painter<'_>>
pub fn painter(&self) -> Option<Painter<'_>>
Returns a pointer to the painter currently updating the paint engine.
sourcepub fn brush_needs_resolving(&self) -> bool
pub fn brush_needs_resolving(&self) -> bool
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).
sourcepub fn pen_needs_resolving(&self) -> bool
pub fn pen_needs_resolving(&self) -> bool
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).
pub fn build(&self) -> Self
Trait Implementations
sourceimpl<'a> Clone for PaintEngineState<'a>
impl<'a> Clone for PaintEngineState<'a>
sourcefn clone(&self) -> PaintEngineState<'a>
fn clone(&self) -> PaintEngineState<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more