Re: [OpenMap Users] BufferedMapBean paintChildren..

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 12 Sep 2006 17:34:46 -0400

Hi Stephane,

You should probably create a copy of the Graphics object in your
PaintListener before changing the stroke settings in it. You can call

graphics.create();

to do this.

Regards,

- Don


On Sep 11, 2006, at 8:00 AM, Stéphane Wasserhardt wrote:

> Hi !
>
> At the end of the BufferedMapBean's painting process, the
> paintListeners are notified so that they can paint on the MapBean's
> graphics, then a last "paintBorder" call is done.
> But the Graphics object's state may have been changed by one of the
> paint listeners !
> So the border will be painted using the changed state.
>
> For instance, I have a mouseMode which is a paintListener, and
> which draws rectangles in its listenerPaint method. These
> rectangles are OMRects with a particular stroke.
> When this mouseMode is the last paintListener to receive the
> listenerPaint call, the graphic's stroke keeps being the one used
> for the rectangles ! That's why the paintBorder method of the
> mapBean will paint the border using this stroke !
>
> There should be something to store and restore the graphics state
> somewhere !!
> I think this should be in the mapBean's paintChildren method... But
> the right thing to do may be something else! Can someone help me ?
> Thanks a lot again !
>
> Stephane
>
> --
> [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, 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 Sep 12 2006 - 17:36:35 EDT

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