[cairo-commit] cairo-demo/gtkcairo_slide ChangeLog, 1.9, 1.10 Makefile, 1.2, 1.3 gtkcairo_slide.c, 1.4, 1.5 puzzle.c, 1.8, 1.9

Oeyvind Kolaas commit at pdx.freedesktop.org
Sun Aug 7 17:02:54 PDT 2005


Committed by: pippin

Update of /cvs/cairo/cairo-demo/gtkcairo_slide
In directory gabe:/tmp/cvs-serv2272

Modified Files:
	ChangeLog Makefile gtkcairo_slide.c puzzle.c 
Log Message:
update to current cairo api

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/ChangeLog,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ChangeLog	29 Apr 2005 18:24:10 -0000	1.9
+++ ChangeLog	8 Aug 2005 00:02:52 -0000	1.10
@@ -1,4 +1,8 @@
-2005-04-29  Øyvind Kolås <pippin at freedesktop.org>
+2005-08-08  Øyvind Kolås  <pippin at freedesktop.org>
+
+	* puzzle.c: updated to work with newer cairo api.
+
+2005-04-29  Øyvind Kolås  <pippin at freedesktop.org>
 
 	* gtkcairo_slide.c: reordered functions, made game easier and added
 	welcome scroll/splash.

Index: Makefile
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile	21 Feb 2005 20:32:17 -0000	1.2
+++ Makefile	8 Aug 2005 00:02:52 -0000	1.3
@@ -2,7 +2,7 @@
 OBJS   = $(SRCS:.c=.o)
 
 LIBS   +=`pkg-config --libs gtkcairo`
-CFLAGS +=`pkg-config --cflags gtkcairo`
+CFLAGS +=`pkg-config --cflags gtkcairo` -g
 CC     = gcc
 
 all: dep gtkcairo_slide

Index: gtkcairo_slide.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/gtkcairo_slide.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- gtkcairo_slide.c	29 Apr 2005 18:24:10 -0000	1.4
+++ gtkcairo_slide.c	8 Aug 2005 00:02:52 -0000	1.5
@@ -137,7 +137,7 @@
 #define LINE_HEIGHT 1.3
 
     cairo_set_font_size (cr, h*FONT_HEIGHT);
-    cairo_select_font (cr, "Sans", 0, 0);
+    cairo_select_font_face (cr, "Sans", 0, 0);
 
       {
         GList *item = messages;

Index: puzzle.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/puzzle.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- puzzle.c	20 Jan 2005 16:33:29 -0000	1.8
+++ puzzle.c	8 Aug 2005 00:02:52 -0000	1.9
@@ -386,7 +386,7 @@
   if (cairo_status (cr))
     {
       fprintf (stderr, "Cairo is unhappy: %s\n",
-               cairo_status_string (cr));
+               cairo_status_to_string (cairo_status (cr)));
     }
 
   /* since we are requesting motion hints,. make sure another motion
@@ -570,6 +570,9 @@
   int item_no;
   cairo_t *cr = gtk_cairo_get_cairo (GTK_CAIRO (puzzle));
 
+  if (!cr)
+    {
+    }
   cairo_save (cr);
 
   cairo_scale (cr, puzzle->ratio_x, puzzle->ratio_y);
@@ -577,7 +580,7 @@
 
   for (item_no=0;item_no<puzzle->rows*puzzle->cols-1;item_no++)
     {
-      PuzzleItem *item= & (puzzle->item [item_no]);
+      PuzzleItem *item = & (puzzle->item [item_no]);
 
       cairo_save (cr);
       cairo_rectangle_round (cr, item->x-0.4, item->y-0.4, 0.8, 0.8, 0.4);
@@ -696,8 +699,8 @@
   style = GTK_WIDGET (puzzle)->style;
 
   cairo_save (cr);
-    cairo_select_font (cr, "sans", 0, 0);
-    cairo_scale_font (cr, 0.35);
+    cairo_select_font_face (cr, "sans", 0, 0);
+    cairo_set_font_size (cr, 0.35);
     cairo_scale (cr, puzzle->ratio_x, puzzle->ratio_y);
     cairo_translate (cr, 0.5, 0.5);
 




More information about the cairo-commit mailing list