| Reply | « Previous Thread | Next Thread » |
|
I have made a simple java MIDlet, to draw an analog clock. The clock appeared circular in the 6310i emulator (PC VGA screen is aspect ratio 1:1) but appeared oval in the actual 6310i device. Is there any "official" way to retrieve aspect ratio, so as not to hard-code it inside my software?
|
|
no, the aspect ratio is not retreivable in j2me. (though either basic midp, or nokias extensions)
you would do best assuming the ratio is 1:1 - and live with the distorted shape. |
|
I tried to do the same thing and of course got the same result. After some measuring with a ruler I found out that my circle was exactly 10.0 mm high and 8.5 mm wide.
If you want it to be 10.0 mm wide you have to: 8.5 * x = 10 10 x = -- 8.5 x = 1.17647... (which is the value you shall multiplay x with) Maybe I was a little bit too educational now =) /Bjarne |
|
oops. that didn't look too good but i think you understand =)
..and of course that value is what you should multiply your arc width with, x was not a very good choice of variable name! |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|