I just sent a message to jchempaint-devel that crossed yours in the mail.
> On Monday 07 June 2004 12:35, Miguel wrote:
>> JChemPaint is using the 2D graphics calls that are built into the JDK.
>
> Is it? It uses CDK's Renderer2D which has this import:
>
> import java.awt.Font;
> import java.awt.FontMetrics;
> import java.awt.Graphics;
> import java.awt.Point;
> import java.awt.event.MouseEvent;
>
> I thought Java2D uses Graphics2D ?
All Java code since 1.2 uses Java2D.
For backwards compatibility, the paint(...) routine still takes a Graphics
object. But you can immediately cast this to be a Graphics2D object.
void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
...
}
This is the proper way to do it as documented by Sun.
You can then use
g2d.setRenderingHint(...)
to turn on antialiasing.
Miguel
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers