/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2755 - (view) (annotate) - [select for diffs]
Modified Thu Apr 12 09:21:58 2007 UTC (17 years, 10 months ago) by dpinte
File length: 22067 byte(s)
Diff to previous 2734 , to selected 1591
2007-04-12 Didrik Pinte <dpinte@itae.be>

   * Removed workaround for file encoding in the Thuban code



Revision 2734 - (view) (annotate) - [select for diffs]
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
File length: 22109 byte(s)
Diff to previous 2718 , to selected 1591
made a copy

Revision 2718 - (view) (annotate) - [select for diffs]
Modified Fri Jan 5 23:43:49 2007 UTC (18 years, 2 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 22109 byte(s)
Diff to previous 2700 , to selected 1591
2007-01-06 Didrik Pinte <dpinte@itae.be>

       UTF-8 locales support reading non utf-8 files. This is a workaround and
       not a real bugfix. See
       http://wald.intevation.org/tracker/index.php?func=detail&aid=118 for
       more details

       * Thuban/UI/
       tableview.py, controls.py, baserenderer.py, view.py: decode text from
       iso-8859-1 encoding.




Revision 2700 - (view) (annotate) - [select for diffs]
Modified Mon Sep 18 14:27:02 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 22067 byte(s)
Diff to previous 2617 , to selected 1591
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6



Revision 2617 - (view) (annotate) - [select for diffs]
Modified Fri May 6 14:18:00 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 22072 byte(s)
Diff to previous 2587 , to selected 1591
(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.


Revision 2587 - (view) (annotate) - [select for diffs]
Modified Wed Mar 23 15:30:27 2005 UTC (19 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 21906 byte(s)
Diff to previous 2571 , to selected 1591
Add support for adjusting the opacity of a raster layer.


Revision 2571 - (view) (annotate) - [select for diffs]
Modified Fri Feb 18 14:54:17 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 21844 byte(s)
Diff to previous 2562 , to selected 1591
Refactored baserenderer.py and renderer.py to remove baserenderer.py's
dependencies on wxPython. Added a new method projected_raster_layer()
that returns a raster layer image in projected space. This must be
implemented in classes derived from BaseRenderer. This also eliminates
the dependency on gdal in baserenderer.py.


Revision 2562 - (view) (annotate) - [select for diffs]
Modified Wed Feb 16 21:14:47 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 21040 byte(s)
Diff to previous 2552 , to selected 1591
Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
so that that wxproj doesn't crash. Added GUI support for selecting
alpha channel (opacity can't be selected yet).


Revision 2552 - (view) (annotate) - [select for diffs]
Modified Fri Jan 28 15:54:00 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20941 byte(s)
Diff to previous 2551 , to selected 1591
Make layer's use_mask flag default to true. Support a bit array describing
the mask to use. Improve error handling in ProjectRasterFile (also addresses
RT #2947).


Revision 2551 - (view) (annotate) - [select for diffs]
Modified Thu Jan 27 14:19:41 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20746 byte(s)
Diff to previous 2537 , to selected 1591
Add a new dialog box for raster layers. The dialog box allows
the user to toggle a mask that is generated by ProjectRasterFile
and is used to only draw the real parts of the projected image.


Revision 2537 - (view) (annotate) - [select for diffs]
Modified Fri Jan 21 14:01:25 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20793 byte(s)
Diff to previous 2413 , to selected 1591
Improved rendering raster layers by changing the return format of
the ProjectRasterFile function.


Revision 2413 - (view) (annotate) - [select for diffs]
Modified Mon Nov 22 11:16:35 2004 UTC (20 years, 3 months ago) by bernhard
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20426 byte(s)
Diff to previous 2377 , to selected 1591
* Thuban/Model/base.py (UnsetModified):
Fixed some typos in docstring.

* Thuban/UI/baserenderer.py (BaseRenderer.draw_polygon_shape()):
Added hints on the used algorithm for handling holes.


Revision 2377 - (view) (annotate) - [select for diffs]
Modified Sun Oct 3 21:45:48 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20305 byte(s)
Diff to previous 2278 , to selected 1591
(BaseRenderer.draw_shape_layer_incrementally): If the draw function
is for points, call it with the size as additional parameter.
BaseRenderer.draw_point_shape): Added additional, optional parameter for
the size. Compute the radius using the size.


Revision 2278 - (view) (annotate) - [select for diffs]
Modified Tue Jul 13 11:07:45 2004 UTC (20 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20089 byte(s)
Diff to previous 2224 , to selected 1591
(BaseRenderer.render_map_incrementally): Fix a logic bug in the
optimization that tries not to draw layers under a raster layer.
The bug was harmless.  All it effectively did was to produce The a
strange messages about not being able to draw Layer instances for
all vector layers below a raster layer which would be invisible
anyway because the raster layer currently always covers the entire
window


Revision 2224 - (view) (annotate) - [select for diffs]
Modified Fri May 28 17:29:30 2004 UTC (20 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20061 byte(s)
Diff to previous 1935 , to selected 1591
Fix some typos.


Revision 1935 - (view) (annotate) - [select for diffs]
Modified Tue Nov 11 18:16:20 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20059 byte(s)
Diff to previous 1926 , to selected 1591
Avoid warnings when run under Python 2.3

(BaseRenderer.draw_point_shape)
(BaseRenderer.draw_label_layer): Coordinates must be ints.


Revision 1926 - (view) (annotate) - [select for diffs]
Modified Mon Nov 10 16:57:19 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 20023 byte(s)
Diff to previous 1918 , to selected 1591
Add a way to specify how layers in
extensions are to be rendered.
(_renderer_extensions): New. List with renderer for layers in
extensions
(add_renderer_extension): New. Add a renderer extension
(init_renderer_extensions): New. Init the renderer extensions
(BaseRenderer.render_map_incrementally): Search
_renderer_extensions for how to draw unknown layer types
(BaseRenderer.draw_raster_data): Add format parameter so that
formats other than BMP can be drawn
(BaseRenderer.draw_raster_layer): Pass an explicit format to
draw_raster_data


Revision 1918 - (view) (annotate) - [select for diffs]
Modified Mon Nov 3 17:33:19 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 17208 byte(s)
Diff to previous 1914 , to selected 1591
(BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
method. ReadValue is faster than ReadRowAsDict since it only reads
one cell especially now that the dbf file objects actually
implement it.


Revision 1914 - (view) (annotate) - [select for diffs]
Modified Mon Nov 3 14:17:51 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 17212 byte(s)
Diff to previous 1879 , to selected 1591
(BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
brushes for the groups so that they're not created over and over
again


Revision 1879 - (view) (annotate) - [select for diffs]
Modified Wed Oct 29 17:43:40 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 17021 byte(s)
Diff to previous 1866 , to selected 1591
(BaseRenderer.draw_shape_layer_incrementally): Speed up the
special case of a classification that only has the default group


Revision 1866 - (view) (annotate) - [select for diffs]
Modified Mon Oct 27 13:01:58 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 16735 byte(s)
Diff to previous 1593 , to selected 1591
Several rendering changes:

 - Render the selection into a separate bitmap so that only that
   bitmap needs to be redrawn when the selection changes

 - Render incrementally showing previews and allowing interaction
   before rendering is complete

 - Update the renderer interface a bit. Most parameters of
   RenderMap are now parameters of the constructor

* Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
and the update region as parameters. Update the doc-string
(BaseRenderer.render_map_incrementally): New. Generator function
to renders the map incrementally
(BaseRenderer.render_map): Remove the map argument (it's now in
the constructor) and simply iterate over the
render_map_incrementally generator to draw the map.
(BaseRenderer.draw_shape_layer_incrementally)
(BaseRenderer.draw_shape_layer): Renamed to
draw_shape_layer_incrementally and changed into a generator that
yields True every 500 shapes. Used by render_map_incrementally to
render shape layers incrementally

* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
map and region parameters which are now in the constructor
(ScreenRenderer.RenderMapIncrementally): New. Public frontend for
the inherited render_map_incrementally.
(BaseRenderer.draw_shape_layer): Removed.
(ScreenRenderer.draw_selection_incrementally): New. The selection
drawing part of the removed draw_shape_layer as a generator
(ScreenRenderer.layer_shapes): Update because of the region
parameter change
(ExportRenderer.__init__): New. Extend the inherited constructor
with the destination region for the drawing
(ExportRenderer.RenderMap): Removed the map and region parameters
which are now in the constructor

* Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
bitmap suitable for a preview in a tool
(CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
bitmap
(MapPrintout.draw_on_dc): Adapt to new renderer interface
(MapCanvas.OnPaint): Handle drawing the selection bitmap if it
exists
(MapCanvas.OnIdle): Update the logic to deal with incremental
rendering and the selection bitmap
(MapCanvas._do_redraw): Handle the instantiation of the render
iterator and the redraws during rendering
(MapCanvas._render_iterator): New. Generator to incrementally
redraw both bitmaps
(MapCanvas.Export): Adapt to new renderer interface.
(MapCanvas.full_redraw): Reset the selection bitmap and the
renderer iterator too
(MapCanvas.redraw_selection): New. Force a redraw of the selection
bitmap
(MapCanvas.shape_selected): Only redraw the selection bitmap


Revision 1593 - (view) (annotate) - [select for diffs]
Modified Fri Aug 15 14:10:27 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 15636 byte(s)
Diff to previous 1591
Change the way shapes are returned by a shape store. The
ShapesInRegion method returns an iterator over actual shape
objects instead of a list of shape ids.

* Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
id.
(ShapefileStore.ShapesInRegion): Return an iterator over the
shapes which yields shape objects instead of returning a list of
shape ids
(ShapefileStore.AllShapes): New. Return an iterator over all
shapes in the shape store
(DerivedShapeStore.AllShapes): New. Like in ShapefileStore

* Thuban/Model/layer.py (Layer.ShapesInRegion): Update
doc-string.

* Thuban/UI/baserenderer.py
(BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
layer_shapes and make it return an iterator containg shapes
instead of a list of ids.
(BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
layer_shapes() change

* Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
(ScreenRenderer.layer_shapes): Rename as in BaseRenderer

* Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
changes in the ShapesInRegion return value.
(ViewPort._get_hit_tester): Remove commented out code

* test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
new return value.
(SimpleShapeStore.AllShapes): New. Implement this method too.

* test/test_layer.py (TestLayer.test_arc_layer)
(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
(TestLayer.test_point_layer_with_projection)
(TestLayer.test_derived_store): Adapt to changes in the
ShapesInRegion return value.

* test/test_shapefilestore.py
(TestShapefileStoreArc.test_shapes_in_region)
(TestShapefileStorePolygon.test_shapes_in_region)
(TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
in the ShapesInRegion return value.
(TestShapefileStorePoint.test_all_shapes)
(TestShapefileStoreArc.test_shape_shapeid): New tests for the new
methods

* test/test_derivedshapestore.py
(TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
the ShapesInRegion return value.
(TestDerivedShapeStore.test_all_shapes)
(TestDerivedShapeStore.test_shape_shapeid): New tests for the new
methods


Revision 1591 - (view) (annotate) - [selected]
Modified Fri Aug 15 14:00:53 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 15632 byte(s)
Diff to previous 1554
Make the renderers deal correctly with raw vs. python level
representation of shape geometries

* Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
Return a flag useraw in addition to the callable and the parameter
to indicate whether the callable can deal with the raw shape data
or uses the higher level python lists of coordinates. The callable
now should accept either the raw data or the return value of the
shape's Points() method.
(BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
change
(BaseRenderer.projected_points): Instead of the shape id use the
points list as parameter.
(BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
(BaseRenderer.draw_point_shape): Adapt to projected_points()
change and accept the points list as parameter instead of the
shape id.

* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
the useraw flag as required by the BaseRenderer
(ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
changes.

* test/test_baserenderer.py
(TestBaseRenderer.test_point_with_classification): New test for
rendering a map with classifications.


Revision 1554 - (view) (annotate) - [select for diffs]
Added Wed Aug 6 17:24:30 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/baserenderer.py
File length: 15144 byte(s)
Diff to selected 1591
New file with the basic rendering
logic. The code in this file is completely independend of wx.
(BaseRenderer): Class with the basic rendering logic


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26