Hei Tomas,
you are correct.
The java method to receive the screen resolution is:
double SCREENRES = Toolkit.getDefaultToolkit().getScreenResolution();
as far as i understood this method delivers the correct resolution (i.e.
72dpi or 96dpi or.. ). so i hope your concern is addressed. Although I
suppose that an on-screen calibration may be best.
stefan
Tomáš Brunclík schrieb:
The math is correct, but it assumes every display/monitor has the 96 dpi
resolution, which is not true. With classic monitors the resolution
slightly changes even with changes of monitor image size you can do with
front panel buttons usually, not to mention using different monitor modes..
There should be a configuration dialog to put the real resolution of the
display, or even better a simple way to do calibration. Something
similar to screen resolution calibration in GIMP would do. In GIMP it
works that way: user can directly measure a horizontal line of specific
length in screen pixels (drawn on the screen by the calibration dialog)
and then informs the program how long the line was. The calibration
program can compute real horizontal screen resolution from this
information. And only with real display resolution you can have real
scale of the map on your display...
And a scale of a printout on paper is another story. It should not be
the same as on the screen generally, because the maps on screen and on
paper have very likely different size each.
Best regards,
Tomas B.
-------- Original-Nachricht --------
Betreff: Re: [JPP-Devel] Scale
Datum: Sat, 18 Aug 2007 10:10:40 -0500
Hi Uwe,
There are two kinds of scale in JUMP. The internal scale is given by:
internalScale = ModeViewWidth / PixelViewWidth. (typically units of
meters/pixel)
The internalScale is used to transform distance between model space
and screen space (at a particular view's zoom level) via a simple
multiplication or division.
Stefan modified the Change Style>Scale panel to compute a new display
scale in late 2005 he called real scale. He used:
realScale = ModeViewWidth * 100 / (INCHTOCM / SCREENRES *
PixelViewWidth)
This is basically the same equation with the conversion from pixel
size to model units factored in. When a new project window is first
created, the internalScale will be 1 and every pixel will be one model
unit wide. The realScale will be 3779.527559055118 or approximately
3780 as you reported (given a SCREENRES of 96 and an INCHTOCM of
2.54).
Of course, a scale expressed as a ratio of 1:3780 means that one
unit on the map represents 3780 units on the ground. So if we were to
print out the new project window as it was first opened, we would see
that one cm on the paper would be equivalent to 3780 cm or 37.8 m in the
real world. This, of course, assumes that Stefan's math is correct.
:-)
regards,
Larry Becker
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users