Skip to content

Instantly share code, notes, and snippets.

@zmughal
Last active April 2, 2016 23:50
Show Gist options
  • Save zmughal/afb41f40bf8455327529d1b6c99f322b to your computer and use it in GitHub Desktop.
Save zmughal/afb41f40bf8455327529d1b6c99f322b to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo apt-get install gir1.2-clutter-1.0 gir1.2-champlain-0.12 --no-install-recommend
#!/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