jonathan: thuban/Thuban/Model save.py,1.44,1.45
cvs@intevation.de
cvs at intevation.de
Fri May 6 16:17:31 CEST 2005
Author: jonathan
Update of /thubanrepository/thuban/Thuban/Model
In directory doto:/tmp/cvs-serv30190/Thuban/Model
Modified Files:
save.py
Log Message:
(SessionSaver.write_layer): Added code to save the opacity and mask type of a
layer.
Index: save.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/Model/save.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- save.py 27 Apr 2005 11:05:19 -0000 1.44
+++ save.py 6 May 2005 14:17:29 -0000 1.45
@@ -303,6 +303,15 @@
self.close_element("layer")
elif isinstance(layer, RasterLayer):
attrs["filename"] = self.prepare_filename(layer.filename)
+
+ masknames = ["none", "bit", "alpha"]
+
+ if layer.MaskType() != layer.MASK_BIT:
+ attrs["masktype"] = masknames[layer.MaskType()]
+
+ if layer.Opacity() != 1:
+ attrs["opacity"] = str(layer.Opacity())
+
self.open_element("rasterlayer", attrs)
self.write_projection(layer.GetProjection())
self.close_element("rasterlayer")
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)