On Thu, Jul 23, 2009 at 3:00 PM, Glimmer Labs<glimmer07@...400...> wrote:
At a glance, I don't see API for bitmap manipulation: placing, sizing, moving ... I am very interested in scripting the creation of documents combining bitmap, vector and text.
Thanks, Kent
I've added a function to import an image. It returns an id like all the other shape creation functions and can be used with any of the (non-path-specific) API functions to move, rotate, resize, set width/height (will distort), etc. It pretty much behaves like a rectangle without path or style.
Wow. I'd given up on the old way several times, now 5 lines does it:
import dbus bus = dbus.SessionBus() inkdoc1 = bus.get_object('org.inkscape', '/org/inkscape/desktop_0') doc1 = dbus.Interface(inkdoc1, dbus_interface="org.inkscape.document") print doc1.image(10 ,10, '/home/ktenney/Firefox_wallpaper.png')
$ image2816
That is _so_ cool.
Is there going to be collaboration on building a Python class library for the dbus API?
Thanks, Kent
The only thing you can't do right now is trace it into a path, since that is a complicated operation with many variables.
-Soren