jonathan: thuban/Thuban/UI baserenderer.py,1.19,1.20
cvs@intevation.de
cvs at intevation.de
Fri May 6 16:18:02 CEST 2005
Author: jonathan
Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv30202/Thuban/UI
Modified Files:
baserenderer.py
Log Message:
(BaseRenderer.draw_raster_layer): Pass the opacity of the layer to
draw_raster_data rather than the layer.
(BaseRenderer.draw_raster_data): Remove the layer parameter because the
function doesn't need to know about the layer. Add the optional opacity
parameter whose default is 1.0. Add 'PNG' as a supported graphics format.
Index: baserenderer.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/baserenderer.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- baserenderer.py 23 Mar 2005 15:30:27 -0000 1.19
+++ baserenderer.py 6 May 2005 14:18:00 -0000 1.20
@@ -488,8 +488,8 @@
if img_data is not None:
data = (width, height, img_data)
- self.draw_raster_data(layer, fmin[0]+offx, offy-fmax[1],
- data, "RAW")
+ self.draw_raster_data(fmin[0]+offx, offy-fmax[1],
+ data, format="RAW", opacity=layer.Opacity())
data = None
def projected_raster_layer(self, layer, srcProj, dstProj, extents,
@@ -523,8 +523,8 @@
raise NotImplementedError
- def draw_raster_data(self, layer, x, y, data, format="BMP"):
- """Draw the layer's raster image held in data onto the DC with the top
+ def draw_raster_data(self, x, y, data, format="BMP", opacity=1.0):
+ """Draw a raster image held in data onto the DC with the top
left corner at (x,y)
The raster image data is a tuple of the form
@@ -541,7 +541,10 @@
The following format names should be used:
'RAW' -- an array of RGB values (len=3*width*height)
+ 'PNG' -- Portable Network Graphic (transparency supported)
'BMP' -- Windows Bitmap
+ 'TIFF' -- Tagged Image File Format
+ 'GIF' -- GIF Image
'JPEG' -- JPEG Image
The default format is 'BMP'.
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)