Class: Clutter::BrightnessContrastEffect
- Inherits:
-
OffscreenEffect
- Object
- GObject::InitiallyUnowned
- ActorMeta
- Effect
- OffscreenEffect
- Clutter::BrightnessContrastEffect
- Defined in:
- lib/clutter/brightness-contrast-effect.rb
Instance Method Summary collapse
-
#brightness ⇒ Clutter::Color
The brightness change to apply to the effect.
-
#brightness=(brightness) ⇒ Clutter::Color
The brightness change to apply to the effect.
-
#contrast ⇒ Clutter::Color
The contrast change to apply to the effect.
-
#contrast=(contrast) ⇒ Clutter::Color
The contrast change to apply to the effect.
-
#get_brightness(red, green, blue) ⇒ nil
Retrieves the change in brightness used by effect.
-
#get_contrast(red, green, blue) ⇒ nil
Retrieves the contrast value used by effect.
-
#initialize ⇒ Clutter::Effect
constructor
Creates a new Clutter::BrightnessContrastEffect to be used with clutter_actor_add_effect().
- #set_brightness(brightness_all_or_red, brightness_green = nil, brightness_blue = nil) ⇒ Object
-
#set_brightness_full(red, green, blue) ⇒ nil
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.
- #set_brightness_raw ⇒ Object
- #set_contrast(contrast_all_or_red, contrast_green = nil, contrast_blue = nil) ⇒ Object
-
#set_contrast_full(red, green, blue) ⇒ nil
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.
- #set_contrast_raw ⇒ Object
Methods inherited from OffscreenEffect
#create_texture, #get_target_rect, #get_target_size, #paint_target, #target, #texture
Methods inherited from Effect
Methods inherited from ActorMeta
#actor, #actor=, #enabled, #enabled=, #enabled?, #name, #name=
Constructor Details
#initialize ⇒ Clutter::Effect
Creates a new Clutter::BrightnessContrastEffect to be used with clutter_actor_add_effect()
Instance Method Details
#brightness ⇒ Clutter::Color
The brightness change to apply to the effect.
This property uses a Clutter::Color to represent the changes to each color channel. The range is [ 0, 255 ], with 127 as the value used to indicate no change; values smaller than 127 indicate a decrease in brightness, and values larger than 127 indicate an increase in brightness.
#brightness=(brightness) ⇒ Clutter::Color
The brightness change to apply to the effect.
This property uses a Clutter::Color to represent the changes to each color channel. The range is [ 0, 255 ], with 127 as the value used to indicate no change; values smaller than 127 indicate a decrease in brightness, and values larger than 127 indicate an increase in brightness.
#contrast ⇒ Clutter::Color
The contrast change to apply to the effect.
This property uses a Clutter::Color to represent the changes to each color channel. The range is [ 0, 255 ], with 127 as the value used to indicate no change; values smaller than 127 indicate a decrease in contrast, and values larger than 127 indicate an increase in contrast.
#contrast=(contrast) ⇒ Clutter::Color
The contrast change to apply to the effect.
This property uses a Clutter::Color to represent the changes to each color channel. The range is [ 0, 255 ], with 127 as the value used to indicate no change; values smaller than 127 indicate a decrease in contrast, and values larger than 127 indicate an increase in contrast.
#get_brightness(red, green, blue) ⇒ nil
Retrieves the change in brightness used by effect.
#get_contrast(red, green, blue) ⇒ nil
Retrieves the contrast value used by effect.
#set_brightness(brightness_all_or_red, brightness_green = nil, brightness_blue = nil) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/clutter/brightness-contrast-effect.rb', line 32 def set_brightness(brightness_all_or_red, brightness_green=nil, brightness_blue=nil) if brightness_green.nil? && brightness_blue.nil? brightness_all = brightness_all_or_red set_brightness_raw(brightness_all) else brightness_red = brightness_all_or_red set_brightness_full(brightness_red, brightness_green, brightness_blue) end end |
#set_brightness_full(red, green, blue) ⇒ nil
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.
#set_brightness_raw ⇒ Object
31 |
# File 'lib/clutter/brightness-contrast-effect.rb', line 31 alias_method :set_brightness_raw, :set_brightness |
#set_contrast(contrast_all_or_red, contrast_green = nil, contrast_blue = nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/clutter/brightness-contrast-effect.rb', line 20 def set_contrast(contrast_all_or_red, contrast_green=nil, contrast_blue=nil) if contrast_green.nil? && contrast_blue.nil? contrast_all = contrast_all_or_red set_contrast_raw(contrast_all) else contrast_red = contrast_all_or_red set_contrast_full(contrast_red, contrast_green, contrast_blue) end end |
#set_contrast_full(red, green, blue) ⇒ nil
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.
#set_contrast_raw ⇒ Object
19 |
# File 'lib/clutter/brightness-contrast-effect.rb', line 19 alias_method :set_contrast_raw, :set_contrast |