Dear RDKitters,
on my Win7/32 bit /RDKit system, I just installed aggdraw, but apparently
without great success:
"
---------------------------------------------------------------------------
IOError Traceback (most recent call
last)
<ipython-input-7-8252074dc7a2> in <module>()
----> 1 Draw.MolsToGridImage(mols)
C:\RDKit_2013_03_1\rdkit\Chem\Draw\__init__.pyc in MolsToGridImage(mols,
molsPerRow, subImgSize, legends, **kwargs)
252 row = i//molsPerRow
253 col = i%molsPerRow
--> 254
res.paste(MolToImage(mol,subImgSize,legend=legends[i],**kwargs),(col*subImgSize[0],row*subImgSize[1]))
255 return res
256
C:\RDKit_2013_03_1\rdkit\Chem\Draw\__init__.pyc in MolToImage(mol, size,
kekulize, wedgeBonds, **kwargs)
80 legend=''
81
---> 82 drawer.AddMol(mol,**kwargs)
83
84 if legend:
C:\RDKit_2013_03_1\rdkit\Chem\Draw\MolDrawing.pyc in AddMol(self, mol,
centerIt, molTrans, drawingTrans, highlightAtoms, confId,
flagCloseContactsDist, highlightMap, ignoreHs, highlightBonds, **kwargs)
467 else:
468 color = self.elemDict.get(atom.GetAtomicNum(),(0,0,0))
--> 469 self._drawLabel(symbol, pos, font,
color=color,orientation=orient)
470
471 if flagCloseContactsDist>0:
C:\RDKit_2013_03_1\rdkit\Chem\Draw\MolDrawing.pyc in _drawLabel(self,
label, pos, font, color, **kwargs)
282 y1 = pos[1]
283 labelP = x1,y1
--> 284 self.canvas.addCanvasText(label,(x1,y1),font,color,**kwargs)
285
286 def
AddMol(self,mol,centerIt=True,molTrans=None,drawingTrans=None,
C:\RDKit_2013_03_1\rdkit\Chem\Draw\aggCanvas.pyc in addCanvasText(self,
text, pos, font, color, **kwargs)
81 orientation=kwargs.get('orientation','E')
82 color = convertColor(color)
---> 83 aggFont =
Font(color,faceMap[font.face],size=font.size*self.fontScale)
84
85 blocks = list(re.finditer(r'\<(.+?)\>(.+?)\</\1\>',text))
IOError: cannot load font (no text renderer)
"
freetype2 was installed via the package provided from this web site:
http://gnuwin32.sourceforge.net/packages/freetype.htm
Apparently, freetype2 is still not supported when running the aggdraw
installtion.
For doing this, I changed aggdraw's setup.py to point to the correct
freetype2 installation, but then the aggdraw installation gives a nasty
error:
"
running install
running build
running build_ext
building 'aggdraw' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\agg2
creating build\temp.win32-2.7\Release\agg2\src
creating build\temp.win32-2.7\Release\agg2\font_freetype
C:\Anaconda\Scripts\gcc.bat -mdll -O -Wall -DHAVE_FREETYPE2 -Iagg2/include
-Iagg2/font_freetype -Ifreetype2.3.5.1/include
-Ifreetype2.3.5.1/include/freetype2 -IC:\Anaconda\include -IC:\Anaconda\PC
-c aggdraw.cxx -o build\temp.win32-2.7\Release\aggdraw.o
In file included from agg2/font_freetype/agg_font_freetype.h:28:0,
from aggdraw.cxx:60:
agg2/include/agg_scanline_storage_bin.h: In member function 'unsigned int
agg::scanline_storage_bin::byte_size() const':
agg2/include/agg_scanline_storage_bin.h:247:38: warning: unused variable
'sp' [-Wunused-variable]
aggdraw.cxx: In member function 'void
draw_adaptor<PixFmt>::drawtext(float*, PyObject*, FontObject*)':
aggdraw.cxx:332:45: error: there are no arguments to 'text_getchar' that
depend
on a template parameter, so a declaration of 'text_getchar' must be
available [-fpermissive]
aggdraw.cxx:332:45: note: (if you use '-fpermissive', G++ will accept your
code, but allowing the use of an undeclared name is deprecated)
aggdraw.cxx: In function 'PyObject* draw_new(PyObject*, PyObject*)':
aggdraw.cxx:504:71: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
aggdraw.cxx:530:67: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
aggdraw.cxx:533:69: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
aggdraw.cxx:536:69: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
aggdraw.cxx:539:71: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
aggdraw.cxx: In function 'agg::rgba8 getcolor(PyObject*, int)':
aggdraw.cxx:639:72: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings]
aggdraw.cxx: In function 'PyObject* draw_textsize(DrawObject*,
PyObject*)':
aggdraw.cxx:968:13: warning: unused variable 'error' [-Wunused-variable]
aggdraw.cxx: In function 'PyObject* draw_flush(DrawObject*, PyObject*)':
aggdraw.cxx:1059:72: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1059:72: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx: In function 'void draw_dealloc(DrawObject*)':
aggdraw.cxx:1114:18: warning: deleting object of abstract class type
'draw_adaptor_base' which has non-virtual destructor will cause undefined
behaviour [-Wdelete-non-virtual-dtor]
aggdraw.cxx: In function 'PyObject* pen_new(PyObject*, PyObject*,
PyObject*)':
aggdraw.cxx:1133:65: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1133:65: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1133:65: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx: In function 'PyObject* brush_new(PyObject*, PyObject*,
PyObject*)':
aggdraw.cxx:1164:56: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1164:56: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx: In function 'PyObject* font_new(PyObject*, PyObject*,
PyObject*)':
aggdraw.cxx:1195:72: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1195:72: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1195:72: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
aggdraw.cxx:1195:72: warning: deprecated conversion from string constant
to 'char*' [-Wwrite-strings]
In file included from agg2/font_freetype/agg_font_freetype.h:35:0,
from aggdraw.cxx:60:
agg2/include/agg_font_cache_manager.h: In instantiation of 'void
agg::font_cache_manager<FontEngine>::init_embedded_adaptors(const
agg::glyph_cache*, double, double) [with FontEngine =
agg::font_engine_freetype_int32]':
aggdraw.cxx:338:13: required from 'void
draw_adaptor<PixFmt>::drawtext(float*, PyObject*, FontObject*) [with
PixFmt = agg::pixel_formats_rgba32<agg::order_rgba32>; PyObject =
_object]'
aggdraw.cxx:1738:1: required from here
agg2/include/agg_font_cache_manager.h:306:17: warning: enumeration value
'glyph_data_invalid' not handled in switch [-Wswitch]
error: command 'gcc' failed with exit status 1
"
This looks more like an aggdraw/windows issue, but maybe someone has run
into a similar issue..
The only instances on the mailing list I found:
https://www.mail-archive.com/[email protected]/msg00867.html
https://www.mail-archive.com/[email protected]/msg02764.html
https://www.mail-archive.com/[email protected]/msg02763.html
One topic was even iniated by myself, but at that time, I had issues on a
Linux system.
Cheers & Thanks,
Paul
This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient, you
must not copy this message or attachment or disclose the contents to any other
person. If you have received this transmission in error, please notify the
sender immediately and delete the message and any attachment from your system.
Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept
liability for any omissions or errors in this message which may arise as a
result of E-Mail-transmission or for damages resulting from any unauthorized
changes of the content of this message and any attachment thereto. Merck KGaA,
Darmstadt, Germany and any of its subsidiaries do not guarantee that this
message is free of viruses and does not accept liability for any damages caused
by any virus transmitted therewith.
Click http://www.merckgroup.com/disclaimer to access the German, French,
Spanish and Portuguese versions of this disclaimer.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss