On Sep 23, 2013, at 8:07 PM, Peter Teeson wrote: > On 2013-09-23, at 1:08 PM, Gary L. Wade wrote: >> What I believe you're wanting to know is that cells in a matrix >> have their row-column coordinates start from the top left, >> so the cell at (0,0) is in the top left of its enclosure matrix and the cell >> at row 1 column 0 is below it. > > Thanks but not really - that is what's happening but not my question.
I suspect that Gary is on point and you're not following his point. > The docs say > "By default, the graphics environment origin (0.0,0.0) is located in the > lower left,…." page 11 > "The window instance maintains a reference to a single top-level view > instance, call the content view. > "The content view acts as the root of the visible view hierarchy in a > window." Page 17 > > If you look at the code I posted along with my comments you will see that > I get the windows content view frame, inset it and use that as the matrix > frame. > (The matrix is also a View per NSMatrix docn) > > It's values happen to be 0, 0, 500, 500 and, based on the documentation I > quoted, > I anticipated that it would draw from the lower left of the content view. > It doesn't! It draws from the top left of the content view (which is a View > per NSWindow docn) The docs you've cited don't say anything about where a view will "draw". It describes its coordinate system. The matrix is free to draw the (row == 0, col == 0) cell at view coordinates (x == 5, y == 480) in order to get it to appear at the top left, if that's what it wants to do. > Why is that? What am I not understanding? > Why does the docn say one thing but the Cocoa code, (i.e. not my code) do > something different? If the above still doesn't explain what you're seeing, then you're going to have to provide a picture of what's happening vs. what you expect to happen. Regards, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com