#[repr(C)]
pub struct QPaintEngineState { /* private fields */ }
Expand description

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

C++ class: QPaintEngineState.

C++ documentation:

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.

Implementations§

source§

impl QPaintEngineState

source

pub unsafe fn background_brush(&self) -> CppBox<QBrush>

Returns the background brush in the current paint engine state.

Calls C++ function: QBrush QPaintEngineState::backgroundBrush() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn background_mode(&self) -> BGMode

Returns the background mode in the current paint engine state.

Calls C++ function: Qt::BGMode QPaintEngineState::backgroundMode() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn brush(&self) -> CppBox<QBrush>

Returns the brush in the current paint engine state.

Calls C++ function: QBrush QPaintEngineState::brush() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe 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).

Calls C++ function: bool QPaintEngineState::brushNeedsResolving() const.

C++ documentation:

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).

This function was introduced in Qt 4.3.

source

pub unsafe fn brush_origin(&self) -> CppBox<QPointF>

Returns the brush origin in the current paint engine state.

Calls C++ function: QPointF QPaintEngineState::brushOrigin() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn clip_operation(&self) -> ClipOperation

Returns the clip operation in the current paint engine state.

Calls C++ function: Qt::ClipOperation QPaintEngineState::clipOperation() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn clip_path(&self) -> CppBox<QPainterPath>

Returns the clip path in the current paint engine state.

Calls C++ function: QPainterPath QPaintEngineState::clipPath() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn clip_region(&self) -> CppBox<QRegion>

Returns the clip region in the current paint engine state.

Calls C++ function: QRegion QPaintEngineState::clipRegion() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn composition_mode(&self) -> CompositionMode

Returns the composition mode in the current paint engine state.

Calls C++ function: QPainter::CompositionMode QPaintEngineState::compositionMode() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QPaintEngineState>> ) -> Ref<QPaintEngineState>

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

Calls C++ function: QPaintEngineState& QPaintEngineState::operator=(const QPaintEngineState& other).

C++ documentation:

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.

source

pub unsafe fn font(&self) -> CppBox<QFont>

Returns the font in the current paint engine state.

Calls C++ function: QFont QPaintEngineState::font() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn is_clip_enabled(&self) -> bool

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

Calls C++ function: bool QPaintEngineState::isClipEnabled() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn matrix(&self) -> CppBox<QMatrix>

Returns the matrix in the current paint engine state.

Calls C++ function: QMatrix QPaintEngineState::matrix() const.

C++ documentation:

Returns the matrix in the current paint engine state.

Note: It is advisable to use transform() instead of this function to preserve the properties of perspective transformations.

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

This function was introduced in Qt 4.2.

See also state() and QPaintEngine::updateState().

source

pub unsafe fn new() -> CppBox<QPaintEngineState>

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

Calls C++ function: [constructor] void QPaintEngineState::QPaintEngineState().

C++ documentation:

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.

source

pub unsafe fn new_copy( other: impl CastInto<Ref<QPaintEngineState>> ) -> CppBox<QPaintEngineState>

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

Calls C++ function: [constructor] void QPaintEngineState::QPaintEngineState(const QPaintEngineState& other).

C++ documentation:

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.

source

pub unsafe fn opacity(&self) -> c_double

Returns the opacity in the current paint engine state.

Calls C++ function: double QPaintEngineState::opacity() const.

C++ documentation:

Returns the opacity in the current paint engine state.

This function was introduced in Qt 4.2.

source

pub unsafe fn painter(&self) -> Ptr<QPainter>

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

Calls C++ function: QPainter* QPaintEngineState::painter() const.

C++ documentation:

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

source

pub unsafe fn pen(&self) -> CppBox<QPen>

Returns the pen in the current paint engine state.

Calls C++ function: QPen QPaintEngineState::pen() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe 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).

Calls C++ function: bool QPaintEngineState::penNeedsResolving() const.

C++ documentation:

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).

This function was introduced in Qt 4.3.

source

pub unsafe fn render_hints(&self) -> QFlags<RenderHint>

Returns the render hints in the current paint engine state.

Calls C++ function: QFlags<QPainter::RenderHint> QPaintEngineState::renderHints() const.

C++ documentation:

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() and QPaintEngine::updateState().

source

pub unsafe fn state(&self) -> QFlags<DirtyFlag>

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).

Calls C++ function: QFlags<QPaintEngine::DirtyFlag> QPaintEngineState::state() const.

C++ documentation:

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().

source

pub unsafe fn transform(&self) -> CppBox<QTransform>

Returns the matrix in the current paint engine state.

Calls C++ function: QTransform QPaintEngineState::transform() const.

C++ documentation:

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.

This function was introduced in Qt 4.3.

See also state() and QPaintEngine::updateState().

Trait Implementations§

source§

impl CppDeletable for QPaintEngineState

source§

unsafe fn delete(&self)

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

Calls C++ function: [destructor] void QPaintEngineState::~QPaintEngineState().

C++ documentation:

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.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.