[cairo] Cairo and animations
Pietro Incardona
asmprog32 at hotmail.com
Tue Dec 23 13:22:17 PST 2008
Unfortunately i has also changed
to this
// for(int k=0; k< 1000; ++j){
cairo_set_source_rgb (cr, (double)j/100.0, (double)j/100.0, 1.0 - (double)j/100.0);
cairo_move_to(cr, i,j/2);
cairo_line_to(cr, i+100,j/2);
cairo_stroke(cr);
}
// }
and also to this
// for(int k=0; k< 100; ++j){
cairo_set_source_rgb (cr, (double)j/100.0, (double)j/100.0, 1.0 - (double)j/100.0);
cairo_move_to(cr, i,j/2);
cairo_line_to(cr, i+100,j/2);
cairo_stroke(cr);
}
// }
and unfortunately the result are 1-2 frame / sec when the window is maximized . The animation
is smooth only when the window is very little for me
----------------------------------------
> Date: Tue, 23 Dec 2008 00:11:40 +0200
> From: jpihlaja at cc.helsinki.fi
> To: asmprog32 at hotmail.com
> CC: cairo at cairographics.org
> Subject: Re: [cairo] Cairo and animations
>
>
> Hi,
>
> On Mon, 22 Dec 2008, Pietro Incardona wrote:
>
>> For now I am not using my code, but your example code here
>> http://www.cairographics.org/threaded_animation_with_cairo/
>> I has downloaded ( and compiled ) the git cairo version
>
> [snip]
>
>> Started the example ./threaded_exampResult: 1 - 2 frame / sec
>
> The threaded example code is very slow on purpose. The point of
> the example is to show how to use threads to separate a slow
> rendering function from other parts of the application.
>
> If you look at the drawing function of the example it'll become
> clear: to make the rendering slow the example renders a linear
> gradient in a silly way (a differently solid coloured stroke for
> each horizontal line of the gradient), and if that wasn't slow
> enough it repeats rendering the same gradient 100x per frame to
> make absolutely sure it crawls. Simply removing the 100x looping
> makes it smooth for me.
>
> Cheers,
>
> Joonas
>
_________________________________________________________________
"Condividi e organizza le tue immagini con Windows Live Foto.
"
http://www.microsoft.com/windows/windowslive/photos.aspx
More information about the cairo
mailing list