Hi,

I wrote this simplistic application to learn libMyPaint logic & API.
It can be used as a demonstration of LibMyPaint API use...
(for guys like me who would like to use libMyPaint in their application)

(well... for now they are too much bug to use it as an example...)

For now, I had to include these 4 GPL files : brushmodes.cpp/.h and mypaint-tiled-surface.cpp/.h.
Note for anyone who would like to include this code into a proprietary project : these 2 files are GPL and as long as you keep them in this mini-project, the whole project is GPL and can not be include into a proprietary project. (I should write some replacement for these files as a next step - unless their license is modified)

License is the very same than libmypaint (ISC ..?) regarding the code I wrote (ONLY ./miniQtProject directory)
Brushes have various licenses...
json-c contains the stand-alone json-c project (under its own license).

To build this demo project :

- if you get it from an archive, unzip it and put the directory "demoQt4" into /mypaint/brushlib
- build mypaint using scons
- (if you are using windows, bad luck, scons build fail and you need a Unix computer to generate 3 files that you may copy to your windows source)
- Copy the files from "modifiedFiles" to brushlib (overwrite the old ones)
- Qt 4.x is required. (do some "sudo apt-get install qt4-dev-tools" for Ubuntu 12.04 or libqt4-dev-bin for Ubuntu 12.10)
- from demoQt4, try : qmake (to build makefile or equivalent)
- and finally : make  (or nmake on windows)

It should build demoQt4(.exe).

Run it from this demoQt4 directory as the application uses a relative path to the brushes directory.

Note that I build this on Windows, using MSVC 2010 and on Linux xubuntu 12.04 using GCC, but, as this is pure Qt code, it is cross-platform. You may experience some little issues if using another environment. Any feed-back is welcome.

TODO :

Right now it doesn't work properly for many brushes. I think it is some obvious mistake that libMyPaint dev guys will point out quickly.

Use more API calls to demonstrate the use of the lib.

Write some replacement for brushmodes.cpp and mypaint-tiled-surface.cpp, unless Jon change the licence info.

No optimization at all will be done. Right now, the surface is not infinite (but quite huge) and the drawing may be somehow a bit slow. I do not care. This code is just an example. Optimize it for your own surface/canvas !

Well... this is just few hours of work ;-) What do you expect !