Re: The syntax of Gnome2::Canvas::Line?
- From: muppet <scott asofyet org>
- To: walt <wa1ter myrealbox com>
- Cc: gtk-perl-list gnome org
- Subject: Re: The syntax of Gnome2::Canvas::Line?
- Date: Sun, 15 Jun 2008 12:18:32 -0400
On Jun 14, 2008, at 2:37 PM, walt wrote:
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.
GnomeCanvas's C API has a Point data structure, and methods to deal
with arrays of these things. In perl, such stuff is really annoying,
because it's much easier and more natural to use native perl arrays
and data structures. So, the bindings map the GnomeCanvasPoint to an
array reference, and the Gnome::Canvas::Points package exists only as
an implementation detail --- it should be hidden from the docs. Oops.
http://gtk2-perl.cvs.sourceforge.net/gtk2-perl/gtk2-perl-xs/GnomeCanvas/xs/GnomeCanvasUtil.xs?revision=1.7&view=markup
If the [] style arrays are giving you trouble, i recommend reading
perlref and the Data Structures Cookbook, perldsc. You really can't
use gtk2-perl effectively without understanding perl data structures
intimately.
--
I've been using emacs for 20+ years and have barely touched lisp. I
wouldn't know lambda calculus if it took all its clothes off and waved
a placard that reads "I am lambda calculus" in blinking 48-point Comic
Sans.
-- Dave Hodgkinson, on london.pm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]