Hi Kevin,
I appreciate you sending these in, I've updated the code for checkin.
Thanks again for the fixes,
Don
On Fri, Sep 16, 2011 at 4:14 PM, Kevin Grunenberg
<KGrunenberg_at_asascience.com> wrote:
> Don,
> Just wanted to share a problem I found and what I did to fix it.
> The DrawingToolLayer appeared to have a problem rotating text. After looking
> into it the problem was in the EditableOMText class. It was taking the input
> and converting it to Degrees when it was expecting Radians. Then when it
> would display the value for edit it would convert it again (expecting it was
> stored in radians)
> package com.bbn.openmap.omGraphics;
> EditableOMText.java
> ************************
> Change: actionPerformed
> ************************
> text.setRotationAngle(Math.toDegrees(rotation.intValue() % 360));
> To:
> text.setRotationAngle(Math.toRadians(rotation.intValue()));
>
>
> Also there was some funk with the display (if the value was –45 it would
> show –140 ????) that appears to be fixed with the following change
> ************************
> Change: getTextGUI
> ************************
> textField = new JTextField(Integer.toString((int) Math.toDegrees(text
> .getRotationAngle()), 5));
> To:
> textField = new JTextField(String.valueOf((int) Math.toDegrees(text
> .getRotationAngle())), 5);
>
> -- Kevin Grunenberg
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sat Sep 17 2011 - 01:59:04 EDT