Enum gdk_pixbuf::PixbufAlphaMode
source · #[non_exhaustive]pub enum PixbufAlphaMode {
Bilevel,
Full,
}
Expand description
Control the alpha channel for drawables.
These values can be passed to gdk_pixbuf_xlib_render_to_drawable_alpha() in gdk-pixbuf-xlib to control how the alpha channel of an image should be handled.
This function can create a bilevel clipping mask (black and white) and use it while painting the image.
In the future, when the X Window System gets an alpha channel extension, it will be possible to do full alpha compositing onto arbitrary drawables. For now both cases fall back to a bilevel clipping mask.
Deprecated since 2.42
There is no user of GdkPixbufAlphaMode in GdkPixbuf, and the Xlib utility functions have been split out to their own library, gdk-pixbuf-xlib
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bilevel
A bilevel clipping mask (black and white) will be created and used to draw the image. Pixels below 0.5 opacity will be considered fully transparent, and all others will be considered fully opaque.
Full
For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL. In the future it will do full alpha compositing.
Trait Implementations§
source§impl Clone for PixbufAlphaMode
impl Clone for PixbufAlphaMode
source§fn clone(&self) -> PixbufAlphaMode
fn clone(&self) -> PixbufAlphaMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PixbufAlphaMode
impl Debug for PixbufAlphaMode
source§impl Display for PixbufAlphaMode
impl Display for PixbufAlphaMode
source§impl<'a> FromValue<'a> for PixbufAlphaMode
impl<'a> FromValue<'a> for PixbufAlphaMode
§type Checker = GenericValueTypeChecker<PixbufAlphaMode>
type Checker = GenericValueTypeChecker<PixbufAlphaMode>
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresource§impl Hash for PixbufAlphaMode
impl Hash for PixbufAlphaMode
source§impl Ord for PixbufAlphaMode
impl Ord for PixbufAlphaMode
source§fn cmp(&self, other: &PixbufAlphaMode) -> Ordering
fn cmp(&self, other: &PixbufAlphaMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<PixbufAlphaMode> for PixbufAlphaMode
impl PartialEq<PixbufAlphaMode> for PixbufAlphaMode
source§fn eq(&self, other: &PixbufAlphaMode) -> bool
fn eq(&self, other: &PixbufAlphaMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PixbufAlphaMode> for PixbufAlphaMode
impl PartialOrd<PixbufAlphaMode> for PixbufAlphaMode
source§fn partial_cmp(&self, other: &PixbufAlphaMode) -> Option<Ordering>
fn partial_cmp(&self, other: &PixbufAlphaMode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for PixbufAlphaMode
impl StaticType for PixbufAlphaMode
source§fn static_type() -> Type
fn static_type() -> Type
Self
.source§impl ToValue for PixbufAlphaMode
impl ToValue for PixbufAlphaMode
source§impl ValueType for PixbufAlphaMode
impl ValueType for PixbufAlphaMode
§type Type = PixbufAlphaMode
type Type = PixbufAlphaMode
Type
from. Read moreimpl Copy for PixbufAlphaMode
impl Eq for PixbufAlphaMode
impl StructuralEq for PixbufAlphaMode
impl StructuralPartialEq for PixbufAlphaMode
Auto Trait Implementations§
impl RefUnwindSafe for PixbufAlphaMode
impl Send for PixbufAlphaMode
impl Sync for PixbufAlphaMode
impl Unpin for PixbufAlphaMode
impl UnwindSafe for PixbufAlphaMode
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> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.