ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Anti-alias doesn't appear to be working
Posted by Tim Vasil on Jun-28-2005 10:47
Attachments:
I'm using ChartDirector 4.0 for Java.

I made this call on the chart object:   setAntiAlias(true, 1)

Yet the text is still not anti-aliased (you can see the parentheses around "not specified" in the legend are pixelated).

I tried the same call on the DrawArea object with similar results.
loadChartImage.jpg

  Re: Anti-alias doesn't appear to be working
Posted by Peter Kwan on Jun-28-2005 14:53
Hi Tim,

The effect you see if possible and could be normal.

ChartDirector is simply using Java to draw the text, and ChartDirector will ask Java to draw in AntiAlias mode. However, what is anti-alias and what anti-alias method to use is entire up to Java. It is possible Java consider the text as already anti-aliased or as being the best possible quality.

I tried myself on Windows using SUN Java 1.4.2, and the text is anti-aliased (edges blurred). I tried on Windows using SUN Java 1.3.1, and the text is not blurred (like the one shown in your attached image). This indicates SUN Java 1.3.1 considers the existing text quality is better than anti-aliased, while the SUN Java 1.4.2 smoothed the edges anyway.

In general, most people consider anti-alias high quality "fully hinted" fonts (such as Arial) below 10 points reduces the quality of the text (it makes the text looks "dirty"), but anti-alias at larger font size improves quality. At small point size, "hinting" technology is typically used to improve appearance. I think this is the reason why some Java systems do not smooth out the edges even in anti-alias mode.

(Recently, some systems attempt to use new technologies such as "ClearType" to anti-alias fonts even at small text size. However, such systems are hardware dependent (eg. requires certain LCD monitors with certains types of pixel arrangements). Thus these sort of "ClearType" anti-alias is only useful for directly screen rendering, but not useful to create hardware independent images.)

Regards
Peter Kwan

  Re: Anti-alias doesn't appear to be working
Posted by Tim Vasil on Jun-29-2005 10:10
Hi Peter,

I also happen to be using Sun Java 1.4.2 on Windows, so it's strange that you see the anti-aliasing and I do not.

Howerver, when I bump up the font size I do see the anti-aliasing taking effect.  I figured the discrepency was due to a bug in ChartDirector, since the setAntiAlias args imply that you use some discretion yourself in determining when to anti-alias text (i.e. in "AutoAntiAlias" mode) and don't leave everything up to the JVM.

At any rate, thanks for your assistance.  I'm always impressed with your prompt replies.

Thanks,
Tim