Hi Zach,

*Renderer.toScreenCoordinates should do what you need
https://github.com/cdk/cdk/blob/master/display/renderbasic/src/main/java/org/openscience/cdk/renderer/AbstractRenderer.java#L180-L184

If not I'll look into adding this, but essentially you should just need to
consider the scale parameter + margins if there are any (also perhaps the
zoom). I should also note that the y-axis in cdk is reversed from AWT.

Thanks
J

Regards,
John W May
john.wilkinson...@gmail.com

On 22 January 2015 at 23:09, Zachary Charlop-Powers <
zchar...@mail.rockefeller.edu> wrote:

>  Hello CDK Users/Developers,
>
>  I’ve recently been using CDK a bit and want to thank you for your hard
> work.
>
>  I am trying to use CDK to generate some custom visualizations and I am
> wondering if there is a way to obtain the on-screen coordinates of each
> atom from the AtomContainerRenderer. It looks like there was once a
> function, getScreenCoordinates that would do this, but I don’t see it
> anymore.   Although I am starting to understand how visualizations are
> generated, its still a bit opaque to me.   However, for a given bounding
> box, scale, and atom container it should be possible to obtain the
> coordinate where the atom will be drawn. I would appreciate any pointers on
> how to find do this.
>
>
>  Also, if anyone is interested I have put up a few blogposts on my foray
> into using CDK from Clojure to make pictures:
> http://zachcp.org/blog/2015/clojure-cdk-peptides/
> http://zachcp.org/blog/2015/basic-cdk-rendering/
>
>
>  Thanks,
> zach cp
>
>   Zach Charlop-Powers
> Post-Doctoral Fellow
> Laboratory of Genetically Encoded Small Molecules
> Rockefeller University
>
>  zchar...@rockefeller.edu
> zachcp.org
>
>
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to