Skip to main content

PartMaskFlags

Struct PartMaskFlags 

Source
pub struct PartMaskFlags {
    pub is_mask_part: bool,
    pub mask_write: bool,
    pub mask_influence: bool,
    pub visible_inside_mask: bool,
    pub draw_as_mask: bool,
    pub geom: GeomKind,
}
Expand description

Static, per-part mask flags read once from ssab PartData.

mask_influence is deliberately dual-purpose: for a writer it is the stencil OP (0 = increment, 1 = invert); for a drawn target it is the mask opt-in. Clipping parts (writer and target) use the same value for both roles.

Fields§

§is_mask_part: bool

Part type is PartTypeMask — always a pure (colourless) mask.

§mask_write: bool

A drawn part that also writes coverage (a clipping writer).

§mask_influence: bool

Dual meaning: OP for writers, mask opt-in for targets.

§visible_inside_mask: bool

Polarity: draw inside (true) or outside (false) the coverage.

§draw_as_mask: bool

Shape/Text/Nines promoted to a pure mask.

§geom: GeomKind

Geometry this part builds when it writes coverage.

Implementations§

Source§

impl PartMaskFlags

Source

pub fn pure_mask(&self) -> bool

A pure (colourless) mask writer.

Source

pub fn is_writer(&self) -> bool

Writes coverage into the stencil (pure mask or clipping).

Source

pub fn is_clipping(&self) -> bool

A clipping writer: draws its own colour and writes coverage.

Source

pub fn polarity(&self) -> StencilTest

Stencil test to apply to this part when it is a masked target.

Trait Implementations§

Source§

impl Clone for PartMaskFlags

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PartMaskFlags

Source§

impl Debug for PartMaskFlags

Source§

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

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

impl Default for PartMaskFlags

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,