RE: origin: lower left vs lower right
RE: origin: lower left vs lower right
- Subject: RE: origin: lower left vs lower right
- From: Shawn Bakhtiar <email@hidden>
- Date: Thu, 3 Feb 2011 11:28:14 -0500
- Importance: Normal
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSAffineTransform_Class/Reference/Reference.html
NSAffineTransform?
If you read the Drawing and Graphics documents on the developer website, they talks about the view, its bounding box, and how to achieve ANY transformation you need. This is 101 Linear algebra stuff, it doesn't matter where the origin is, (in our limited case) there is some matrix which can transform you to any other space you want/need, and it is doable using the NSAffineTransform.
> From: email@hidden
> Date: Thu, 3 Feb 2011 23:58:46 +0900
> To: email@hidden
> CC: email@hidden
> Subject: Re: origin: lower left vs lower right
>
>
> On Feb 3, 2011, at 8:51 PM, Uli Kusterer wrote:
>
> > On 03.02.2011, at 04:19, Todd Heberlein wrote:
> >> During the recent text orientation/position thread a couple of things caught my attention: (1) the text system seemed designed to have a flipped view (origin in the upper left), and (2) the iOS version of an NSView, the UIView, also has an origin in the upper left.
> >>
> >> If starting some new graphical code for Cocoa (which I may want to port parts of to iOS), is it advisable to use a flipped coordinate system (origin in upper left)? In other words, is "upper left" the origin of the future?
> >
> > It's not a matter of "the future" it is a matter of purpose. Mathematics has traditionally had the origin in the lower left, so if you're working with equations from textbooks, it is more convenient to leave the coordinate system unflipped.
> >
> > However, historically human writing and the Mac user interface have had a top-left to lower-right direction, so if you are laying out lists, or text, or other sequences for humans, it is generally more convenient (and even efficient) to use a flipped coordinate system. Otherwise, if you for example resize a window, you have to manually adjust any content that is aligned with the upper left, because when resizing an unflipped coordinate system, the upper left corner has "moved", even though on a Mac the grow box is in the lower right.
> >
> Not all human writing has a historical root in top-left to lower-right direction!
> In fact one area that is still a weakness, particularly for eBooks, is the lack of vertical top-right to lower-left text views in AppKit and UIKit.
> Literary texts are still written in this form in Japanese and Chinese.
> These writing systems are also not based on the same typographical concepts as western writing systems... they're based on a consistent square for each character.
> So in that regard, the coordinate system is also off.
>
>
> _______________________________________________
>
> 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
_______________________________________________
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