RE: [OpenMap Users] Box shape around OMCircle during selection

From: Alex Yeo <alexyeo_at_stee.stengg.com>
Date: Wed, 11 Oct 2006 23:53:21 +0800

Hi Don,

Thanks for the tip.

Cheers.

Alex


-----Original Message-----
From: Don Dietrick [mailto:dietrick_at_bbn.com]
Sent: Tue 10/10/2006 23:59
To: Alex Yeo
Cc: openMap
Subject: Re: [OpenMap Users] Box shape around OMCircle during selection

Hi Alex,

You could extend OMCircle to create a class that, after generate
(Projection) is called, fetches the bounding box around the shape in
the OMGraphic, and creates an OMRectangle out of those parameters.
Note that the rectangle will be defined in pixel space. If you want
to have the rectangle defined in coordinate space, you could probably
take the pixel extents of the first rectangle, inverse project them
using the Projection object, and then create a lat/lon OMRectangle.
You'd have to call generate(Projection) on that rectangle, though,
and modify your class to paint that OMRactangle in the paint() method.

Hope this helps,

Don

On Oct 10, 2006, at 4:08 AM, Alex Yeo wrote:

> Hi,
>
> I have created an OMGraphicList consisting of an OMCircle and an
> OMText. My intent is to create a box around the selected OMCircle
> (much like when an OMRaster graphic is selected) but not the OMText.
>
> Could anyone please provide a hint to how this is possible? Does it
> have anything to do with the createShape method in the OMGraphic
> class?
>
> Cheers.
>
> Alex



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---




--
[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 Wed Oct 11 2006 - 11:54:31 EDT

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