Gnome canvas problem on Ubuntu



Hi All

I don't seem to be able to use bezier path objects with the packaged
version of Gnome2::Canvas in Ubuntu 5.10 ('Breezy').  For example, this
test script should display a blue semi-circle:

  #!/usr/bin/perl

  use strict;
  use warnings;

  use Gtk2 '-init';
  use Gnome2::Canvas;

  my $width  = 200;
  my $height = 100;

  my $window = Gtk2::Window->new;
  $window->signal_connect('delete-event' => sub { Gtk2->main_quit; });
  $window->set_default_size($width, $height);

  my $canvas = Gnome2::Canvas->new_aa();
  my $root   = $canvas->root();

  my $shape = Gnome2::Canvas::Item->new(
      $root,
      'Gnome2::Canvas::Bpath',
      outline_color => 'white',
      fill_color    => 'steelblue',
  );

  $shape->set_path_def(semi_circle_path());

  $window->add($canvas);
  $window->show_all;

  Gtk2->main;

  sub semi_circle_path {
      my $p = Gnome2::Canvas::PathDef->new;
      $p->moveto(180, 80);
      $p->lineto(20, 80);
      $p->curveto(
        20, -26,
        180, -26,
        180, 80
      );
      $p->closepath;

      return $p;
  }

Instead, the following errors are output and nothing is displayed on the
canvas:

GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion
`g_type_from_name (name) == 0' failed at ./beziertest.pl line 19.
GLib-GObject-CRITICAL **: g_param_spec_boxed: assertion `G_TYPE_IS_BOXED
(boxed_type)' failed at ./beziertest.pl line 19.
GLib-GObject-CRITICAL **: g_object_class_install_property: assertion
`G_IS_PARAM_SPEC (pspec)' failed at ./beziertest.pl line 19.
GLib-GObject-WARNING **: IA__g_object_set_valist: object class
`GnomeCanvasBpath' has no property named `bpath' at ./beziertest.pl line
26.

/usr/lib/perl5/Gnome2/Canvas.pm contains this version information:

# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/GnomeCanvas/Canvas.pm,v 1.22
2004/08/16 02:13:21 muppetman Exp $

...

our $VERSION = '1.002';


The package manager says I have version 2.12.0 of libgnomecanvas.  On my
Debian Sarge system (which doesn't have the problem) I have version
2.8.0.  Does this suggest an API change in the underlying library?


I've tried building gtk2-perl-xs/GnomeCanvas from source and get the
same problem.

Can anyone make any sense of the error messages and offer hints on a
next step?

Cheers
Grant




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]