为什么Java 2D起源位于左上角? [英] Why Java 2D origin is at the top left corner?

查看:114
本文介绍了为什么Java 2D起源位于左上角?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不抱怨,只是想知道。为什么Java使用绘图表面的左上角作为原点?我认为更自然的是选择左下角作为原点,并增加轴线(类似于Quartz)。

计算机图形学自诞生以来就有了左上角的起源,并且包含了QuickDraw。使用左下角(如数学)是一个PostScript / PDF的东西。由于Quartz基于PDF,因此它使用它的坐标,但这主要是图形库中唯一的决定。


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).

解决方案

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.

这篇关于为什么Java 2D起源位于左上角?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆