Re: The syntax of Gnome2::Canvas::Line?
- From: zentara <zentara1 sbcglobal net>
- To: gtk-perl-list gnome org
- Subject: Re: The syntax of Gnome2::Canvas::Line?
- Date: Sun, 15 Jun 2008 06:49:42 -0400
On Sat, 14 Jun 2008 11:37:04 -0700
walt <wa1ter myrealbox com> wrote:
zentara wrote:
...
I just posted a recent question about making polylines on a Goo::Canvas,
...
Yes, thanks! Without it I don't think I would have found the example I
cited in my question.
Gnome2::Canvas::Line makes it easier by setting the points option as default.
...
my $points = [10,10,100,100,250,50];
my $line2= Gnome2::Canvas::Item->new ($root,
'Gnome2::Canvas::Line',
points => $points,
Hm. That example would have been very helpful if I'd seen it earlier.
I don't see it in the sourceforge online docs -- did you write it yourself?
I took it out of the demo, and modified it. The demos are where
you find the real code examples. I just take what is in the demo, and start
experimenting.... working around error messages, until I find what works.
Speaking of docs, the online docs do refer to Gnome2::Canvas::Points. Does
that imply the existence of a Points.pod file somewhere? I can't find it
anywhere online or in the Canvas tarball.
I havn't seen docs for Gnome2::Canvas::Points. But I would assume it is just
an object wrapper for the array reference of point pairs.
Goo::Canvas has a doc for Points, but it is basically empty. As you can see from my
PolyLine waypoint example, Goo::Canvas::Points is just an object wrapper around
the array_ref. It only has the new method, and dosn't seem to allow modification.
The problem being that a Goo PolyLine needs a Points object to modify the line,
it won't just let you redefine the array_ref. Whereas the Gnome2::Canvas::Line
does allow modification of the array_ref without the object wrapper.
But the Goo is still in development, so I let it slide. :-)
I'm just glad the author has made a Perl module for it.
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/CandyGram_for_Mongo.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]