pub struct BrightnessContrastEffect(/* private fields */);
Implementations§
Source§impl BrightnessContrastEffect
impl BrightnessContrastEffect
Sourcepub fn new() -> BrightnessContrastEffect
pub fn new() -> BrightnessContrastEffect
Creates a new BrightnessContrastEffect
to be used with
ActorExt::add_effect
§Returns
the newly created
BrightnessContrastEffect
or None
. Use gobject::ObjectExt::unref
when
done.
Sourcepub fn get_brightness(&self) -> (f32, f32, f32)
pub fn get_brightness(&self) -> (f32, f32, f32)
Sourcepub fn get_contrast(&self) -> (f32, f32, f32)
pub fn get_contrast(&self) -> (f32, f32, f32)
Sourcepub fn set_brightness(&self, brightness: f32)
pub fn set_brightness(&self, brightness: f32)
The range of brightness
is [-1.0, 1.0], where 0.0 designates no change;
a value below 0.0 indicates a decrease in brightness; and a value
above 0.0 indicates an increase of brightness.
§brightness
the brightness change for all three components (r, g, b)
Sourcepub fn set_brightness_full(&self, red: f32, green: f32, blue: f32)
pub fn set_brightness_full(&self, red: f32, green: f32, blue: f32)
The range for each component is [-1.0, 1.0] where 0.0 designates no change, values below 0.0 mean a decrease in brightness, and values above indicate an increase.
§red
red component of the change in brightness
§green
green component of the change in brightness
§blue
blue component of the change in brightness
Sourcepub fn set_contrast(&self, contrast: f32)
pub fn set_contrast(&self, contrast: f32)
The range for contrast
is [-1.0, 1.0], where 0.0 designates no change;
a value below 0.0 indicates a decrease in contrast; and a value above
0.0 indicates an increase.
§contrast
contrast change for all three channels
Sourcepub fn set_contrast_full(&self, red: f32, green: f32, blue: f32)
pub fn set_contrast_full(&self, red: f32, green: f32, blue: f32)
The range for each component is [-1.0, 1.0] where 0.0 designates no change, values below 0.0 mean a decrease in contrast, and values above indicate an increase.
§red
red component of the change in contrast
§green
green component of the change in contrast
§blue
blue component of the change in contrast
pub fn connect_property_brightness_notify<F: Fn(&BrightnessContrastEffect) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_contrast_notify<F: Fn(&BrightnessContrastEffect) + 'static>( &self, f: F, ) -> SignalHandlerId
Trait Implementations§
Source§impl Clone for BrightnessContrastEffect
impl Clone for BrightnessContrastEffect
Source§fn clone(&self) -> BrightnessContrastEffect
fn clone(&self) -> BrightnessContrastEffect
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BrightnessContrastEffect
impl Debug for BrightnessContrastEffect
Source§impl Default for BrightnessContrastEffect
impl Default for BrightnessContrastEffect
Source§impl Display for BrightnessContrastEffect
impl Display for BrightnessContrastEffect
Source§impl Hash for BrightnessContrastEffect
impl Hash for BrightnessContrastEffect
Source§impl Ord for BrightnessContrastEffect
impl Ord for BrightnessContrastEffect
Source§fn cmp(&self, other: &BrightnessContrastEffect) -> Ordering
fn cmp(&self, other: &BrightnessContrastEffect) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T: ObjectType> PartialEq<T> for BrightnessContrastEffect
impl<T: ObjectType> PartialEq<T> for BrightnessContrastEffect
Source§impl<T: ObjectType> PartialOrd<T> for BrightnessContrastEffect
impl<T: ObjectType> PartialOrd<T> for BrightnessContrastEffect
Source§impl StaticType for BrightnessContrastEffect
impl StaticType for BrightnessContrastEffect
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for BrightnessContrastEffect
impl IsA<ActorMeta> for BrightnessContrastEffect
impl IsA<Effect> for BrightnessContrastEffect
impl IsA<InitiallyUnowned> for BrightnessContrastEffect
impl IsA<OffscreenEffect> for BrightnessContrastEffect
Auto Trait Implementations§
impl Freeze for BrightnessContrastEffect
impl RefUnwindSafe for BrightnessContrastEffect
impl !Send for BrightnessContrastEffect
impl !Sync for BrightnessContrastEffect
impl Unpin for BrightnessContrastEffect
impl UnwindSafe for BrightnessContrastEffect
Blanket Implementations§
Source§impl<O> ActorMetaExt for O
impl<O> ActorMetaExt for O
Source§fn get_enabled(&self) -> bool
fn get_enabled(&self) -> bool
self
is enabled Read moreSource§fn get_name(&self) -> Option<GString>
fn get_name(&self) -> Option<GString>
ActorMetaExt::set_name
Read moreSource§fn set_enabled(&self, is_enabled: bool)
fn set_enabled(&self, is_enabled: bool)
self
should be enabled or not Read morefn connect_property_actor_notify<F>(&self, f: F) -> SignalHandlerId
fn connect_property_enabled_notify<F>(&self, f: F) -> SignalHandlerId
fn connect_property_name_notify<F>(&self, f: F) -> SignalHandlerId
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> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
T
. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
T
. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<O> EffectExt for O
impl<O> EffectExt for O
Source§fn queue_repaint(&self)
fn queue_repaint(&self)
EffectPaintFlags::ActorDirty
flag set. In that case the
effect is free to assume that the actor has not changed its
appearance since the last time it was painted so it doesn’t need to
call ActorExt::continue_paint
if it can draw a cached
image. This is mostly intended for effects that are using a
cogl::Offscreen
to redirect the actor (such as
OffscreenEffect
). In that case the effect can save a bit of
rendering time by painting the cached texture without causing the
entire actor to be painted. Read moreSource§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.fn get_type(&self) -> Type
fn get_object_class(&self) -> &ObjectClass
fn set_properties( &self, property_values: &[(&str, &dyn ToValue)], ) -> Result<(), BoolError>
fn set_property<'a, N>( &self, property_name: N, value: &dyn ToValue, ) -> Result<(), BoolError>
fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError>
fn block_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn stop_signal_emission(&self, signal_name: &str)
fn disconnect(&self, handler_id: SignalHandlerId)
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
fn notify<'a, N>(&self, property_name: N)
fn notify_by_pspec(&self, pspec: &ParamSpec)
fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool
fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type>
fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec>
fn list_properties(&self) -> Vec<ParamSpec>
fn connect<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
fn connect_local<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
unsafe fn connect_unsafe<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
fn emit<'a, N>( &self, signal_name: N, args: &[&dyn ToValue], ) -> Result<Option<Value>, BoolError>
fn downgrade(&self) -> WeakRef<T>
fn bind_property<'a, O, N, M>( &'a self, source_property: N, target: &'a O, target_property: M, ) -> BindingBuilder<'a>
fn ref_count(&self) -> u32
Source§impl<O> OffscreenEffectExt for Owhere
O: IsA<OffscreenEffect>,
impl<O> OffscreenEffectExt for Owhere
O: IsA<OffscreenEffect>,
Source§fn get_target_rect(&self) -> Option<Rect>
fn get_target_rect(&self) -> Option<Rect>
self
to
paint the actor to which it has been applied. Read moreSource§fn paint_target(&self)
fn paint_target(&self)
paint_target
virtual function of the self