Raster layer opacity

Bernhard Herzog bh at intevation.de
Fri Apr 29 12:21:03 CEST 2005


Sorry for getting back to this so late, but I don't have as much time
for Thuban as I would like.

Jonathan Coles <jonathan at jpcoles.com> writes:

> I've just commited changes that allow the opacity of a raster layer to
> be changed. Previously, (in anticipation of these changes) a raster
> layer had an opacity property but it was not used. I've added a new
> control to the layer properties box for raster layers. The level is then
> used in MapRenderer.draw_raster_data() to scale the alpha values to the
> proper opacity. 
>
> I chose to implement the scaling in MapRenderer.draw_raster_data() as
> opposed to BaseRenderer.draw_raster_layer() because doing the scaling
> late in the rendering process allows for all types of raster layer
> formats to be adjusted, not just those that are handled in
> BaseRenderer.draw_raster_layer(). This decision, however, required that
> I add the layer to the parameter list of
> MapRenderer.draw_raster_data(). 

I don't see why you need to add the layer itself.  The opacity value
would have sufficed.  So far the draw_raster_data implementations had no
need to know about layers.  They only needed to know about raster data
rendering.  I think it should stay that way.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                           http://skencil.org/
Thuban                                  http://thuban.intevation.org/




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)