discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question: units of AppKit coordinates.


From: Vaisburd, Haim
Subject: Question: units of AppKit coordinates.
Date: Wed, 15 Oct 2003 16:47:42 -0700

Hello everybody,

AppKit accepts coordinates as floating point numbers.
I have drawn a conclusion that they are probably meant
to be some device-independent units like millimeters
or inches or something alike.

If this is true, fractional values (e.g. 2.05) are valid
and should be kept fractional. It seems to be consistent
with the postscript drawing model.

However, the function NSIntegralRect() suggests that this
is not true, and that the units are pixels that should be
passed to lower level (backend) as integral numbers.

My experience confirms the latter: I'be been getting bugs related
to rounding when I worked with coordinates in resolution-independent
way. But that might be just the current state of the library.

So what are coordinate units by design? What part (an application or
gnustep)
is supposed to take care on proper rounding?

I personally think that device-independent coordinate units (e.g.
centimeters,
or points) is a great idea, but what then does NSIntegralRect()?

Thank you,
Tima.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]