Re: [OpenMap Users] RepaintPolicy in handler and individual layer s..

From: Don Dietrick <dietrick@bbn.com>
Date: Fri May 28 2004 - 17:11:26 EDT

Hi Brian,

Good explaination.

It's probably a good idea if we modified BufferedImageRenderPolicy to
extend the RenderingHintsRenderPolicy. I think it's simply a matter of
modifying BufferedImageRenderPolicy to call super.setRenderingHints(g)
before painting into the Graphics object in
BufferedImageRenderPolicy.paint(g).

Then, if you don't set the properties for rendering hints in your
BufferedImageRenderPolicy, it would act the same way as it does now.
But, you could set rendering hints as you wanted as well as buffering.

I originally wanted the RenderingPolicy objects to be chainable, but
there started to be a lot of cases where they would have to be called
in specific ways - the RenderingPolicies have dependencies I couldn't
code out or make more generic, so I left open the option of being able
to define new RenderPolicies and include them in the properties file.

I figure there could be a transparency rendering policy (which you
could embed into the BufferedImageRenderPolicy) and a shadow rendering
policy, among others, that would be really handy at some point.

- Don

On May 28, 2004, at 4:46 PM, Hudson Brian R Contr AFRL/IFSF wrote:

> Hello,
>  
> The graphics that your ShapeLayers are drawn too will be modified only
> by the BuferedImageRenderPolicy because the layer RenderPolicies
> override map wide RenderPolicies.
>  
> If I understand you correctly, you want to have both RenderPolicies
> affect your layer. This isn't possible given how the RenderPolicies
> work. RenderPolices actually paint to the graphics so if you have
> modified the code in someway to apply two RenderPolices, that is why
> it is drawing twice.
>  
> I would suggest writing a BufferedImageRenderingHintsRenderPolicy,
> combining the capabilities of both rendering policies.
>  
> Hope this helps,
>  
> Brian Hudson
>  
> -----Original Message-----
> From: owner-openmap-users@bbn.com [mailto:owner-openmap-users@bbn.com]
> On Behalf Of Alex Firth
> Sent: Friday, May 28, 2004 4:11 PM
> To: openmap-users@bbn.com
> Subject: [OpenMap Users] RepaintPolicy in handler and individual
> layers..
>
> If I add a repaint policy com.bbn.openmap.HintsMapBeanRepaintPolicy to
> my maphandler, using the following properties
> repaintPolicy.renderingHints=KEY_ANTIALIASING
> repaintPolicy.KEY_ANTIALIASING=VALUE_ANTIALIAS_ON
> repaintPolicy.KEY_RENDERING=VALUE_RENDER_SPEED
>  
> And then in a layer i want to use
> com.bbn.openmap.layer.policy.BufferedImageRenderPolicy
> as the renderr policy for that layer. 
>  
> When i do this it doesn't have the desired effect, it seems like the
> image is drawn twice, once for the first one and then overwritten by
> the buffered image.  Is there a way to get the antialiasing in the
> BufferedImageRenderPolicy?   I am using ShapeLayers since
> BufferedShapeLayer is slower and doesn't seem to draw my layers
> correctly.
>  
> I hope I was clear in explaining this problem :)
>  
>  
> Alex
>  
>  
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 28 17:11:55 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT