pub enum SurfaceAlpha {
Premultiplied,
Opaque,
Straight,
}Expand description
How an AppTexture composes with widgets painted underneath it.
The choice affects blend state and lets opaque content skip blend math; it does not change z-order. Widgets above the surface in the paint stream still paint over it, regardless of mode.
Variants§
Premultiplied
Texture carries premultiplied alpha. Default; matches Aetna’s internal blend convention.
Opaque
Texture is fully opaque. Backend skips blending — pixels written to the surface rect replace whatever was there. Pick this for 3D viewports and video where every output pixel is non-transparent.
Straight
Texture carries straight (unpremultiplied) alpha. Backend premultiplies in the shader before blending. Convenient for content authored in a paint app or rasterised by a third-party vector library that doesn’t premultiply.
Trait Implementations§
Source§impl Clone for SurfaceAlpha
impl Clone for SurfaceAlpha
Source§fn clone(&self) -> SurfaceAlpha
fn clone(&self) -> SurfaceAlpha
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SurfaceAlpha
impl Debug for SurfaceAlpha
Source§impl Default for SurfaceAlpha
impl Default for SurfaceAlpha
Source§fn default() -> SurfaceAlpha
fn default() -> SurfaceAlpha
Source§impl PartialEq for SurfaceAlpha
impl PartialEq for SurfaceAlpha
Source§fn eq(&self, other: &SurfaceAlpha) -> bool
fn eq(&self, other: &SurfaceAlpha) -> bool
self and other values to be equal, and is used by ==.impl Copy for SurfaceAlpha
impl Eq for SurfaceAlpha
impl StructuralPartialEq for SurfaceAlpha
Auto Trait Implementations§
impl Freeze for SurfaceAlpha
impl RefUnwindSafe for SurfaceAlpha
impl Send for SurfaceAlpha
impl Sync for SurfaceAlpha
impl Unpin for SurfaceAlpha
impl UnsafeUnpin for SurfaceAlpha
impl UnwindSafe for SurfaceAlpha
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.