Re: How to properly flip a UIView's coordinate system
Re: How to properly flip a UIView's coordinate system
- Subject: Re: How to properly flip a UIView's coordinate system
- From: David Rowland <email@hidden>
- Date: Sun, 22 Sep 2013 08:18:17 -0700
On Sep 22, 2013, at 4:20 AM, Dave <email@hidden> wrote:
>
> On 21 Sep 2013, at 21:38, Markus Spoettl <email@hidden> wrote:
>
>> Hi,
>>
>> I have a UIView on iOS that shares (a lot of) code with an NSView I have on OSX. That code relies on a LLO (lower left origin) coordinate system and it's not an option to change that.
>
> I'm in a similar position, in fact I have a lot of code that is ULO based and a lot of code that is LLO based. If I has only a single wish that would enable me to change something about Cocoa it would be that it always ULO or as a second wish that iOS used LLO as well.
>
> I'd really like to know why LLO was chosen for the Mac in the first place, and, why in iOS they chose to do the opposite?
>
> Anyone understand why/how this happened?
The earliest interface was the Teletype machine. It used a roll of low-grade paper and could print 80 characters on one line. Carriage return moved the print head to the first column, line feed moved the paper up one line.
The first electronic terminals were often "glass teletypes" with 80 columns and 24 rows. The cursor could be placed anywhere, and the convention was line 1 at the top and line 24 at the bottom. I believe that is where the inverted coordinates began. Bitmapped screens mimicked the TTY. Later creations like OpenGL respected the older, mathematical model, and we are now caught between.
David
_______________________________________________
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