I am working on a project that requires generation of dotted lines that serve 
as grids for charts. The project uses the JFreeChart library to generate the 
charts, and then JasperReports to integrate the charts into a report and export 
the report into PDF format. JFreeChart uses Java2D graphics. The renderer I use 
to turn the chart into an image for the report is JasperReports' 
JCommonDrawableRenderer.  The generation of dotted grid lines in a JFreeChart 
time series is not difficult and achieved via specifying an appropriate 
BasicStroke object. 

However, once the PDF is viewed in Adobe Acrobat 9.0, the dots that make up 
these grid lines do not look like normal dots at normal viewing zoom levels 
(100% or less). They appear to be horizontally stretched out, so that some dots 
look like very short horizontal lines, others more like messy dots, and so on. 
Once the zoom level is increased to high levels (800% or more), they look like 
precisely measured dots. Also, when the PDF is printed, they look like exact 
dots on paper.

I've been trying different things and here's what I found so far. If the chart 
is rendered on a java panel, the dots that make up the lines look perfect. So 
this seems to indicate that the issue is not with JFreeChart. I've tried using 
a different JasperReports renderer (one returned by 
ImageChartRendererFactory().getRenderer()), and this one makes the chart appear 
more like a photo (more blurry, color gradients, etc). This makes the dots look 
perfect in terms of measurements, mostly, but has the unwanted side-effect of 
making the entire chart look bad (as if everything is smudged). So neither of 
these renderers is a good solution, and I haven't been able to find any others 
so far. 

I am pretty new to graphics rendering in general, so I was wondering if anyone 
can explain to me why this happens, or make some suggestions, or point me to 
some helpful resources. Thanks in advance.
[Message sent by forum member 'vortex101' (vortex101)]

http://forums.java.net/jive/thread.jspa?messageID=331347

===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
lists...@java.sun.com and include in the body of the message "help".

Reply via email to