Turn off antialias for data items only?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nje01
Posts: 1
Joined: Thu Oct 19, 2006 3:04 pm

Turn off antialias for data items only?

Post by nje01 » Thu Oct 19, 2006 3:07 pm

I have very thin data items that look bad (fuzzy) with antialiasing on. They look fine (1 pixel wide) with antialiasing off, but then all the axis text looks bad (since it is not antialias'ed).

How can I selectively turn off antialiasing for the data items only?

Thanks,

nathan

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Fri Oct 20, 2006 7:22 am

To my knowledge no. It's all or nothing.

demonhead
Posts: 24
Joined: Thu May 25, 2006 5:44 am

Re: Turn off antialias for data items only?

Post by demonhead » Fri Oct 20, 2006 9:13 am

nje01 wrote:I have very thin data items that look bad (fuzzy) with antialiasing on. They look fine (1 pixel wide) with antialiasing off, but then all the axis text looks bad (since it is not antialias'ed).

How can I selectively turn off antialiasing for the data items only?

Thanks,

nathan
This outta help:

Code: Select all

RenderingHints renderhints=chart.getRenderingHints();
        renderhints.add(new RenderingHints(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_OFF));

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Fri Oct 20, 2006 11:16 am

Every day I learn something new :wink:

Locked