Re: [gtk-list] Re: GnomeCanvas widget



KC5TJA <kc5tja@topaz.axisinternet.com> writes:

> What's the difference between a canvas and a drawing area, in this sense?
> I'm getting confused.  Why not just use a drawing area?
> 
> Thanks for the clarification.

The Tk canvas is essentially a (limited) object oriented (as
opposed to pixel-based) drawing program in a widget.  So you can
create circle objects, and line objects, and text objects, and then
move them around, change their layering order, tag collections of them
and refer to these collections as a "grouped" object, etc.  It also
supports dumping any of it's contents to a postscript string.

A drawing area on the other hand is just a widget that lets you do
whatever you want in its window.  You could build a canvas widget on
top of a drawing area widget, bit a drawing area widget is far more
primitive.

-- 
Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30



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