Gnome canvas example?



Hi all,

Are there some better examples than those on developer.gnome.org?  The
ones (Piskvorky, etc..) show don't help me out here.

I'm parsing through the gnome-canvas example included with the library
... the arrowhead one to be specific.

Can someone fill me on in how this works (taken from the arrowhead
example):

 points = gnome_canvas_points_new (2);
 points->coords[0] = LEFT;
 points->coords[1] = MIDDLE;
 points->coords[2] = RIGHT;
 points->coords[3] = MIDDLE;

 item = gnome_canvas_item_new (root,
          gnome_canvas_line_get_type (),
          "points", points,
          "fill_color", "mediumseagreen",
          "width_pixels", DEFAULT_WIDTH * 10,
          "last_arrowhead", TRUE,
          NULL);

The coordinates are 1 dimensional!  So how does this draw a 2D arrow?
I'm sure it happens elsewhere in the code, but still.  Seems a bit odd.
No X/Y concept here.  I don't see any reference to "ponts" as part of
the line item in the GNOME reference guide either.

Also ... I can't find a complete ref. for args to
gnome_canvas_item_new.  It seems some are reserved (like points?) while
others you can define yourself.

Similarly for gnome_canvas_points_new().  Can't find any docs for it.

I'd love to start using more GNOME code but this kind of omission from
docs makes it really hard.

Help?!?!?

DT
--
Technical Director - Virginia Center for Computer Music
http://www.people.virginia.edu/~djt7p





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