Clutter::Interval(3) An object holding an interval of two values

SYNOPSIS


my $interval = Clutter::Interval->new('Glib::Int', 0, 11);
my $value = $interval->compute_value(0.5);

DESCRIPTION

Clutter::Interval is a simple object providing a strongly-typed storage for a interval between two values.

Note: Once a Clutter::Interval for a specific type has been instantiated the Clutter::Interval value-type property cannot be changed anymore.

Clutter::Interval is used by #ClutterAnimation to define the interval of values that an implicit animation should tween over.

Note: Currently, you cannot subclass a Clutter::Interval to override the interval validation and the value computation; this requires additional support inside the Glib Perl bindings that is not currently available.

HIERARCHY

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Clutter::Interval

METHODS

interval = Clutter::Interval->new ($type, $initial=undef, $final=undef)

  • $type (string)
  • $initial (scalar)
  • $final (scalar)

Creates a new Clutter::Interval, representing an interval of values with the given type

value = $interval->compute_value ($factor)

  • $factor (double)

Computes the value of the interval given the factor

scalar = $interval->get_final_value

Gets the final value of the interval

$interval->set_final_value ($final)

  • $final (scalar)

Sets the final value of the interval

scalar = $interval->get_initial_value

Gets the initial value of the interval

$interval->set_initial_value ($initial)

  • $initial (scalar)

Sets the initial value of the interval

(initial, final) = $interval->get_interval ()

Gets the initial and final values of the interval

$interval->set_interval ($initial, $final)

  • $initial (scalar)
  • $final (scalar)

Sets the initial and final values of the interval. The values must be compatible with the type set when creating the interval itself

boolean = $interval->validate ($pspec)

  • $pspec (Glib::ParamSpec)

string = $interval->get_value_type

Gets the type of the values inside the interval

PROPERTIES

'value-type' (GType : readable / writable / construct-only)
The type of the values in the interval

COPYRIGHT

Copyright (C) 2006, 2007, 2008 OpenedHand Ltd

Copyright (C) 2009 Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU Lesser General Public Library version 2.1; or
  • the Artistic License, version 2.0.

See Clutter for the full copyright notice.