[cairo-commit] pycairo/examples/cairo_snippets/snippets text.py, 1.1, 1.2 text_align_center.py, 1.1, 1.2 text_extents.py, 1.1, 1.2

Steve Chaplin commit at pdx.freedesktop.org
Mon Apr 11 19:41:25 PDT 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/examples/cairo_snippets/snippets
In directory gabe:/tmp/cvs-serv30142/examples/cairo_snippets/snippets

Modified Files:
	text.py text_align_center.py text_extents.py 
Log Message:
SC 2005/04/12

Index: text.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets/text.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- text.py	6 Apr 2005 13:54:10 -0000	1.1
+++ text.py	12 Apr 2005 02:41:23 -0000	1.2
@@ -1,7 +1,7 @@
 snippet_normalize (cr, width, height)
-cr.select_font ("Sans", cairo.FONT_SLANT_NORMAL,
+cr.select_font_face ("Sans", cairo.FONT_SLANT_NORMAL,
   cairo.FONT_WEIGHT_BOLD)
-cr.scale_font (0.35)
+cr.set_font_size (0.35)
 
 cr.move_to (0.04, 0.53)
 cr.show_text ("Hello")

Index: text_align_center.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets/text_align_center.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- text_align_center.py	6 Apr 2005 13:54:10 -0000	1.1
+++ text_align_center.py	12 Apr 2005 02:41:23 -0000	1.2
@@ -2,11 +2,11 @@
 
 snippet_normalize (cr, width, height)
 
-cr.select_font ("Sans",
-cairo.FONT_SLANT_NORMAL,
-cairo.FONT_WEIGHT_NORMAL)
+cr.select_font_face ("Sans",
+                     cairo.FONT_SLANT_NORMAL,
+                     cairo.FONT_WEIGHT_NORMAL)
 
-cr.scale_font (0.2)
+cr.set_font_size (0.2)
 x_bearing, y_bearing, width, height, x_advance, y_advance = cr.text_extents (utf8)
 x = 0.5-(width/2 + x_bearing)
 y = 0.5-(height/2 + y_bearing)

Index: text_extents.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets/text_extents.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- text_extents.py	6 Apr 2005 13:54:10 -0000	1.1
+++ text_extents.py	12 Apr 2005 02:41:23 -0000	1.2
@@ -2,11 +2,11 @@
 
 snippet_normalize (cr, width, height)
 
-cr.select_font ("Sans",
-                cairo.FONT_SLANT_NORMAL,
-                cairo.FONT_WEIGHT_NORMAL)
+cr.select_font_face ("Sans",
+                     cairo.FONT_SLANT_NORMAL,
+                     cairo.FONT_WEIGHT_NORMAL)
 
-cr.scale_font (0.4)
+cr.set_font_size (0.4)
 x_bearing, y_bearing, width, height, x_advance, y_advance = cr.text_extents (utf8)
 
 x=0.1




More information about the cairo-commit mailing list