Last active
April 2, 2016 23:50
-
-
Save zmughal/afb41f40bf8455327529d1b6c99f322b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt-get install gir1.2-clutter-1.0 gir1.2-champlain-0.12 --no-install-recommend | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Modern::Perl; | |
use Glib::Object::Introspection; | |
Glib::Object::Introspection->setup( | |
basename => 'Clutter', | |
version => '1.0', | |
package => 'Clutter', ); | |
Glib::Object::Introspection->setup( | |
basename => 'Champlain', | |
version => '0.12', | |
package => 'Champlain', ); | |
Clutter::init(); | |
# Create the canvas | |
my $stage = Clutter::Stage->new(); | |
$stage->add_child(my $map = Champlain::View->new); | |
$_->set_size(800, 600) foreach $map, $stage; | |
$map->set_kinetic_mode(1); #w/ inertia | |
#$map->set_show_scale(1); | |
# Pin the tail on the donkey | |
$map->set_zoom_level(11); | |
$map->center_on(42.33, -71); | |
# Reveal the results | |
$stage->show_all(); | |
Clutter->main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment