diff gnv-artifacts/ChangeLog @ 450:20a480753ff9

Render labels in vertical cross section charts. gnv-artifacts/trunk@498 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 04 Jan 2010 02:49:42 +0000
parents c7ca2fce041f
children bc5901bb4525
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Sun Jan 03 15:57:02 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Jan 04 02:49:42 2010 +0000
@@ -1,3 +1,41 @@
+2010-01-04	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/gnv/jfreechart/PolygonSeriesLabelGenerator.java:
+	  New. Interface to generate labels for polygon series.
+
+	* src/main/java/de/intevation/gnv/jfreechart/PolygonRenderer.java:
+	  Added logic to generate and render labels of polygons.
+	  The implemented layout algorithm is greedy. For all
+	  polygons with labels the label is placed on the center of
+	  the ring, which center in terms of the indices of the vertices.
+	  If the bounding box of the label intersects the bounding box
+	  of a an already placed one alternative places are tried. 
+	  In level order positions at 1/4, 3/4, 1/8, 3/8, 5/8, 7/8 and 
+	  so on are evaluated for non intersections with former placed labels.
+	  This terminates if a free place is found or all index positions
+	  are exhausted. If no free position is found the label is omitted.
+
+	  The visual result is okay but could be improved by a more clever
+	  algorithm e.g. tension reduction in the graph of labels.
+
+	  TODO: Improve clipping against chart borders.
+
+	* src/main/java/de/intevation/gnv/jfreechart/LevelOrderIndices.java:
+	  New. Little helper class to generate the level order index
+	  traversal used in the label layout. Placed in the jfreechart
+	  package to keep it clean from gnv dependencies.
+
+	* src/main/java/de/intevation/gnv/jfreechart/PolygonPlot.java:
+	  Added some methods to access the domain and range axis and
+	  there edge position. Mainly C&P from JFreeCahrts XYPlot
+	  to ease the coordinate transformation between Java2D and
+	  the value spaces of the chart. Call the label generation
+	  of the polygon renderer.
+
+	* src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java:
+	  Added an implementation of PolygonSeriesLabelGenerator to
+	  generate localized labels for the iso lines.
+	  
 2010-01-03	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/gnv/chart/VerticalCrossSectionChart.java:

http://dive4elements.wald.intevation.org