jonathan: thuban ChangeLog,1.809,1.810

cvs@intevation.de cvs at intevation.de
Fri May 6 16:20:22 CEST 2005


Author: jonathan

Update of /thubanrepository/thuban
In directory doto:/tmp/cvs-serv30272

Modified Files:
	ChangeLog 
Log Message:
Add support for saving and loading the opacity and mask type properties of 
RasterLayers. Also add support for proper use of alpha information while 
drawing images not in 'RAW' format.  If transparency in an image format 
(e.g, PNG) is supported by wxWidgets then the image would previously have been 
draw with transparent regions, but the opaque regions would have been 
unaffected by a change in the layer's opacity. This patch corrects the problem.


Index: ChangeLog
===================================================================
RCS file: /thubanrepository/thuban/ChangeLog,v
retrieving revision 1.809
retrieving revision 1.810
diff -u -d -r1.809 -r1.810
--- ChangeLog	2 May 2005 18:59:41 -0000	1.809
+++ ChangeLog	6 May 2005 14:20:20 -0000	1.810
@@ -1,3 +1,51 @@
+2005-05-06  Jonathan Coles <jonathan at intevation.de>
+
+	Add support for saving and loading the opacity and mask type
+	properties of RasterLayers. Also add support for proper use
+	of alpha information while drawing images not in 'RAW' format.
+	If transparency in an image format (e.g, PNG) is supported by
+	wxWidgets then the image would previously have been draw with 
+	transparent regions, but the opaque regions would have been 
+	unaffected by a change in the layer's opacity. This patch
+	corrects the problem.
+
+	* Thuban/Model/layer.py (RasterLayer): Added opacity and
+	masktype parameters to the constructor, and set the
+	appropriate variables to those values.
+
+	* Thuban/Model/load.py (SessionLoader.start_rasterlayer): Added
+	code to read the opacity and mask type of the layer and construct
+	a new layer with the additional parameters.
+
+	* Thuban/Model/save.py (SessionSaver.write_layer): Added code
+	to save the opacity and mask type of a layer.
+
+	* Thuban/UI/baserenderer.py (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.
+
+	* Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Fixed
+	signature to match that in BaseRenderer. Use the new opacity argument
+	in place of calling layer.Opacity(). In the case where the
+	format is not 'RAW', alpha_data is None and the loaded image has
+	alpha information, use the file's alpha information. This is
+	still subject to the layer's opacity setting.
+
+	* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): 
+	Fixed signature to match that in BaseRenderer.
+
+	* test/test_load.py (TestRasterLayer): Change file_contents to
+	include opacity and masktype variables.
+	(TestRasterLayer.test): Include tests for opacity and masktype
+	changes.
+
+	* test/test_save.py (SaveSessionTest.testRasterLayer): Restructure
+	test to cover a variety of combinations of masktype and opacity
+	settings.
+
 2005-05-02  Jan-Oliver Wagner <jan at intevation.de>
 
 	* debian/rules: add --use-wx-python-swig-hack





More information about the Thuban-devel mailing list

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