Subject: | Gnome2-Canvas - large rectangles are broken? |
Date: | Sat, 20 Jan 2007 03:06:28 +0300 (MSK) |
To: | bug-Gnome2-Canvas [...] rt.cpan.org |
From: | Dmitry Samborsky <samborsky_d [...] yahoo.com> |
Hello,
I've found rather strange malfunction of the Gnome canvas.
If I modify canvas.pl demo enlarging "mediumseagreen" rectangle
to ~33000 width it just becomes broken. See the attached patch to
the canvas-primitives.pl file.
I've tried to reproduce the same bug in C, but I didn't succeed
in that (the rectangle was drawn properly).
Apparently, this is a problem of Perl XS interface?
Many thanks in advance!
Best Regards,
Dmitry Samborskiy
P.S. Below there is some info about my test environment.
I took the most recent CPAN modules in order to check that the problem
is not solved yet.
This is output from 'perl canvas.pl' (see below the version output):
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion
`g_type_from_name (name) == 0' failed at canvas-primitives.pl line 470.
GLib-GObject-CRITICAL **: g_param_spec_boxed: assertion `G_TYPE_IS_BOXED
(boxed_type)' failed at canvas-primitives.pl line 470.
GLib-GObject-CRITICAL **: g_object_class_install_property: assertion
`G_IS_PARAM_SPEC (pspec)' failed at canvas-primitives.pl line 470.
GLib-GObject-WARNING **: IA__g_object_set_valist: object class
`GnomeCanvasBpath' has no property named `bpath' at canvas-primitives.pl line
475.
GLib-GObject-WARNING **: IA__g_object_set_valist: object class
`GnomeCanvasBpath' has no property named `bpath' at canvas-primitives.pl line
475.
Gtk2::VERSION = 1.141, Glib::VERSION = 1.142
Gnome2::VERSION = 1.041, Gnome2::Canvas::VERSION = 1.002
Gtk2::VERSION = 1.141, Glib::VERSION = 1.142
Gnome2::VERSION = 1.041, Gnome2::Canvas::VERSION = 1.002
I use Fedora Core 4.
My Gtk/Gnome libs versions are (libgnomecanvas RPM was
built from SRPM by myself):
$ rpm -q gtk2 glib2 libgnome libgnomecanvas
gtk2-2.6.10-2.fc4.4
glib2-2.6.6-1
libgnome-2.10.0-3
libgnomecanvas-2.14.0-4.1
Show quoted text
________________________________________________________
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com
--- canvas-primitives.pl.orig 2004-03-21 07:16:47.000000000 +0300
+++ canvas-primitives.pl 2007-01-20 02:37:23.000000000 +0300
@@ -167,7 +167,7 @@
'Gnome2::Canvas::Rect',
x1 => 90.0,
y1 => 40.0,
- x2 => 180.0,
+ x2 => 33000.0, # that triggers a bug, rectangle is broken!
y2 => 100.0,
fill_color => "mediumseagreen",
fill_stipple => $stipple,
@@ -557,9 +557,14 @@
return TRUE;
}
+use Gnome2;
+
sub create {
my $aa = shift;
+ printf "Gtk2::VERSION = %s, Glib::VERSION = %s\nGnome2::VERSION = %s, Gnome2::Canvas::VERSION = %s\n",
+ $Gtk2::VERSION, $Glib::VERSION, $Gnome2::VERSION, $Gnome2::Canvas::VERSION;
+
my $vbox = Gtk2::VBox->new (FALSE, 4);
$vbox->set_border_width (4);
$vbox->show;
@@ -647,7 +652,7 @@
$frame->show;
$canvas->set_size_request (600, 450);
- $canvas->set_scroll_region (0, 0, 600, 450);
+ $canvas->set_scroll_region (0, 0, 600000, 6000);
$frame->add ($canvas);
$canvas->show;