Re: Bounding Rectangle [and data type Rect]
Re: Bounding Rectangle [and data type Rect]
- Subject: Re: Bounding Rectangle [and data type Rect]
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 28 Jul 2002 20:21:07 -0700
On 7/28/02 7:45 PM, "email@hidden" <email@hidden> wrote:
>
Bounding Rectangle (X1,X2,Y1,Y2)
Except it's given in AppleScript as {X1, Y1, X2, Y2}, yes?
>
- where X1 is horizontal pixel count in short int (short
>
integer) from location 0,0 to beginning of bounding_rect;
>
- where X2 is horizontal pixel count in short int from
>
location 0,0 to end of bounding_rect;
>
- where Y1 is vertical pixel count in short int from location
>
0,0 to beginning of bounding_rect;
>
- where Y2 is vertical pixel count in short int from location
>
0,0 to end of bounding_rect.
>
>
Thus X2 - X1 = width in pixels of bounding rect,
>
AND Y2-Y1 = height in pixels of bounding rect,
>
AND (X2-X1) * (Y2 - Y1) = area in pixels of bounding_rect.
>
>
===
>
Now the even simpler answer:
>
>
The concept was that you could call the window manager
>
toolbox handler from a programming language and pass it the
>
four pixel location variables (plus a few others, such as
>
what to name the window and where to store the pointer to
>
this window 'object'), and poof, you have a referenced
>
'floating' window for output or for a dialog box, et
>
cetera, sans all the code to draw it from scratch (thanks
>
Mac Toolbox!). This is part of what made the Mac different
>
from DOS...
>
>
Hope that clarifies the concept
Yes, it does. Thank you, Marc. It seems to indicate that the definition
requires the {x1, y1, x2, y, 2} ordering of left, top, bottom, right , and
that this interpretation is _not_ up to specific implementation: if you say
that you are using 'bounding rectangle' data type as your 'bounds' property,
then it must be given with that specific ordering. That helps. But Emmanuel
caught my point that a scripting language needs to define this somewhere in
it own documentation, and not leave it up to the poor user to dig into
'Inside Macintosh' for a definition expressed in terms totally foreign to
the scripting language and requiring a translation. It should just be
defined and available for perusal, preferably within the scripting
application (Script Editor? - hmm, well, maybe in a later incarnation) but
at least within the official documentation, the ASLG.
Thanks for your detailed response.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.