Hi Dmitry, The idea is that 'scale' means the amount to transform model coordinates to get a particular bond length, and 'zoom' is the transform to the bond length.
To give a concrete example, lets say we have H2 in a molfile. The distance between the atoms is 1 unit (not necessarily a real unit, like picometers). If the bond length is 10 pixels, then the scale is 10. If the zoom is then 0.9, then the line drawn to represent the bond will be 9 pixels. The reason for this is that models may have different scales, and the transform uses this to render at a particular bond length. The zoom is user-settable, and only reflects how to change the bond length. So really, it is bond length and zoom that are redundant - they are different ways to think of the same thing, specifically how long the lines are between atoms. gilleain On Tue, Jan 18, 2011 at 9:59 AM, Dmitry Katsubo <dmitry.kats...@gmail.com> wrote: > Many thanks to everybody who has replied to help me. > > Gilleain, nice hint: it has solved the problem. > > While looking into CDK code, however, I was not able to interpret the > difference between "scale" and "zoom" parameters. They both seem to > serve the same goal... > > On 14.01.2011 17:53, gilleain torrance wrote: >> Hi Dmitry, >> >> Your code needs the line: >> >> chemicalMoleculeRenderer.setup(molecule, new Rectangle(800, 600)); >> >> just before the call to paint. What this does is set the scale and >> center in the renderer. If you do this, you get a picture of adenine >> (attached). Yes, it is upside-down.... >> >> gilleain >> >> 2011/1/14 Dmitry Katsubo <dmitry.kats...@gmail.com>: >>> Dear CDK users, >>> >>> I am using cdk-1.3.8.jar + cdk-jchempaint-16.jar. When I render a >>> molecule, only one atom is rendered (see attachment). Can anybody >>> provide hint about what combination of CDK and cdk-jchempaint is stable >>> or maybe my code is not adequate? >>> >>> Thanks in advance. > > -- > With best regards, > Dmitry > ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user