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

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 10 Oct 2006 11:59:51 -0400

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
[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 Tue Oct 10 2006 - 12:00:13 EDT

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