MxFadeEffect

## MxFadeEffect MxFadeEffect — An effect used to fade the borders of actors |

## Synopsis

    struct              MxFadeEffect;
    struct              MxFadeEffectClass;
    ClutterEffect *     mx_fade_effect_new                  (void);
    void                mx_fade_effect_set_border           (MxFadeEffect *effect,
                                                             guint top,
                                                             guint right,
                                                             guint bottom,
                                                             guint left);
    void                mx_fade_effect_get_border           (MxFadeEffect *effect,
                                                             guint *top,
                                                             guint *right,
                                                             guint *bottom,
                                                             guint *left);
    void                mx_fade_effect_set_bounds           (MxFadeEffect *effect,
                                                             gint x,
                                                             gint y,
                                                             guint width,
                                                             guint height);
    void                mx_fade_effect_get_bounds           (MxFadeEffect *effect,
                                                             gint *x,
                                                             gint *y,
                                                             guint *width,
                                                             guint *height);
    void                mx_fade_effect_set_color            (MxFadeEffect *effect,
                                                             const ClutterColor *color);
    void                mx_fade_effect_get_color            (MxFadeEffect *effect,
                                                             ClutterColor *color);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActorMeta
                   +----ClutterEffect
                         +----ClutterOffscreenEffect
                               +----MxFadeEffect

## Properties

      "border-bottom"            guint                 : Read / Write
      "border-left"              guint                 : Read / Write
      "border-right"             guint                 : Read / Write
      "border-top"               guint                 : Read / Write
      "bounds-height"            guint                 : Read / Write
      "bounds-width"             guint                 : Read / Write
      "bounds-x"                 gint                  : Read / Write
      "bounds-y"                 gint                  : Read / Write
      "color"                    ClutterColor*         : Read / Write
      "freeze-update"            gboolean              : Read / Write

## Description

MxFadeEffect is a ClutterEffect that can be used to fade the borders of a ClutterActor. It provides a configurable bounding box, border size and colour to control the fading effect.

## Details

### struct MxFadeEffect

    struct MxFadeEffect;

### struct MxFadeEffectClass

    struct MxFadeEffectClass {
      ClutterOffscreenEffectClass parent_class;
    };

### mx_fade_effect_new ()

    ClutterEffect *     mx_fade_effect_new                  (void);

Creates a new MxFadeEffect to be used with `clutter_actor_add_effect()`.

Returns : | the newly created MxFadeEffect, or `NULL`

Since 1.2

### mx_fade_effect_set_border ()

    void                mx_fade_effect_set_border           (MxFadeEffect *effect,
                                                             guint top,
                                                             guint right,
                                                             guint bottom,
                                                             guint left);

Sets the border to be used for the fading effect. This is the number of pixels on each side of the effect that should be used to fade.

`effect` : | A MxFadeEffect
`top` : | The upper border, in pixels
`right` : | The right border, in pixels
`bottom` : | The lower border, in pixels
`left` : | The left border, in pixels

Since 1.2

### mx_fade_effect_get_border ()

    void                mx_fade_effect_get_border           (MxFadeEffect *effect,
                                                             guint *top,
                                                             guint *right,
                                                             guint *bottom,
                                                             guint *left);

Retrieves the border values for `effect`.

`effect` : | A MxFadeEffect
`top` : | The upper border, in pixels. [out]
`right` : | The right border, in pixels. [out]
`bottom` : | The lower border, in pixels. [out]
`left` : | The left border, in pixels. [out]

Since 1.2

### mx_fade_effect_set_bounds ()

    void                mx_fade_effect_set_bounds           (MxFadeEffect *effect,
                                                             gint x,
                                                             gint y,
                                                             guint width,
                                                             guint height);

Sets the bounding box of the effect. The effect will essentially treat this box as a clipping rectangle. Setting width or height to `0` will use the width or height of the ClutterActor the effect is attached to.

### Note

The effect border will apply to the bounds, and not to the un-altered rectangle, so an effect with an `x` of `5` and a `left`-border of `5` will have a gap of 5 blank pixels to the left, with a fade length of 5 pixels.

`effect` : | A MxFadeEffect
`x` : | The x value of the effect bounds, in pixels
`y` : | The y value of the effect bounds, in pixels
`width` : | The width of the effect bounds, in pixels, or `0`
`height` : | The height of the effect bounds, in pixels, or `0`

Since 1.2

### mx_fade_effect_get_bounds ()

    void                mx_fade_effect_get_bounds           (MxFadeEffect *effect,
                                                             gint *x,
                                                             gint *y,
                                                             guint *width,
                                                             guint *height);

Retrieves the bounding box of the effect.

`effect` : | A MxFadeEffect
`x` : | The x value of the effect bounds, in pixels. [out]
`y` : | The y value of the effect bounds, in pixels. [out]
`width` : | The width of the effect bounds, in pixels, or `0`. [out]
`height` : | The height of the effect bounds, in pixels, or `0`. [out]

Since 1.2

### mx_fade_effect_set_color ()

    void                mx_fade_effect_set_color            (MxFadeEffect *effect,
                                                             const ClutterColor *color);

Sets the color of the fade effect. The effect will fade out towards the set border to this color.

`effect` : | A MxFadeEffect
`color` : | A ClutterColor

Since 1.2

### mx_fade_effect_get_color ()

    void                mx_fade_effect_get_color            (MxFadeEffect *effect,
                                                             ClutterColor *color);

Retrieves the color used for the fade effect.

`effect` : | A MxFadeEffect
`color` : | A ClutterColor to store the color in. [out]

Since 1.2

## Property Details

### The `"border-bottom"` property

      "border-bottom"            guint                 : Read / Write

Border at the bottom of the effect.

Default value: 0

### The `"border-left"` property

      "border-left"              guint                 : Read / Write

Border at the left of the effect.

Default value: 0

### The `"border-right"` property

      "border-right"             guint                 : Read / Write

Border at the right of the effect.

Default value: 0

### The `"border-top"` property

      "border-top"               guint                 : Read / Write

Border at the top of the effect.

Default value: 0

### The `"bounds-height"` property

      "bounds-height"            guint                 : Read / Write

Height of the texture bounding box.

Default value: 0

### The `"bounds-width"` property

      "bounds-width"             guint                 : Read / Write

Width of the texture bounding box.

Default value: 0

### The `"bounds-x"` property

      "bounds-x"                 gint                  : Read / Write

X-coordinate of the texture bounding box.

Allowed values: >= -2147483647

Default value: 0

### The `"bounds-y"` property

      "bounds-y"                 gint                  : Read / Write

Y-coordinate of the texture bounding boy.

Allowed values: >= -2147483647

Default value: 0

### The `"color"` property

      "color"                    ClutterColor*         : Read / Write

Color of the faded border.

### The `"freeze-update"` property

      "freeze-update"            gboolean              : Read / Write

Stop updating the offscreen buffer.

Default value: FALSE