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

后端 未结 10 805
我寻月下人不归
我寻月下人不归 2021-01-04 23:19

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

相关标签:
10条回答
  • 2021-01-05 00:08

    It also has the benefit of being similar to 2-D arrays in programs, where [0][0] refers to the upper-left element.

    0 讨论(0)
  • 2021-01-05 00:12

    probably came from television standard, where scan starts from top to bottom.

    0 讨论(0)
  • 2021-01-05 00:14

    Just an implementation choice. Screen coordinates in windows and other OS are given the same way, so I am guessing they chose that to be consistent with the OS's choice, which is likely a legacy thing.

    0 讨论(0)
  • 2021-01-05 00:16

    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.

    0 讨论(0)
提交回复
热议问题