1 |
|
2003-08-06 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
Rearrange the renderers a bit, partly in preparation for changes |
4 |
|
required for the postgis merge, partly to make it more testable. |
5 |
|
Also make the representation of coordinates in Shapes more |
6 |
|
consistent. |
7 |
|
|
8 |
|
* Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in |
9 |
|
this class is now in BaseRenderer. This class is now practically |
10 |
|
only a specialization of BaseRenderer for rendering to an actual |
11 |
|
wx DC. |
12 |
|
(ScreenRenderer.draw_shape_layer): Use self.low_level_renderer() |
13 |
|
to get the shapetype specific rendering functions. |
14 |
|
|
15 |
|
* Thuban/UI/baserenderer.py: New file with the basic rendering |
16 |
|
logic. The code in this file is completely independend of wx. |
17 |
|
(BaseRenderer): Class with the basic rendering logic |
18 |
|
|
19 |
|
* test/test_baserenderer.py: New. Test cases for BaseRenderer |
20 |
|
|
21 |
|
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable |
22 |
|
error_on_redraw to guard agains endless loops and stack overflows |
23 |
|
when there's a bug in the rendering code that raises exceptions. |
24 |
|
(MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual |
25 |
|
rendering into a separate method _do_redraw so that error handling |
26 |
|
is a bit easier. When an exception occurs, set error_on_redraw to |
27 |
|
true. When it's true on entry to OnIdle do nothing and return |
28 |
|
immediately. |
29 |
|
|
30 |
|
* Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a |
31 |
|
Shape object will always have the coordinates as a list of list of |
32 |
|
coordinate pairs (tuples). |
33 |
|
(Shape.compute_bbox): Adapt to new representation. |
34 |
|
|
35 |
|
* Thuban/UI/viewport.py (ViewPort.find_shape_at) |
36 |
|
(ViewPort.LabelShapeAt): Adapt to new coordinate representation in |
37 |
|
Shape objects. |
38 |
|
|
39 |
|
* test/test_shapefilestore.py |
40 |
|
(ShapefileStoreTests.assertFloatTuplesEqual) |
41 |
|
(ShapefileStoreTests.assertPointListEquals): Rename to |
42 |
|
assertPointListEquals and change purpose to checking equality of |
43 |
|
the lists returned by Shape.Points(). |
44 |
|
(TestShapefileStoreArc.test_shape) |
45 |
|
(TestShapefileStorePolygon.test_shape) |
46 |
|
(TestShapefileStorePoint.test_shape): Use the new |
47 |
|
assertPointListEquals instead of assertFloatTuplesEqual |
48 |
|
|
49 |
|
* test/test_layer.py (TestLayer.assertFloatTuplesEqual) |
50 |
|
(TestLayer.assertPointListEquals): Rename to assertPointListEquals |
51 |
|
and change purpose to checking equality of the lists returned by |
52 |
|
Shape.Points(). |
53 |
|
(TestLayer.test_arc_layer, TestLayer.test_arc_layer) |
54 |
|
(TestLayer.test_polygon_layer, TestLayer.test_point_layer) |
55 |
|
(TestLayer.test_derived_store): Use the new assertPointListEquals |
56 |
|
instead of assertFloatTuplesEqual |
57 |
|
|
58 |
|
* test/test_derivedshapestore.py |
59 |
|
(TestDerivedShapeStore.assertFloatTuplesEqual) |
60 |
|
(TestDerivedShapeStore.assertPointListEquals): Rename to |
61 |
|
assertPointListEquals and change purpose to checking equality of |
62 |
|
the lists returned by Shape.Points(). |
63 |
|
(TestDerivedShapeStore.test_shape): Use the new |
64 |
|
assertPointListEquals instead of assertFloatTuplesEqual |
65 |
|
|
66 |
2003-08-06 Jan-Oliver Wagner <[email protected]> |
2003-08-06 Jan-Oliver Wagner <[email protected]> |
67 |
|
|
68 |
* Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for |
* Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for |