jonathan: thuban/Thuban/Model load.py,1.54,1.55

cvs@intevation.de cvs at intevation.de
Fri May 6 16:17:05 CEST 2005


Author: jonathan

Update of /thubanrepository/thuban/Thuban/Model
In directory doto:/tmp/cvs-serv30172/Thuban/Model

Modified Files:
	load.py 
Log Message:
(SessionLoader.start_rasterlayer): Added code to read the opacity and mask 
type of the layer and construct a new layer with the additional parameters.


Index: load.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/Model/load.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- load.py	28 Jan 2005 15:54:00 -0000	1.54
+++ load.py	6 May 2005 14:17:03 -0000	1.55
@@ -508,8 +508,17 @@
         filename = os.path.join(self.GetDirectory(), filename)
         filename = self.encode(filename)
         visible  = self.encode(attrs.get((None, 'visible'), "true")) != "false"
+        opacity  = float(attrs.get((None, 'opacity'), "1"))
+        masktype = str(attrs.get((None, 'masktype'), "bit"))
 
-        self.aLayer = layer_class(title, filename, visible = visible)
+        masktypes = {"none": layer_class.MASK_NONE,
+                     "bit":  layer_class.MASK_BIT,
+                     "alpha": layer_class.MASK_ALPHA}
+
+        self.aLayer = layer_class(title, filename, 
+                                  visible = visible,
+                                  opacity = opacity,
+                                  masktype = masktypes[masktype])
 
     def end_rasterlayer(self, name, qname):
         self.aMap.AddLayer(self.aLayer)





More information about the Thuban-devel mailing list

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