Wednesday, August 29, 2007

zoomfactor




Scott noticed problems rendering bonds when zooming out with JChemPaint and wondered if this problem currently is being addressed (maybe in the Programmeerzomer)?
So well, here some pictures with zoom set to 0.5, 0.2 and 0.1. As you can see, the bonds are still visible here. I don't know what bonds Scott saw became faint/disappeared so I don't know if my code fixes this issue.

formal charge x,y etc.


So here a picture with formal charges, chemist people will probably noticethat the molecule with such charges doesn't make any sense ;)

The question however here is if the positioning of the '2-', '2+' and '-' is done properly. So comments are welcome!

hydrogen shown


Seems like my last blog was ages ago.. so time for a new one!

The new code now renders the hydrogen stuff correctly at the proper location. At the old jchempaint it was either left or right of the Atom symbol but now it's also possible for the 'H' to be shown above/below the Atom symbol if that looks 'better' on that molecule. You can see this at the picture.
Also no need anymore for screenshots, this picture is created with BufferedImage / ImageIO.write (code in TestRenderer / Java2DRenderer @ http://cdk.svn.sf.net/..../progz/).
Comments are welcome as always..