Hi,

The simplest way to get the smiles in the images would be to have this
in the paint method:

        g.setColor(Color.BLACK);
        g.setFont(getFont());
        g.drawString(new
SmilesGenerator().createSMILES((IMolecule)this.mol),100, 100);

which is pretty inefficient, but could of course be improved by
generating the smiles string only once, and so on.

Unfortunately a bug that I had forgotten about (and probably started
me on the quest to make a new renderer, almost a year ago :) means
that the letters are flipped on the up-down axis, making 'N' into the
russian letter for 'i'.

Indeed, I can't get the text for the atom symbols to appear at all,
for no clear reason. It seems that it gets to the point of the call
which should produce text on the screen, but nothing appears. Oh, no
it seems that it is drawing it very, very small.

Well, we are in the process of moving to the new renderer, which
doesn't have these problems. Currently it has a different set of
problems, but they are more easily solvable in the new architecture.

So I can offer some meagre advice on the old rendering code, or an
excess of information on the new one, but I don't think that fixes are
planned for the old code.

gilleain

On Thu, Apr 30, 2009 at 2:46 PM, Beesley, Angela
<angela.bees...@unilever.com> wrote:
>
> Hi Gilleain:
>
> Thanks for your reply, the st2d.java now works fine with your
> suggestions. A couple of things I would like to do is to include some
> text in each cell of the output table, for example include the SMILES
> strings for each molecule, could you please tell me how can I do that?.
> Also the picture looks ok but the molecules are drawn with a light grey
> color instead of black (or blue), how can I change the line color, I
> have tried "r2dm.setColorAtomsByType(true)" but it doesn't work.
>
> Thanks,
>
> Angela
>

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to