Clutter Reference Manual: ClutterBrightnessContrastEffect

## ClutterBrightnessContrastEffect ClutterBrightnessContrastEffect — Increase/decrease brightness and/or contrast of actor. |

## Synopsis

                        ClutterBrightnessContrastEffect;
    ClutterEffect *     clutter_brightness_contrast_effect_new
                                                            (void);
    void                clutter_brightness_contrast_effect_set_brightness
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float brightness);
    void                clutter_brightness_contrast_effect_set_brightness_full
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float red,
                                                             float green,
                                                             float blue);
    void                clutter_brightness_contrast_effect_get_brightness
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float *red,
                                                             float *green,
                                                             float *blue);
    void                clutter_brightness_contrast_effect_set_contrast
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float contrast);
    void                clutter_brightness_contrast_effect_set_contrast_full
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float red,
                                                             float green,
                                                             float blue);
    void                clutter_brightness_contrast_effect_get_contrast
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float *red,
                                                             float *green,
                                                             float *blue);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActorMeta
                   +----ClutterEffect
                         +----ClutterOffscreenEffect
                               +----ClutterBrightnessContrastEffect

## Properties

      "brightness"               ClutterColor*         : Read / Write
      "contrast"                 ClutterColor*         : Read / Write

## Description

ClutterBrightnessContrastEffect is a sub-class of ClutterEffect that changes the overall brightness of a ClutterActor.

ClutterBrightnessContrastEffect is available since Clutter 1.10

## Details

### ClutterBrightnessContrastEffect

    typedef struct _ClutterBrightnessContrastEffect ClutterBrightnessContrastEffect;

ClutterBrightnessContrastEffect is an opaque structure whose members cannot be directly accessed

Since 1.10

### clutter_brightness_contrast_effect_new ()

    ClutterEffect *     clutter_brightness_contrast_effect_new
                                                            (void);

Creates a new ClutterBrightnessContrastEffect to be used with `clutter_actor_add_effect()`

Returns : | the newly created ClutterBrightnessContrastEffect or `NULL`. Use `g_object_unref()` when done. [transfer full]

Since 1.10

### clutter_brightness_contrast_effect_set_brightness ()

    void                clutter_brightness_contrast_effect_set_brightness
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float brightness);

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.

`effect` : | a ClutterBrightnessContrastEffect
`brightness` : | the brightness change for all three components (r, g, b)

Since 1.10

### clutter_brightness_contrast_effect_set_brightness_full ()

    void                clutter_brightness_contrast_effect_set_brightness_full
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float red,
                                                             float green,
                                                             float blue);

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.

`effect` : | a ClutterBrightnessContrastEffect
`red` : | red component of the change in brightness
`green` : | green component of the change in brightness
`blue` : | blue component of the change in brightness

Since 1.10

### clutter_brightness_contrast_effect_get_brightness ()

    void                clutter_brightness_contrast_effect_get_brightness
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float *red,
                                                             float *green,
                                                             float *blue);

Retrieves the change in brightness used by `effect`.

`effect` : | a ClutterBrightnessContrastEffect
`red` : | return location for red component of the change in brightness. [out][allow-none]
`green` : | return location for green component of the change in brightness. [out][allow-none]
`blue` : | return location for blue component of the change in brightness. [out][allow-none]

Since 1.10

### clutter_brightness_contrast_effect_set_contrast ()

    void                clutter_brightness_contrast_effect_set_contrast
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float contrast);

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.

`effect` : | a ClutterBrightnessContrastEffect
`contrast` : | contrast change for all three channels

Since 1.10

### clutter_brightness_contrast_effect_set_contrast_full ()

    void                clutter_brightness_contrast_effect_set_contrast_full
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float red,
                                                             float green,
                                                             float blue);

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.

`effect` : | a ClutterBrightnessContrastEffect
`red` : | red component of the change in contrast
`green` : | green component of the change in contrast
`blue` : | blue component of the change in contrast

Since 1.10

### clutter_brightness_contrast_effect_get_contrast ()

    void                clutter_brightness_contrast_effect_get_contrast
                                                            (ClutterBrightnessContrastEffect *effect,
                                                             float *red,
                                                             float *green,
                                                             float *blue);

Retrieves the contrast value used by `effect`.

`effect` : | a ClutterBrightnessContrastEffect
`red` : | return location for red component of the change in contrast. [out][allow-none]
`green` : | return location for green component of the change in contrast. [out][allow-none]
`blue` : | return location for blue component of the change in contrast. [out][allow-none]

Since 1.10

## Property Details

### The `"brightness"` property

      "brightness"               ClutterColor*         : Read / Write

The brightness change to apply to the effect.

This property uses a ClutterColor 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.

Since 1.10

### The `"contrast"` property

      "contrast"                 ClutterColor*         : Read / Write

The contrast change to apply to the effect.

This property uses a ClutterColor 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.

Since 1.10

## See Also

ClutterEffect, ClutterOffscreenEffect