Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Java 2D origin is at the top left corner?

Tags:

java

graphics

I'm not complaining, just wonder. Why Java use top left point of the drawing surface as origin? I assume more natural is to choose left bottom corner as origin and increase axis as they go up and right (similar to Quartz).

like image 814
Gunnar Schigel Avatar asked Mar 15 '11 02:03

Gunnar Schigel


1 Answers

Computer graphics has had the origin in the upper left since the dawn of time, with QuickDraw included. Using the lower left (as in math) is a PostScript/PDF thing. Since Quartz is based on PDF, it uses its coordinates, but that is mostly a unique decision among graphics libraries.

like image 91
Josh Lee Avatar answered Nov 03 '22 01:11

Josh Lee