Clutter::Ex::Triangle - Basic triangular actor
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();
This page describes the API of Clutter::Ex::Triangle , a simple actor class providing a triangular shape.
Clutter::Ex::Triangle
Glib::Object +----Glib::InitiallyUnowned +----Clutter::Actor +----Clutter::Ex::Triangle
Creates a new Clutter::Ex::Triangle actor.
* $color (Clutter::Color)
Creates a new Clutter::Ex::Triangle with the given color.
Sets the color of the triangle to color.
Retrieves the Clutter::Color used by the triangle.
* $triangle (Clutter::Ex::Triangle)
The clicked signal is emitted each time the mouse is pressed and then released within the actor's area.
clicked
Color of the triangle
Clutter, Glib::Object, Glib::InitiallyUnowned, Clutter::Actor
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.
To install Clutter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clutter
CPAN shell
perl -MCPAN -e shell install Clutter
For more information on module installation, please visit the detailed CPAN module installation guide.