[cairo-commit] cairo-5c/examples animate.5c,1.5,1.6 pie.5c,1.5,1.6

Keith Packard commit at pdx.freedesktop.org
Sat Dec 18 16:06:28 PST 2004


Committed by: keithp

Update of /cvs/cairo/cairo-5c/examples
In directory gabe:/tmp/cvs-serv31041/examples

Modified Files:
	animate.5c pie.5c 
Log Message:
2004-12-18  Keith Packard  <keithp at keithp.com>

	* cairo.5c:
	Add matrix operations
	
	* cairo-5c.h:
	* text.c: (do_Cairo_set_font), (do_Cairo_transform_font):
	* init.c: (nickle_init):
	Add set_font and transform_font interfaces
	
	* examples/animate.5c:
	* examples/pie.5c:
	use set_font interface
	
	* surface.c: (do_Cairo_dup):
	Duplicate gstate in dup operator


Index: animate.5c
===================================================================
RCS file: /cvs/cairo/cairo-5c/examples/animate.5c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- animate.5c	18 Dec 2004 08:16:28 -0000	1.5
+++ animate.5c	19 Dec 2004 00:06:26 -0000	1.6
@@ -81,8 +81,6 @@
 void animate (cairo_t cr, int n, int m)
 {
     cr = dup (cr);
-    select_font (cr, "Gadget", font_slant_t.NORMAL, font_weight_t.NORMAL);
-    scale_font (cr, 20);
     real t = 0;
     for (;;)
     {
@@ -105,6 +103,7 @@
 {
     cairo_t cr = new ();
     
+    set_font (cr, "Gadget-20");
     fork animate (cr, 0, 0);
     fork animate (cr, 1, 0);
     fork animate (cr, 2, 0);

Index: pie.5c
===================================================================
RCS file: /cvs/cairo/cairo-5c/examples/pie.5c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pie.5c	18 Dec 2004 08:16:28 -0000	1.5
+++ pie.5c	19 Dec 2004 00:06:26 -0000	1.6
@@ -163,8 +163,7 @@
 {
     cairo_t cr = new (700, 700);
     sleep (100);
-    select_font (cr, "sans-serif", font_slant_t.NORMAL, font_weight_t.NORMAL);
-    scale_font (cr, 10);
+    set_font (cr, "sans\\-serif-10");
     spiral_text (cr, sprintf ("%.-g", pi_value (bits)));
 }
 




More information about the cairo-commit mailing list