On Wed, 1 Sep 2010 16:18:38 -0500
Terry Brown <[email protected]> wrote:

> There does still seem to be something wrong with the --png flag - I'll 
> install leo in win 7 py 2.6 and see what happens.

This script is working for me in windows 7, py 2.6, qt 4.7.  Obviously it takes 
some shortcuts, it's up to the user to work out how to get inkcall.py on 
PYTHONPATH etc.
path should be absolute, as it could end up anywhere.

    import PyQt4.QtGui
    app = g.app.gui.qtApp
    pix = PyQt4.QtGui.QPixmap
    w = pix.grabWindow(app.activeWindow().winId())
    path = 'test.png'
    w.save(path,'png')
    
    import sys
    sys.path.append("c:\\users\\tbrown\\inkcall")
    import inkcall
    reload(inkcall)  # for dev. env.
    ik = inkcall.InkCall({
      'template': "c:\\users\\tbrown\\inkcall\\template.svg",
      'inkscape': r"c:\Program Files (x86)\Inkscape\inkscape.exe" ,
    })
    g.es('generate SVG')
    ik.make_svg(path, ['test this'], [33])
    g.es('edit SVG')
    ik.edit_svg(path)
    g.es('generate PNG')
    ik.make_png(path)

I think I'll try and make the fail output more useful, seeing there seems to be 
lots of ways for this to fail to connect to various files it needs.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to