pub struct PaintEngineFeature(/* private fields */);
Expand description

This enum is used to describe the features or capabilities that the paint engine has. If a feature is not supported by the engine, QPainter will do a best effort to emulate that feature through other means and pass on an alpha blended QImage to the engine with the emulated results. Some features cannot be emulated: AlphaBlend and PorterDuff.

C++ enum: QPaintEngine::PaintEngineFeature.

C++ documentation:

This enum is used to describe the features or capabilities that the paint engine has. If a feature is not supported by the engine, QPainter will do a best effort to emulate that feature through other means and pass on an alpha blended QImage to the engine with the emulated results. Some features cannot be emulated: AlphaBlend and PorterDuff.

The PaintEngineFeatures type is a typedef for QFlags<PaintEngineFeature>. It stores an OR combination of PaintEngineFeature values.

Implementations§

source§

impl PaintEngineFeature

source

pub fn to_int(&self) -> c_int

source§

impl PaintEngineFeature

source

pub const PrimitiveTransform: PaintEngineFeature = _

The engine has support for transforming drawing primitives. (C++ enum variant: PrimitiveTransform = 1)

source

pub const PatternTransform: PaintEngineFeature = _

The engine has support for transforming brush patterns. (C++ enum variant: PatternTransform = 2)

source

pub const PixmapTransform: PaintEngineFeature = _

The engine can transform pixmaps, including rotation and shearing. (C++ enum variant: PixmapTransform = 4)

source

pub const PatternBrush: PaintEngineFeature = _

The engine is capable of rendering brushes with the brush patterns specified in Qt::BrushStyle. (C++ enum variant: PatternBrush = 8)

source

pub const LinearGradientFill: PaintEngineFeature = _

The engine supports linear gradient fills. (C++ enum variant: LinearGradientFill = 16)

source

pub const RadialGradientFill: PaintEngineFeature = _

The engine supports radial gradient fills. (C++ enum variant: RadialGradientFill = 32)

source

pub const ConicalGradientFill: PaintEngineFeature = _

The engine supports conical gradient fills. (C++ enum variant: ConicalGradientFill = 64)

source

pub const AlphaBlend: PaintEngineFeature = _

The engine can alpha blend primitives. (C++ enum variant: AlphaBlend = 128)

source

pub const PorterDuff: PaintEngineFeature = _

The engine supports Porter-Duff operations (C++ enum variant: PorterDuff = 256)

source

pub const PainterPaths: PaintEngineFeature = _

The engine has path support. (C++ enum variant: PainterPaths = 512)

source

pub const Antialiasing: PaintEngineFeature = _

The engine can use antialising to improve the appearance of rendered primitives. (C++ enum variant: Antialiasing = 1024)

source

pub const BrushStroke: PaintEngineFeature = _

The engine supports drawing strokes that contain brushes as fills, not just solid colors (e.g. a dashed gradient line of width 2). (C++ enum variant: BrushStroke = 2048)

source

pub const ConstantOpacity: PaintEngineFeature = _

The engine supports the feature provided by QPainter::setOpacity(). (C++ enum variant: ConstantOpacity = 4096)

source

pub const MaskedBrush: PaintEngineFeature = _

The engine is capable of rendering brushes that has a texture with an alpha channel or a mask. (C++ enum variant: MaskedBrush = 8192)

source

pub const PerspectiveTransform: PaintEngineFeature = _

The engine has support for performing perspective transformations on primitives. (C++ enum variant: PerspectiveTransform = 16384)

source

pub const BlendModes: PaintEngineFeature = _

The engine supports blending modes. (C++ enum variant: BlendModes = 32768)

source

pub const ObjectBoundingModeGradients: PaintEngineFeature = _

The engine has native support for gradients with coordinate mode QGradient::ObjectBoundingMode. Otherwise, if QPaintEngine::PatternTransform is supported, object bounding mode gradients are converted to gradients with coordinate mode QGradient::LogicalMode and a brush transform for the coordinate mapping. (C++ enum variant: ObjectBoundingModeGradients = 65536)

source

pub const RasterOpModes: PaintEngineFeature = _

The engine supports bitwise raster operations. (C++ enum variant: RasterOpModes = 131072)

source

pub const PaintOutsidePaintEvent: PaintEngineFeature = _

The engine is capable of painting outside of paint events. (C++ enum variant: PaintOutsidePaintEvent = 536870912)

source

pub const AllFeatures: PaintEngineFeature = _

All of the above features. This enum value is usually used as a bit mask. (C++ enum variant: AllFeatures = -1)

Trait Implementations§

source§

impl<T: Into<QFlags<PaintEngineFeature>>> BitOr<T> for PaintEngineFeature

§

type Output = QFlags<PaintEngineFeature>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: T) -> QFlags<PaintEngineFeature>

Performs the | operation. Read more
source§

impl Clone for PaintEngineFeature

source§

fn clone(&self) -> PaintEngineFeature

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PaintEngineFeature

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<PaintEngineFeature> for QFlags<PaintEngineFeature>

source§

fn from(value: PaintEngineFeature) -> Self

Converts to this type from the input type.
source§

impl From<PaintEngineFeature> for c_int

source§

fn from(value: PaintEngineFeature) -> Self

Converts to this type from the input type.
source§

impl From<i32> for PaintEngineFeature

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PaintEngineFeature

source§

fn eq(&self, other: &PaintEngineFeature) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for PaintEngineFeature

source§

impl Eq for PaintEngineFeature

source§

impl StructuralEq for PaintEngineFeature

source§

impl StructuralPartialEq for PaintEngineFeature

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.