mypaint / libmypaint

libmypaint, a.k.a. "brushlib", is a library for making brushstrokes which is used by MyPaint and other projects.
http://mypaint.org
Other
310 stars 86 forks source link

Python bindings #85

Closed fabioz closed 7 years ago

fabioz commented 7 years ago

I see that the MyPaint program (which is Python based) uses libmypaint, so, I guess there are bindings out there to some degree?

Anyways, it'd be really nice if I could do something as:

pip install libmypaint

to get the painting engine available in Python -- my own use case would be drawing in numpy arrays or QImages -- and it'd be very nice to use libmypaint on Python.

Is that something which would be feasible to have in the future?

achadwick commented 7 years ago

The right way of doing this is to use GObject-Introspection, which we already have primitive but untested bindings for. They could use some love, since MyPaint doesn't use them directly. Would you be interested in testing and sending patches?

Closing this issue, because Python-only bindings would be unhelpful when we already have support for multiple languages.

fabioz commented 7 years ago

Humm, not sure... as I'd like to use it to draw on numpy arrays or QImages, my plan was compiling with

--disable-introspection --without-glib

So, it'd be a no-go... (ideally I'd only have json-c as a dep -- note that I'm assuming that this is actually a valid use-case, but if it's not, please let me know).

Considering my use case is valid, I'll probably use something as pybind11 to do some bindings...