comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java @ 3240:e3c70271d50f

issue487 (wrong area calculation). flys-artifacts/trunk@4872 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 04 Jul 2012 06:52:21 +0000
parents 5642a83420f2
children 2a8919e0ed28
comparison
equal deleted inserted replaced
3239:fb11bd37ddb8 3240:e3c70271d50f
1606 RectangleEdge l_rangeAxisLocation = x_plot.getRangeAxisEdge(); 1606 RectangleEdge l_rangeAxisLocation = x_plot.getRangeAxisEdge();
1607 1607
1608 Object[] l_xValues = x_xValues.toArray(); 1608 Object[] l_xValues = x_xValues.toArray();
1609 Object[] l_yValues = x_yValues.toArray(); 1609 Object[] l_yValues = x_yValues.toArray();
1610 1610
1611 double area = calculateArea(l_xValues, l_yValues); 1611 double area = calculateArea(l_xValues, l_yValues)/2d;
1612 if (x_positive) positiveArea += area; 1612 if (x_positive) positiveArea += area;
1613 else negativeArea += area; 1613 else negativeArea += area;
1614 updateCentroid(l_xValues, l_yValues); 1614 updateCentroid(l_xValues, l_yValues);
1615 1615
1616 GeneralPath l_path = new GeneralPath(); 1616 GeneralPath l_path = new GeneralPath();

http://dive4elements.wald.intevation.org