Hi Chris,

On Thu, Aug 13, 2009 at 11:38 AM, Chris
Arthur<chris.art...@bristol.ac.uk> wrote:
> I've just installed RDKIt and everything seems to have gone fine.
>
> But..when i run the example code given in the wiki for creating 2d
> pictures i get an error with cairo
>
> Line37 of cairocanvas.py
>
> stride=cairo.ImageSurface.format_stride_for_width (cairo.FORMAT_ARGB32,
> AttributeError:type object 'cairo.ImageSurface' has no attribute
> 'format_stride_for_width'
>
> I have tried this on two boxes running Ubuntu 9.04 and one using Fedora
> 8, and they all give the same error
>
>  format_stride_for_width is definately in Ciaro (currently v 1.8.8)
> <http://cairographics.org/documentation/cairomm/reference/classCairo_1_1ImageSurface.html>
>
> Oddly Ubuntu 9.04 uses the libcairo2 version is 1.8.6-1
>
> Does anyone have any suggestions?

I'm afraid that I don't really. I believe that I have only ever
managed to get cairo and pycairo working on one machine (running
ubuntu 8.10; I haven't tried since upgrading to 9.04). Cairo is
something I'd love to make more use of, but the number of dependencies
is just too daunting to me.

Have you tried using one of the other RDKit canvas options? The agg
canvas produces very high quality output and is somewhat more self
contained than the cairo one (though you need to get aggdraw from
subversion). The sping-based canvases produce lower quality raster
output (not antialiased) but are at least completely contained in the
RDKit distribution.

-greg

Reply via email to