From: E.L. W. <eg...@sc...> - 2004-06-07 09:15:55
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Miguel, is anti-aliasing still enabled in HEAD? How can one turn it on/off? Peter asked about AA in JChemPaint too; is it difficult to add AA, or is it= =20 some option of the JDK? Egon =2D --=20 eg...@sc... PhD on Molecular Representation in Chemometrics Nijmegen University http://www.cac.sci.kun.nl/people/egonw/ GPG: 1024D/D6336BA6 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (SunOS) iD8DBQFAxDJGd9R8I9Yza6YRAmXkAJ9B+z1KLyenaFa+43AHlFtY/VANjgCgisob PlOPpreJRP1v/2RNz/CWUzw=3D =3DBI6P =2D----END PGP SIGNATURE----- |
From: Miguel <mi...@jm...> - 2004-06-07 10:36:08
|
> is anti-aliasing still enabled in HEAD? How can one turn it on/off? Anti-aliasing is not enabled in Jmol-HEAD. Most of the code is still in place, but it needs work in order to function properly. For more details see below. > Peter asked about AA in JChemPaint too; is it difficult to add AA, or i= s > it some option of the JDK? JChemPaint is using the 2D graphics calls that are built into the JDK. These graphics primitives include support for anti-aliasing. Therefore, i= t seems to me that it should be easy for you to enable anti-aliasing within= JChemPaint. The techniques that you will use are the same that we used in Jmol v6-v9.= The RenderingHints that you will use will be exactly the same. I encourag= e you to take a look at that code and then send questions if there are things that you do not understand. Miguel Anti-aliasing tech note ----------------------- The Jmol Graphics3D engine is implemented completely in software. It cannot use the underlying Sun 2D graphics calls because they do not offer= the zBuffer functionality of deciding on a pixel-by-pixel basis whether o= r not a pixel should be drawn. The anti-aliasing technique used in the Jmol Graphics3D engine is called full-scene-anti-aliasing. The entire scene is rendered into a buffer that= is twice as wide and twice as high. Then, 4 pixels are converted into 1 pixel, with appropriate mixing of RGB values. The end result is that it takes more memory to hold the zBuffer and pixelBuffer. And it takea lot more CPU cycles to render a scene. The drawing part takes 4 times as long. Overall, it probably takes 3 times as= long to render a scene. On newer machines with lots of CPU power this is probably not a problem. On older machines it would be unacceptable. Therefore, we need to put in some options. > Egon > > - -- > egonw=40sci.kun.nl > PhD on Molecular Representation in Chemometrics > Nijmegen University > http://www.cac.sci.kun.nl/people/egonw/ > GPG: 1024D/D6336BA6 > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (SunOS) > > iD8DBQFAxDJGd9R8I9Yza6YRAmXkAJ9B+z1KLyenaFa+43AHlFtY/VANjgCgisob > PlOPpreJRP1v/2RNz/CWUzw=3D > =3DBI6P > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. >>From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today=21 http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Jmol-developers mailing list > Jmol-developers=40lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-developers > -------------------------------------------------- Miguel Howard miguel=40howards.org c/Pe=F1a Primera 11-13 esc dcha 6B 37002 Salamanca Espa=F1a Spain -------------------------------------------------- telefono casa 923 27 10 82 movil 650 52 54 58 -------------------------------------------------- To call from the US dial 9:00 am Pacific US =3D home 011 34 923 27 10 82 12:00 noon Eastern US =3D cell 011 34 650 52 54 58 6:00 pm Spain -------------------------------------------------- |
From: E.L. W. <eg...@sc...> - 2004-06-07 14:50:42
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Point; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; I thought Java2D uses Graphics2D ? Egon =2D --=20 eg...@sc... PhD on Molecular Representation in Chemometrics Nijmegen University http://www.cac.sci.kun.nl/people/egonw/ GPG: 1024D/D6336BA6 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (SunOS) iD8DBQFAxH+Ld9R8I9Yza6YRAgG2AJsHmVAf43zMeg876d4fCcI8lZhamgCfSsi7 PqHLrZSgIEYzxuldew5bgmE=3D =3DDF6S =2D----END PGP SIGNATURE----- |
From: Miguel <mi...@jm...> - 2004-06-07 16:28:46
|
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 |
From: Peter Murray-R. <pm...@ca...> - 2004-06-07 16:55:14
|
At 16:42 07/06/2004 +0200, E.L. Willighagen wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >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.Color; >import java.awt.Font; >import java.awt.FontMetrics; >import java.awt.Graphics; >import java.awt.Point; >import java.awt.event.MouseEvent; >import java.awt.event.MouseMotionListener; > >I thought Java2D uses Graphics2D ? That is what I am talking about. It has lots of goodies besides antialiasing - style, scaling, rotations, etc. Best >P. Peter Murray-Rust Unilever Centre for Molecular Informatics Chemistry Department, Cambridge University Lensfield Road, CAMBRIDGE, CB2 1EW, UK Tel: +44-1223-763069 |
From: Egon W. <eg...@sc...> - 2004-06-07 18:39:13
|
On Monday 07 June 2004 18:27, Miguel wrote: > You can then use > > g2d.setRenderingHint(...) > > to turn on antialiasing. Indeed. Just did that. The result is amazing (as always with anti-aliasing). It will be a rendering option in JCP 2.0.2. Egon |
From: Miguel <mi...@jm...> - 2004-06-07 18:53:03
|
> On Monday 07 June 2004 18:27, Miguel wrote: >> You can then use >> >> g2d.setRenderingHint(...) >> >> to turn on antialiasing. > > Indeed. Just did that. The result is amazing (as always with > anti-aliasing). Very good ... glad it worked out :-) Miguel |