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

后端 未结 10 809
我寻月下人不归
我寻月下人不归 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

    With the right hand coordinate system, when X and Y are placed at the top-left corner, Z goes into the screen. Graphics engine can now know the points which are away from screen ... larger the Z further away the points are .... very useful in rendering multiple objects placed in space and some objects are hiding others ...

提交回复
热议问题