Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/jfreechart/PolygonRenderer.java @ 446:f5a041000357
Connected vertical cross section with chart generation.
gnv-artifacts/trunk@494 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 01 Jan 2010 12:08:05 +0000 |
parents | b624879d2902 |
children | 92b7ccbf6163 |
comparison
equal
deleted
inserted
replaced
445:f42ed4f10b79 | 446:f5a041000357 |
---|---|
50 | 50 |
51 double sx = (double)rectangle.getWidth()/bbox.getWidth(); | 51 double sx = (double)rectangle.getWidth()/bbox.getWidth(); |
52 double sy = (double)rectangle.getHeight()/bbox.getHeight(); | 52 double sy = (double)rectangle.getHeight()/bbox.getHeight(); |
53 double tx = rectangle.getMinX(); | 53 double tx = rectangle.getMinX(); |
54 double ty = rectangle.getMinY(); | 54 double ty = rectangle.getMinY(); |
55 | |
56 // XXX: Little hack to draw correctly if data is | |
57 // below 0 in y direction. | |
58 if (bbox.getMinY() <= 0d && bbox.getMaxY() <= 0d) { | |
59 sy = -sy; // mirror | |
60 } | |
55 | 61 |
56 graphics.translate(tx, ty); | 62 graphics.translate(tx, ty); |
57 graphics.scale(sx, sy); | 63 graphics.scale(sx, sy); |
58 | 64 |
59 int seriesCount = dataset.getSeriesCount(); | 65 int seriesCount = dataset.getSeriesCount(); |