[cairo-commit] cairo-5c/examples animate.5c,1.2,1.3
Keith Packard
commit at pdx.freedesktop.org
Tue Dec 14 23:04:52 PST 2004
- Previous message: [cairo-commit] cairo-5c ChangeLog, 1.4, 1.5 cairo-5c.h, 1.2,
1.3 gtk.c, 1.1, 1.2 init.c, 1.3, 1.4 surface.c, 1.2, 1.3
- Next message: [cairo-commit] cairo-5c ChangeLog, 1.5, 1.6 Makefile.am, 1.2,
1.3 autogen.sh, 1.1.1.1, 1.2 cairo-5c.h, 1.3, 1.4 cairo.5c,
NONE, 1.1 configure.in, 1.2, 1.3 draw.c, 1.2, 1.3 gstate.c,
1.2, 1.3 gtk.c, 1.2, 1.3 init.c, 1.4, 1.5 surface.c, 1.3,
1.4 text.c, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /cvs/cairo/cairo-5c/examples
In directory gabe:/tmp/cvs-serv29582/examples
Modified Files:
animate.5c
Log Message:
2004-12-14 Keith Packard <keithp at keithp.com>
* cairo-5c.h:
* gtk.c: (gtk_repaint_timeout), (dirty_x), (disable_x), (enable_x):
* init.c: (nickle_init):
* surface.c: (enable_cairo_5c), (disable_cairo_5c),
(do_Cairo_enable), (do_Cairo_disable):
Add enable/disable to take advantage of double buffering for
smooth animation.
* examples/animate.5c:
Use enable/disable to smooth this animation out
Index: animate.5c
===================================================================
RCS file: /cvs/cairo/cairo-5c/examples/animate.5c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animate.5c 14 Dec 2004 08:34:27 -0000 1.2
+++ animate.5c 15 Dec 2004 07:04:50 -0000 1.3
@@ -43,7 +43,7 @@
void transform (foreign cr, real t)
{
translate (cr, 50, 50);
- rotate (cr, t * pi / 30);
+ rotate (cr, t * pi / 60);
}
void animate (foreign cr, mutex l, int n, int m)
@@ -52,6 +52,7 @@
for (;;)
{
Mutex::acquire (l);
+ disable (cr);
save (cr);
translate (cr, n * 100, m * 100);
set_rgb_color (cr, 1, 1, 1);
@@ -60,6 +61,7 @@
transform (cr, t);
picture (cr);
restore (cr);
+ enable (cr);
Mutex::release (l);
sleep (100);
t += n + m + 1;
- Previous message: [cairo-commit] cairo-5c ChangeLog, 1.4, 1.5 cairo-5c.h, 1.2,
1.3 gtk.c, 1.1, 1.2 init.c, 1.3, 1.4 surface.c, 1.2, 1.3
- Next message: [cairo-commit] cairo-5c ChangeLog, 1.5, 1.6 Makefile.am, 1.2,
1.3 autogen.sh, 1.1.1.1, 1.2 cairo-5c.h, 1.3, 1.4 cairo.5c,
NONE, 1.1 configure.in, 1.2, 1.3 draw.c, 1.2, 1.3 gstate.c,
1.2, 1.3 gtk.c, 1.2, 1.3 init.c, 1.4, 1.5 surface.c, 1.3,
1.4 text.c, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list