NAME
Clutter::Ex::Triangle - Basic triangular actor
SYNOPSIS
use Clutter qw( :init );
use Clutter::Ex::Triangle;
my $triangle = Clutter::Ex::Triangle->new();
my $color = Clutter::Color->parse('DarkBlue');
$triangle->set_color($color);
# - or -
my $triangle = Clutter::Ex::Triangle->new_with_color($color);
my $stage = Clutter::Stage->get_default();
$stage->add($triangle);
$triangle->set_reactive(1);
$triangle->signal_connect(clicked => sub { Clutter->main_quit() });
$triangle->show();
Clutter->main();
DESCRIPTION
This page describes the API of Clutter::Ex::Triangle
, a simple actor class providing a triangular shape.
HIERARCHY
Glib::Object
+----Glib::InitiallyUnowned
+----Clutter::Actor
+----Clutter::Ex::Triangle
METHODS
- actor = Clutter::Ex::Triangle->new
-
Creates a new Clutter::Ex::Triangle actor.
- actor = Clutter::Ex::Triangle->new_with_color($color)
-
* $color (Clutter::Color)
Creates a new Clutter::Ex::Triangle with the given color.
- $triangle->set_color($color)
-
* $color (Clutter::Color)
Sets the color of the triangle to color.
- color = $triangle->get_color
-
Retrieves the Clutter::Color used by the triangle.
SIGNALS
- clicked ($triangle)
-
* $triangle (Clutter::Ex::Triangle)
The
clicked
signal is emitted each time the mouse is pressed and then released within the actor's area.
PROPERTIES
SEE ALSO
Clutter, Glib::Object, Glib::InitiallyUnowned, Clutter::Actor
COPYRIGHT
Copyright (C) 2007 OpenedHand Ltd.
This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1, or under the terms of the Artistic License. See Clutter for the full copyright notice.