Hi Vest,
Thanks for your reply.
Actually, I'm currently doing my drawings using Cairo, and it work
pretty well. But when there is a lot of drawings (like around 200,000
I'd say), it begins to slow down. So I was looking around to see
what's the best solution for what I'm doing.
I've read this article from GUADEC 2014:
http://www.bassi.io/articles/2014/07/29/guadec-2014-gsk/
I understood there that Clutter is not a tool that should be used for
drawing. Compositing: yes; drawing: no ;)
So I think I'll do as you said: I'll keep Cairo and simply try to find
the most optimized way to draw all these little rectangles. Since I'll
try to do a responsive interface, I don't think I could bufferize the
whole drawing into an image, because depending where the user is
pointing, the drawing beneath the pointer can change, so the image
will change all the time anyway, so the buffering won't be very
efficient.
If you want, you'll find screenshots of what I'm doing here:
https://plus.google.com/photos/+RomainFailliot/albums/5994060420563947665/5994061265644646130?pid=5994061265644646130&oid=111931671734626727541
In these screenshots the drawing is pretty fast, but sometime there
can be a lot more "benches" to draw and that's where it gets
complicated.
There's also the source code: https://github.com/MightyCreak/libbench
Thanks again for your help!
Creak
2014-08-02 6:14 GMT-04:00 Vest . <vest 84 gmail com>:
> Hello Creak,
>
> Actually, the clutter is not a toolkit for drawing only. It allows you to
> create 2d/3d user interfaces using images that you provide.
> Yes, you can display actors that have the image drawn at runtime, e.g.
> extract the Cairo context or use cogl. Some of good examples are available
> here: http://github.com/clutter-project/toys
>
> My suggestion to you is to choose, e.g. Cairo toolkit and create an image in
> memory, and then when the image is ready, simply copy it to the window
> (https://developer.gnome.org/gtk3/3.0/gtk-getting-started.html search for
> Cairo).
>
> What do you think?
>
> Kind regards,
> Vest