Re: Subview frames and bounds
Re: Subview frames and bounds
- Subject: Re: Subview frames and bounds
- From: Andy Lee <email@hidden>
- Date: Mon, 3 Nov 2008 09:13:55 -0500
On Nov 3, 2008, at 8:57 AM, Andy Lee wrote:
At the risk of confusing things, let me try a metaphor. I live in a
city with streets on a grid, and I live on 14th Street and 8th
Avenue. Can you tell me right now -- how far is 16th Street and 6th
Avenue, and in which direction? Is it north, south, east, west, or
some combination? Obviously you can't answer without additional
information. It depends on where "Zero'th" Street and "Zero'th"
Avenue are in my particular city, and which direction the city
planners happened to orient the streets and avenues, and how far
apart the streets and avenues are spaced.
Same with coordinate systems. You have to understand which
coordinate system you're using and where (0, 0) is and in which
direction x and y go in that coordinate system.
Also, you can think of the earth as a "superview" of my city [1], with
a different coordinate system, namely latitude and longitude. In the
city's coordinate system, my coordinates are (8, 14), and the NSRect
describing my block is (8, 14, 1, 1). In the earth's coordinate
system, the coordinates and NSRect are completely different for the
same exact city block.
--Andy
[1] The fact that I think this way should be a clue to which city I
live in. :)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden