Hello Sascha, Sascha L. Teichmann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi together, > > Larry brought up the point that the SVG export is crappy > due to rounding errors. > > I tracked down this issue to the point where the rounding is done. > Mainly two classes are responsible for this: > > 1) com.vividsolutions.jump.workbench.ui.renderer.java2D.PolygonShape > > The coordinates are converted to integers here by using a > java.awt.Polygon. Bad idea. I replaced this by a java.awt.geom.GeneralPath.
So, what's the bad idea here, to use the awt.Polygon or to convert to ints? > > 2) com.vividsolutions.jump.workbench.ui.renderer.java2D.Java2DConverter > > Each incoming JTS point transformed to model space is rounded to the > nearest integer in #toViewPoint(). Bad idea again. I removed this > rounding. A comment for this method says that there is a rounding > issue in Java2D. This comment dates back to 2004. I wonder if this > is still relevant nowadays?! > > After doing this two little modification the quality improved > dramatically. See the screen shots before.png [1] and after.png [2] To be honest, I find difficult to compare the two images below, because they are essentially different. (What do I have to look for?) > > I strongly recommend to take this mods into CVS because all rendering > via a Graphics2D context is effected by this. Printing quality e.g. > suffers as well from this issue. We're really talking about rendering quality for printing and/or SVG output. I fear, however, that the com.vividsolutions.jump.workbench.ui.renderer.java2D.Java2DConverter might be used for rendering the layer view panel, and that conversion into ints might have been a good trade-of for fast rendering (apart from being an bug workaround). One would need to test how fast or slow your changes would mean for rendering of the panel. On the other hand, one should be able to plug in another renderer, for using when high quality rendering is needed (the case of printing and svg) and I believe SVG does accept floats too (but I'm not sure). Cheers, Ugo > > Kind regards, Sascha > > [1] http://intevation.de/~teichmann/before.png > [2] http://intevation.de/~teichmann/after.png > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2.2 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFFwqHisrvOlFf8EzcRArkpAKCI7hD03CZtweL6U+uy9hdzsQ/1JgCfTAmo > dgre16tGnG135ZV8/WOdEVU= > =YXRP > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > -- l a t / l o n GmbH Aennchenstrasse 19 53177 Bonn, Germany phone ++49 +228 184960 fax ++49 +228 1849629 http://www.lat-lon.de http://www.deegree.org ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel