JFreeChart rendering bug?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ralphscheuer
Posts: 4
Joined: Wed Mar 10, 2004 3:37 pm

JFreeChart rendering bug?

Post by ralphscheuer » Wed Mar 24, 2004 2:02 pm

Hello everybody,

yesterday, I posted about a rendering bug with antialiased bar charts. The best example I could find that exhibits this behaviour was the ParetoChartDemo that comes with the distribution.

Apparently, this is not just an antialiasing bug but a major rendering bug: when I disable antialiasing with the ParetoChartDemo on Mac OS X 10.3 (JDK 1.3.1 and 1.4.2), the bar outlines are drawn in a completely weird way. If nobody has seen this problem before on this or any other platform, we might have a real major bug in the Mac's JDK here. I will also notice Apple about this.

However, I would be grateful if someone over here could take a look at the following page I quickly slapped together for illustration purposes:

http://homepage.mac.com/ralphscheuer/PhotoAlbum7.html

Has anybody seen something like this before?

Thanks for your advice.

Ralph[/url]

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Mar 24, 2004 2:36 pm

There was some discussion about this on the Java2D mailing list:

http://www.javadesktop.org/forums/threa ... &tstart=15

I haven't looked really closely at it yet...
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

ralphscheuer
Posts: 4
Joined: Wed Mar 10, 2004 3:37 pm

Post by ralphscheuer » Wed Mar 24, 2004 6:49 pm

Hello,

via Apple's java-dev list, I just received the following statement regarding the coordinates used to draw the chart:
If they're fractional, I could imagine getting exactly the behavior you see, as the rendering code tries to correctly draw "virtual" pixels that straddle physical pixel boundaries. The misplacement of "aliased" lines is also plausible, depending on how the fractional coordinates got rounded.
Is it possible that the coordinates for the charts are fractional? And if they really are, can I force JFreeChart to use Integer coordinates only?

Thanks for your help
Ralph[/quote]

killerz

Post by killerz » Wed May 19, 2004 4:24 pm

hmm.. i notice the same problem on
mac 10.3.3 using jre1.4.2_03

setting the antialiasing to on clears up the pixel misalignment,
but you get a blurry image (i wonder if the pixels are still
misaligned, but they are blended in so that you can't tell)

killerz

Post by killerz » Wed May 19, 2004 5:02 pm

yeah, its a mac jdk issue because the same code on
windows with the same version jre produces correctly aligned bars and outlines.

Locked