Re: GdkRectangle, again

"muppet" <scott asofyet org> writes:

old gtk-perl treated GdkRectangle as a 4-element list in perl.  this made it
very easy to manipulate the contents of the rectangle in perl, and i switched
to this because dealing with a boxed type from perl via member accessor
functions is clumsy.

I personally favored the orthogonality of methods in gtk2-perl,
and that's why we are (were?) using GdkRectangle like all other
Boxed types, with methods to access members. E.g.:

  $pixmap->draw_rectangle ($gc, TRUE,

E.g. even more readable than hash ref thing. There's also
->values so that you can do things like:

my (undef, undef, $w, $h) = $update_rect->values;

Just my personal point of view, of course.

Guillaume Cottenceau -

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