Re: get size of drawing area
- From: eichin-gtk-perl thok org
- To: "Riswick, J.G.A. van" <J G A v Riswick tue nl>
- Cc: "'Carl Edwards '" <cedwards vitesse com>, "'gtk-perl-list gnome org '" <gtk-perl-list gnome org>
- Subject: Re: get size of drawing area
- Date: 15 Jun 2002 06:11:12 -0400
You may find
my ($alloc_x, $alloc_y, $alloc_w, $alloc_h) = @{$widget->allocation};
(as I suggested not-that-long-ago on this list) clearer, in that it
avoids literal numbers and labels all of the fields (in isolation, the
->[2] and ->[3] look much too magic... it would be more pleasant if
allocations were hashes with named components (after all, in the
underlying C code, they're structs, not arrays), but this suffices
without changing the API.)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]