What are those two transforms at different screen resolutions? The API hints
to that they might not always work...
-----Original Message-----
From: Discussion list for Java 2D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Tacci, Florence
Sent: Friday, August 24, 2001 9:07 AM
To: [EMAIL PROTECTED]
Subject: [JAVA2D] User space - device space conversion
Hi everyone,
In the Java 2D API Graphics (Sun microsystems press) book, I have read and
understood (perhaps misunderstood) the conversion from user and device
spaces is resolution independent, and if I draw a line of 1 cm (or whatever
the unit is), changing the output device, and so the resolution, will change
the number of used pixels but not the actual size in units (it should stay
1, approximatively).
In the case I decrease my screen resolution, (so I am not in the situation
described in the book, because I keep the same device with a different
resolution) the line drawn looks longer. My problem is that I would like my
application to be independent of the screen resolution and even more, to
represent the object at the same size on the screen, whatever its resolution
is. I have tried to use the normalizing transform, like described in API :
GraphicsConfiguration gc = g.getDeviceConfiguration();
g.setTransform(gc.getDefaultTransform());
g.transform(gc.getNormalizingTransform());
but when changing my screen resolution, the graphic object size is modified.
Is there a way of keeping an element size on any screen ?
Thanks for your help,
Florence
PS: I am working on NT4.0, with jdk1.3.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".