[cairo-commit] cairo-5c/examples animate.5c,1.9,1.10
Keith Packard
commit at pdx.freedesktop.org
Sat Jul 9 16:40:57 PDT 2005
- Previous message: [cairo-commit] cairo-5c ChangeLog, 1.25, 1.26 cairo-5c.h, 1.15,
1.16 cairo.c, 1.6, 1.7 gtk.c, 1.10, 1.11 surface.c, 1.12, 1.13
- Next message: [cairo-commit] libpixman ChangeLog,1.82,1.83
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /cvs/cairo/cairo-5c/examples
In directory gabe:/tmp/cvs-serv5059/examples
Modified Files:
animate.5c
Log Message:
2005-07-09 Keith Packard <keithp at keithp.com>
* cairo-5c.h:
* cairo.c: (cairo_5c_get):
* examples/animate.5c:
* gtk.c: (configure_event), (expose_event), (delete_drawing_area),
(gtk_repaint), (gtk_tool_free), (cairo_5c_tool_create),
(cairo_5c_tool_destroy):
* surface.c: (create_cairo_window):
Pass GtkPixmap objects around as they are reference counted.
Use proposed new cairo_xlib_surface_set_drawable API to
deal with window back-buffer resize issue.
Index: animate.5c
===================================================================
RCS file: /cvs/cairo/cairo-5c/examples/animate.5c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- animate.5c 7 Jun 2005 03:41:36 -0000 1.9
+++ animate.5c 9 Jul 2005 23:40:55 -0000 1.10
@@ -36,29 +36,6 @@
autoimport Cairo;
-void clear (cairo_t cr) {
- save (cr);
- identity_matrix (cr);
- set_source_rgb (cr, 1, 1, 1);
- int w = width (cr);
- int h = height (cr);
- move_to (cr, 0, 0);
- line_to (cr, w, 0);
- line_to (cr, w, h);
- line_to (cr, 0, h);
- fill (cr);
- restore (cr);
-}
-
-void rectangle (cairo_t cr, real x, real y, real w, real h)
-{
- move_to (cr, x, y);
- rel_line_to (cr, w, 0);
- rel_line_to (cr, 0, h);
- rel_line_to (cr, -w, 0);
- close_path (cr);
-}
-
void picture (cairo_t cr)
{
save (cr);
@@ -81,7 +58,7 @@
void animate (cairo_t cr, int n, int m)
{
cr = dup (cr);
- set_font (cr, "Gadget-50");
+ set_font (cr, "Gadget-24");
real t = 0;
for (;;)
{
@@ -105,13 +82,11 @@
void main ()
{
cairo_t cr = new ();
+ thread t;
- fork animate (cr, 0, 0);
- fork animate (cr, 1, 0);
- fork animate (cr, 2, 0);
- fork animate (cr, 0, 1);
- fork animate (cr, 1, 1);
- thread t = fork animate (cr, 2, 1);
+ for (int y = 0; y < 10; y++)
+ for (int x = 0; x < 10; x++)
+ t = fork animate (cr, x, y);
Thread::join (t);
}
- Previous message: [cairo-commit] cairo-5c ChangeLog, 1.25, 1.26 cairo-5c.h, 1.15,
1.16 cairo.c, 1.6, 1.7 gtk.c, 1.10, 1.11 surface.c, 1.12, 1.13
- Next message: [cairo-commit] libpixman ChangeLog,1.82,1.83
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list