Antialiasing

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Antialiasing

Re: Antialiasing

Post by Guest » Sat Jul 17, 2010 6:42 am

I just wanted to say that I appreciate the suggestions of robert.
Keep up the good work man !!! :)

Re: Antialiasing

Post by abgorn » Mon Jun 29, 2009 12:18 am

Thanks, problem solved :D

Re: Antialiasing

Post by robert » Sun Jun 28, 2009 10:55 pm

The parameter for setTextAntiAliasHint is the name of the RenderingHints value, as a String, not the value itself. From the Javadoc:

public void setTextAntiAliasHint(java.lang.String aaHintFieldName)

Sets the rendering hint to use when antialiasing text in this editor.

Parameters:
aaHintFieldName - The name of a field in java.awt.RenderingHints. If an unknown or unsupported field name is specified (such as a 1.6+ hint being specified when this is a 1.4/1.5 JVM), null is used instead. A value of null means "no antialiasing."


So for example, you should be able to do:

Code: Select all
setTextAntiAliasHint("VALUE_TEXT_ANTIALIAS_ON");


I can't remember why, but there is some peculiar reason you pass it the name of the RenderingHints value, and not the value itself. I'll have to dig into the code to remember why. Perhaps in a future release you'll actually pass a RenderingHints value.

Antialiasing

Post by abgorn » Sun Jun 28, 2009 1:59 pm

I've been trying to get the RSyntaxTextArea to use antialiasing but I can't get it. I've tried textArea.setTextAntiAliasHint(java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
and all the other variables in the class that have something to do with it but it still won't work even if I cast it into a string.

Can anyone help?

Top

cron