Hallo together,

It would be of great if the Viewport class [1] would has a
setJava2DConverter(Java2DConverter) method.
Java2DConverter [2] objects are used to convert JTS
geometries into Java2D shapes.

Why should it be possible to exchange the converter? For the
simple reason that the default one does some coordinate rounding/cutoffs
that make it hard to produce a quality output for printing, SVG export
and so on. We discussed that earlier on the list. If it would be
possible to set a custom (actually a subclass of Java2DConverter)
converter you can temporally replace the original one for a rendering
cycle to get non-truncated vertices. Even more: you can install a
converter that does some controlled simplifications to reduce the
amount of data that is send to the output devices. I've tried both
and it works very well without having a big impact onto the rendering
process as such.

I've attached a patch to add the setter to Viewport. It would be
really kind if you test it. I don't want to simply let my commit
speak. ;-)

Thanks in advance,
  Sascha


[1] com.vividsolutions.jump.workbench.ui.Viewport
[2] com.vividsolutions.jump.workbench.ui.renderer.java2D.Java2DConverter
Index: src/com/vividsolutions/jump/workbench/ui/Viewport.java
===================================================================
RCS file: 
/cvsroot/jump-pilot/openjump/src/com/vividsolutions/jump/workbench/ui/Viewport.java,v
retrieving revision 1.1
diff -u -r1.1 Viewport.java
--- src/com/vividsolutions/jump/workbench/ui/Viewport.java      16 Jun 2005 
22:11:47 -0000      1.1
+++ src/com/vividsolutions/jump/workbench/ui/Viewport.java      19 Mar 2007 
10:45:39 -0000
@@ -97,6 +97,10 @@
         return java2DConverter;
     }
 
+    public void setJava2DConverter(Java2DConverter converter) {
+        java2DConverter = converter;
+    }
+
     public ZoomHistory getZoomHistory() {
         return zoomHistory;
     }
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to