gtkD: How to paint to screen for animation
Ron Tarrant
rontarrant at gmail.com
Tue Mar 19 15:33:19 UTC 2019
On Tuesday, 19 March 2019 at 00:54:34 UTC, Michelle Long wrote:
> I've added a function to addOnDraw for a DrawingArea and it
> paints using the code I have when I resize.
>
> I added a queueDraw in threadsAddIdle and it seems to draws the
> screen immediately but it does not seem to be called again.
>
> If I put queueDraw inside the addOnDraw routine then the
> animation works but it is quite slow, about 1 fps and cpu usage
> is 100% without it, it is 0%.
I haven't dug into this stuff yet for my blog, but I have sourced
some references. Here's one that may help:
https://www.cairographics.org/threaded_animation_with_cairo/
More information about the Digitalmars-d-learn
mailing list