Class: Clutter::Alpha

Inherits:
GObject::InitiallyUnowned
  • Object
show all
Defined in:
(unknown)

Overview

Base class for Clutter::Alpha

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timeline, func, data, destroy) ⇒ Clutter::Alpha

Creates a new Clutter::Alpha instances and sets the timeline and the alpha function.

This function will not register func as a global alpha function.

See also clutter_alpha_set_timeline() and clutter_alpha_set_func().

Parameters:

  • timeline (Clutter::Timeline)

    a Clutter::Timeline

  • func (Clutter::AlphaFunc)

    a Clutter::AlphaFunc

  • data (GObject)

    data to pass to the function, or nil

  • destroy (GLib::DestroyNotify)

    function to call when removing the alpha function, or nil

Class Method Details

.register_closure(closure) ⇒ Clutter::gulong

#GClosure variant of clutter_alpha_register_func().

Registers a global alpha function and returns its logical id to be used by clutter_alpha_set_mode() or by Clutter::Animation.

The logical id is always greater than %CLUTTER_ANIMATION_LAST.

Parameters:

  • closure (GObject::Closure)

    a #GClosure

Returns:

  • (Clutter::gulong)

    the logical id of the alpha function

.register_func(func, data) ⇒ Clutter::gulong

Registers a global alpha function and returns its logical id to be used by clutter_alpha_set_mode() or by Clutter::Animation.

The logical id is always greater than %CLUTTER_ANIMATION_LAST.

Parameters:

  • func (Clutter::AlphaFunc)

    a Clutter::AlphaFunc

  • data (GObject)

    user data to pass to func, or nil

Returns:

  • (Clutter::gulong)

    the logical id of the alpha function

Instance Method Details

#alphaFloat

The alpha value as computed by the alpha function. The linear interval is 0.0 to 1.0, but the Alpha allows overshooting by one unit in each direction, so the valid interval is -1.0 to 2.0.

Returns:

  • (Float)

    alpha

#alpha=(alpha) ⇒ Float

The alpha value as computed by the alpha function. The linear interval is 0.0 to 1.0, but the Alpha allows overshooting by one unit in each direction, so the valid interval is -1.0 to 2.0.

Parameters:

  • alpha (Float)

Returns:

  • (Float)

    alpha

  • (Float)

    alpha

#closure=(closure) ⇒ nil

Sets the #GClosure used to compute the alpha value at each frame of the Clutter::Timeline bound to alpha.

Parameters:

  • closure (GObject::Closure)

    A #GClosure

Returns:

  • (nil)

#modeClutter::gulong

The progress function logical id - either a value from the Clutter::AnimationMode enumeration or a value returned by clutter_alpha_register_func().

If %CLUTTER_CUSTOM_MODE is used then the function set using clutter_alpha_set_closure() or clutter_alpha_set_func() will be used.

Returns:

  • (Clutter::gulong)

    mode

#mode=(mode) ⇒ Clutter::gulong

The progress function logical id - either a value from the Clutter::AnimationMode enumeration or a value returned by clutter_alpha_register_func().

If %CLUTTER_CUSTOM_MODE is used then the function set using clutter_alpha_set_closure() or clutter_alpha_set_func() will be used.

Parameters:

  • mode (Clutter::gulong)

Returns:

  • (Clutter::gulong)

    mode

  • (Clutter::gulong)

    mode

#set_func(func, data, destroy) ⇒ nil

Sets the Clutter::AlphaFunc function used to compute the alpha value at each frame of the Clutter::Timeline bound to alpha.

This function will not register func as a global alpha function.

Parameters:

  • func (Clutter::AlphaFunc)

    A Clutter::AlphaFunc

  • data (GObject)

    user data to be passed to the alpha function, or nil

  • destroy (GLib::DestroyNotify)

    notify function used when disposing the alpha function

Returns:

  • (nil)

#timelineClutter::Timeline

A Clutter::Timeline instance used to drive the alpha function.

Returns:

#timeline=(timeline) ⇒ Clutter::Timeline

A Clutter::Timeline instance used to drive the alpha function.

Parameters:

Returns: