Re: [OpenMap Users] How do I rotate an OMPoly?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 26 Jan 2009 18:21:37 -0500

Hi Pat,

There's really no support built-in for rotating OMPolys, but you can
do that easily by extending OMPoly and overriding the render(Graphics)
method. Create a clone of the Graphics object, rotate it, and then
call super.render(Graphics). Don't forget to dispose of the clone
when you are done.

The only other thing you'll have to decide is where to center the
rotation of the Graphics object, and you can use the location of the
poly for that.

Hope this helps,

Don

On Jan 21, 2009, at 2:11 PM, SlikWilly wrote:

>
> Hi,
>
> I'm drawing a series of OMPoly objects on the map, and I'd like to
> be
> able to rotate them x number of degrees or radians. Is there a way
> to do
> this?
>
> Thanks,
> Pat
> --
> View this message in context: http://www.nabble.com/How-do-I-rotate-an-OMPoly--tp21590099p21590099.html
> Sent from the OpenMap mailing list archive at Nabble.com.
>
> --
> [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"]

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, openmap_at_bbn.com
BBN Technologies, Cambridge MA, USA
http://openmap.bbn.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
[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 Mon Jan 26 2009 - 18:24:22 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT