[][src]Struct qt_widgets::q_graphics_item::CacheMode

#[repr(transparent)]pub struct CacheMode(_);

This enum describes QGraphicsItem's cache modes. Caching is used to speed up rendering by allocating and rendering to an off-screen pixel buffer, which can be reused when the item requires redrawing. For some paint devices, the cache is stored directly in graphics memory, which makes rendering very quick.

C++ enum: QGraphicsItem::CacheMode.

C++ documentation:

This enum describes QGraphicsItem's cache modes. Caching is used to speed up rendering by allocating and rendering to an off-screen pixel buffer, which can be reused when the item requires redrawing. For some paint devices, the cache is stored directly in graphics memory, which makes rendering very quick.

This enum was introduced or modified in Qt 4.4.

See also QGraphicsItem::setCacheMode().

Methods

impl CacheMode[src]

pub fn to_int(&self) -> c_int[src]

impl CacheMode[src]

pub const NoCache: CacheMode[src]

The default; all item caching is disabled. QGraphicsItem::paint() is called every time the item needs redrawing. (C++ enum variant: NoCache = 0)

pub const ItemCoordinateCache: CacheMode[src]

Caching is enabled for the item's logical (local) coordinate system. QGraphicsItem creates an off-screen pixel buffer with a configurable size / resolution that you can pass to QGraphicsItem::setCacheMode(). Rendering quality will typically degrade, depending on the resolution of the cache and the item transformation. The first time the item is redrawn, it will render itself into the cache, and the cache is then reused for every subsequent expose. The cache is also reused as the item is transformed. To adjust the resolution of the cache, you can call setCacheMode() again. (C++ enum variant: ItemCoordinateCache = 1)

pub const DeviceCoordinateCache: CacheMode[src]

Caching is enabled at the paint device level, in device coordinates. This mode is for items that can move, but are not rotated, scaled or sheared. If the item is transformed directly or indirectly, the cache will be regenerated automatically. Unlike ItemCoordinateCacheMode, DeviceCoordinateCache always renders at maximum quality. (C++ enum variant: DeviceCoordinateCache = 2)

Trait Implementations

impl Clone for CacheMode[src]

impl Copy for CacheMode[src]

impl Debug for CacheMode[src]

impl Eq for CacheMode[src]

impl From<CacheMode> for c_int[src]

impl From<i32> for CacheMode[src]

impl PartialEq<CacheMode> for CacheMode[src]

impl StructuralEq for CacheMode[src]

impl StructuralPartialEq for CacheMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.