#[repr(C)]pub struct DrawBeginClip {
pub blend_mode: u32,
pub alpha: f32,
}Expand description
Draw data for a clip or layer.
Fields§
§blend_mode: u32Blend mode.
alpha: f32Group alpha.
Implementations§
Source§impl DrawBeginClip
impl DrawBeginClip
Sourcepub const LUMINANCE_MASK_BLEND_MODE: u32 = 0x10000
pub const LUMINANCE_MASK_BLEND_MODE: u32 = 0x10000
The blend_mode used to indicate that a layer should be
treated as a luminance mask.
The least significant 16 bits are reserved for Mix + Compose combinations.
Sourcepub const CLIP_BLEND_MODE: u32 = 0x8003
pub const CLIP_BLEND_MODE: u32 = 0x8003
The blend_mode used to indicate that a layer should be
treated as a clip.
This is equivalent to Compose::SrcOver with a Mix of 128,
for legacy reasons.
We expect this to change in the future.
Sourcepub fn new(blend_mode: BlendMode, alpha: f32) -> Self
pub fn new(blend_mode: BlendMode, alpha: f32) -> Self
Creates new clip draw data for a Porter-Duff blend mode.
Sourcepub fn luminance_mask(alpha: f32) -> Self
pub fn luminance_mask(alpha: f32) -> Self
Creates a new clip draw data for a luminance mask.
Trait Implementations§
Source§impl Clone for DrawBeginClip
impl Clone for DrawBeginClip
Source§fn clone(&self) -> DrawBeginClip
fn clone(&self) -> DrawBeginClip
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DrawBeginClip
Source§impl Debug for DrawBeginClip
impl Debug for DrawBeginClip
Source§impl Default for DrawBeginClip
impl Default for DrawBeginClip
Source§fn default() -> DrawBeginClip
fn default() -> DrawBeginClip
Returns the “default value” for a type. Read more
impl Pod for DrawBeginClip
Auto Trait Implementations§
impl Freeze for DrawBeginClip
impl RefUnwindSafe for DrawBeginClip
impl Send for DrawBeginClip
impl Sync for DrawBeginClip
impl Unpin for DrawBeginClip
impl UnsafeUnpin for DrawBeginClip
impl UnwindSafe for DrawBeginClip
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.