#[repr(C)]
pub struct SaveLayerRec<'a> { /* private fields */ }
Expand description

SaveLayerRec contains the state used to create the layer.

Implementations§

source§

impl<'a> SaveLayerRec<'a>

source

pub fn bounds(self, bounds: &'a Rect) -> Self

Hints at layer size limit

source

pub fn paint(self, paint: &'a Paint) -> Self

Modifies overlay

source

pub fn backdrop(self, backdrop: &'a ImageFilter) -> Self

If not None, this triggers the same initialization behavior as setting SaveLayerFlags::INIT_WITH_PREVIOUS on Self::flags: the current layer is copied into the new layer, rather than initializing the new layer with transparent-black. This is then filtered by Self::backdrop (respecting the current clip).

source

pub fn clip_mask(self, _clip_mask: &'a Image) -> Self

👎Deprecated since 0.33.0: removed without replacement, does not set clip_mask
source

pub fn clip_matrix(self, _clip_matrix: &'a Matrix) -> Self

👎Deprecated since 0.33.0: removed without replacement, does not set clip_matrix
source

pub fn flags(self, flags: SaveLayerFlags) -> Self

Preserves LCD text, creates with prior layer contents

Trait Implementations§

source§

impl Debug for SaveLayerRec<'_>

source§

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

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

impl<'a> Default for SaveLayerRec<'a>

source§

fn default() -> Self

Sets Self::bounds, Self::paint, and Self::backdrop to None. Clears Self::flags.

Returns empty SaveLayerRec

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for SaveLayerRec<'a>

§

impl<'a> !Send for SaveLayerRec<'a>

§

impl<'a> !Sync for SaveLayerRec<'a>

§

impl<'a> Unpin for SaveLayerRec<'a>

§

impl<'a> !UnwindSafe for SaveLayerRec<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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<N, T> NativeTransmutableWrapper<N> for Twhere T: NativeTransmutable<N>,

source§

fn wrap(native: N) -> T

source§

fn unwrap(self) -> N

source§

fn inner(&self) -> &N

source§

fn inner_mut(&mut self) -> &mut N

source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.