Hi Gilleain,

On 25 October 2010 13:16, gilleain torrance <gilleain.torrance@gmail.com> wrote:
On Mon, Oct 25, 2010 at 9:43 AM, Nina Jeliazkova
> What I would like to do is :
>
> 1)  given 2D rectangle, calculate and setup the transformation for the
> entire molecule (scale, whatever else matters).
>
> 2) draw parts of the molecule in subsequent boxes (inside the rectangle),
> somehow preventing the renderer to fit /scale each part separately.

So these are exactly the kinds of problems I've been working with
recently. There are several scenarios for rendering multiple
molecules:

a) Different zoom for each molecule, on identical size individual canvases
b) Same zooms, different sized canvases, variable total canvas size
c) As b, but everything with the same zoom to fit on a particular size of canvas

Yes, I am interested in c)  , because of rendering of e.g. salts in a single canvas.

I guess c) can be done externally as well (with image tags'
width/height attributes, for example).

Well,  my primary reason for diving into JCP rendering was to fix 2D rendering in  Toxtree  (swing application) , because of several bug reports from end users.  The same code is used in both Toxtree and REST services , so image tags are not really an option.


Sadly, these possibilities are
not easy to switch between in the CDK/JCP code at the moment. One way
might be to call "setup" for only _one_ of the atom containers, and
not for the other. Probably for the larger one.


I had in mind some workaround, may be it will be faster if you tell me it will work /not work , or what to look for:

- Assume all parts of a molecule have 2D coordinates.
- Add them into a single IAtomContainer
- Translate (in 2d molecule coordinates)  all the parts to arrange them as in adjacent rectangles.
(no renderer stuff up to this point)
- Use the renderer on on the entire IAtomContainer

For the last part to work, the renderer should not do anything with the coordinates, just transform them in screen space.

Do you think this will work?
Nina
 
gilleain

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Cdk-devel mailing list
Cdk-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-devel