User c1499b3d95
23-02-2012 18:06:19
Hello,
Ruchir here from IDBS.
I am trying to read and write MTextBox to and from MRV in CML format. The issues that I am getting are with the size of the bounding boxes of the text box not being accurate when reading or writing and then displaying it in our IDBS Chemistry Java Renderer:
Writing to MRV: The above text box or attached Figure 1.png, has Arial 10 as font size, is displayed and wrapped correctly at 100% zoom . I then wrote this file out into MRV format which have the below metioned MPoints (attached as Text1 - IDBS.MRV):
<MPoint x="-18.6412" y="12.0101" />
<MPoint x="-3.71645" y="12.0101" />
<MPoint x="-3.71645" y="1.15207" />
<MPoint x="-18.6412" y="1.15207" />
If I opened this file in MarvinSketch - the text is cut off:
As you can see, the text has now been cut off! Everything after valin till the end is in the text box but not displayed - you would have to resize it again. These are the text box sizes / font size that we also write out for CDX and SKC file formats and they render correctly in Symyx Draw & ChemDraw, however I cannot get the size to be accurate such that when autosize=false, the full text box is displayed - I cannot see what I have done wrong. Also note that the width is also not accurate, it is smaller when displayed in MarvinSketch. Is there a factor that you add/remove in the bounds?
Also note that if you manually resize text from Symyx Draw & ChemDraw and paste it into MarvinSketch, they also don't render accurately as they were in their respective editors before. Symyx ones do not have the width property accurately shown, and ChemDraw ones that have a fixed width, are actually fully autosized, so they do not wrap at all.
Reading MRV: