Hi Jon, > Looking though it, it seems that you based this code on an older > version of libmypaint, before MyPaint 1.1?
Checked the tar.gz from which I extracted the files and it seems it is "Version 1.0.0". I remember I started to look at this code some time ago, unfortunately I had no time work on it seriously... And I forget to update to the latest version when I started again to work on it... > Also, you seem to have renamed every .c file to .cpp? Why? Oops... I did that month ago as a turn around against some no-brain MSVC issue and forget to remove this file extension modification... As you suggest, I'll get the latest version (keeping the correct extensions) and will use the correct API (begin/end atomic). Thanks for the info about the brush color and other settings ! Looks obvious now that you say it... > Another thing is that the delta-time calculation should normally be done from the > input events you get from your windowing system, to not be dependent on CPU > load. But it seems Qt does not expose that!? Digging into QInputEvent and QEvent and did not find any time information. However, I think I can find some turn-around (no fully efficient but should be ok) >From the mouse/tablet events, I do not raise any synchronous repaint event. Update() send an asynchronous event which is processed when idle (it could be an issue too as the user could have some "step by step" renderer. I'll make some tests and let you know) So, it may not be as bad as it looks... draw_dab could even being done by another thread/CPU. In the demo app, I will not try any advanced technics but in my application, I already have a "drawing mode" which is fast (and dirty) and a mouse released event which is drawing everything very accurately (in a second time). I could eventually hack Qt or ask for such feature in main tree. (but I doubt that Digia or qt-project will want to modifiy QEvent prototype) > Also, I _believe_ that the correct thing to do is to new_stroke() on button/tablet down > to start a stroke, then reset() on button/tablet up to finish it. Ok. Sounds logical as I had some weird behavior with my code. Something was missing... I should update to the latest version and fix all these issues and come back to you in few hours... Thanks again for your feed-back & your help. Seb _______________________________________________ Mypaint-discuss mailing list [email protected] https://mail.gna.org/listinfo/mypaint-discuss
