1 |
|
2005-05-06 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
Add support for saving and loading the opacity and mask type |
4 |
|
properties of RasterLayers. Also add support for proper use |
5 |
|
of alpha information while drawing images not in 'RAW' format. |
6 |
|
If transparency in an image format (e.g, PNG) is supported by |
7 |
|
wxWidgets then the image would previously have been draw with |
8 |
|
transparent regions, but the opaque regions would have been |
9 |
|
unaffected by a change in the layer's opacity. This patch |
10 |
|
corrects the problem. |
11 |
|
|
12 |
|
* Thuban/Model/layer.py (RasterLayer): Added opacity and |
13 |
|
masktype parameters to the constructor, and set the |
14 |
|
appropriate variables to those values. |
15 |
|
|
16 |
|
* Thuban/Model/load.py (SessionLoader.start_rasterlayer): Added |
17 |
|
code to read the opacity and mask type of the layer and construct |
18 |
|
a new layer with the additional parameters. |
19 |
|
|
20 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Added code |
21 |
|
to save the opacity and mask type of a layer. |
22 |
|
|
23 |
|
* Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Pass |
24 |
|
the opacity of the layer to draw_raster_data rather than the layer. |
25 |
|
(BaseRenderer.draw_raster_data): Remove the layer parameter because |
26 |
|
the function doesn't need to know about the layer. Add the optional |
27 |
|
opacity parameter whose default is 1.0. Add 'PNG' as a supported |
28 |
|
graphics format. |
29 |
|
|
30 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Fixed |
31 |
|
signature to match that in BaseRenderer. Use the new opacity argument |
32 |
|
in place of calling layer.Opacity(). In the case where the |
33 |
|
format is not 'RAW', alpha_data is None and the loaded image has |
34 |
|
alpha information, use the file's alpha information. This is |
35 |
|
still subject to the layer's opacity setting. |
36 |
|
|
37 |
|
* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): |
38 |
|
Fixed signature to match that in BaseRenderer. |
39 |
|
|
40 |
|
* test/test_load.py (TestRasterLayer): Change file_contents to |
41 |
|
include opacity and masktype variables. |
42 |
|
(TestRasterLayer.test): Include tests for opacity and masktype |
43 |
|
changes. |
44 |
|
|
45 |
|
* test/test_save.py (SaveSessionTest.testRasterLayer): Restructure |
46 |
|
test to cover a variety of combinations of masktype and opacity |
47 |
|
settings. |
48 |
|
|
49 |
2005-05-02 Jan-Oliver Wagner <[email protected]> |
2005-05-02 Jan-Oliver Wagner <[email protected]> |
50 |
|
|
51 |
* debian/rules: add --use-wx-python-swig-hack |
* debian/rules: add --use-wx-python-swig-hack |