pixel to inch/cms conversion ...

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

pixel to inch/cms conversion ...

Postby pphiremath » Wed Oct 11, 2006 5:50 pm

I am working on a ruler/scale that can be embeded inside scrollpane to track the mouse position on the document inside its viewport.

I am new to jide, I just want to know if there already was some widget that does something similar to this or some utility method that gives me a correct mapping from a pixel to inches/cms considering the current resolution of the screen.

Thanks.
pphiremath
 
Posts: 2
Joined: Tue Oct 10, 2006 1:36 pm

Postby JIDE Support » Wed Oct 11, 2006 5:54 pm

No, we dont' have it. Sounds like an interesting component. If you made, maybe you can use it to exchange for a free JIDE license.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby Walter Laan » Thu Oct 12, 2006 1:03 am

We made a simple ruler based on Swing scroll demo, see Rule.java there.

Note that java Graphics assumes 72dpi, usually ignoring the OS/desktop dpi settings. So we just hardcoded the pixels per cm to
private static final double PPC = 28.3464; // pixels per centimer
Walter Laan
 
Posts: 383
Joined: Mon May 01, 2006 12:13 am

Postby JIDE Support » Thu Oct 12, 2006 7:09 am

Thanks for the link, Walter.

pphiremath, this demo should give you a good starting point.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 107 guests