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 From<PixbufAlphaMode> for Value
impl From<PixbufAlphaMode> for Value
source§fn from(v: PixbufAlphaMode) -> Self
fn from(v: PixbufAlphaMode) -> Self
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 HasParamSpec for PixbufAlphaMode
impl HasParamSpec for PixbufAlphaMode
type ParamSpec = ParamSpecEnum
§type SetValue = PixbufAlphaMode
type SetValue = PixbufAlphaMode
type BuilderFn = fn(_: &str, _: PixbufAlphaMode) -> ParamSpecEnumBuilder<'_, PixbufAlphaMode>
fn param_spec_builder() -> Self::BuilderFn
source§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 for PixbufAlphaMode
impl PartialEq 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 for PixbufAlphaMode
impl PartialOrd 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 StructuralPartialEq for PixbufAlphaMode
Auto Trait Implementations§
impl Freeze for PixbufAlphaMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
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> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.