-----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.

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]

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.

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

Reply via email to