MxFadeEffect

MxFadeEffect — An effect used to fade the borders of actors

Functions

Properties

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

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActorMeta
            ╰── ClutterEffect
                ╰── ClutterOffscreenEffect
                    ╰── MxFadeEffect

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.

Functions

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.

Parameters

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 .

Parameters

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.

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

effect

A MxFadeEffect

 

color

A ClutterColor to store the color in.

[out]

Since: 1.2

Types and Values

struct MxFadeEffect

struct MxFadeEffect;

struct MxFadeEffectClass

struct MxFadeEffectClass {
  ClutterOffscreenEffectClass parent_class;
};

Property Details

The “border-bottom” property

  “border-bottom”            guint

Border at the bottom of the effect.

Flags: Read / Write

Default value: 0


The “border-left” property

  “border-left”              guint

Border at the left of the effect.

Flags: Read / Write

Default value: 0


The “border-right” property

  “border-right”             guint

Border at the right of the effect.

Flags: Read / Write

Default value: 0


The “border-top” property

  “border-top”               guint

Border at the top of the effect.

Flags: Read / Write

Default value: 0


The “bounds-height” property

  “bounds-height”            guint

Height of the texture bounding box.

Flags: Read / Write

Default value: 0


The “bounds-width” property

  “bounds-width”             guint

Width of the texture bounding box.

Flags: Read / Write

Default value: 0


The “bounds-x” property

  “bounds-x”                 gint

X-coordinate of the texture bounding box.

Flags: Read / Write

Allowed values: >= -2147483647

Default value: 0


The “bounds-y” property

  “bounds-y”                 gint

Y-coordinate of the texture bounding boy.

Flags: Read / Write

Allowed values: >= -2147483647

Default value: 0


The “color” property

  “color”                    ClutterColor *

Color of the faded border.

Flags: Read / Write


The “freeze-update” property

  “freeze-update”            gboolean

Stop updating the offscreen buffer.

Flags: Read / Write

Default value: FALSE