[cairo-commit] cairo-java/test/snippets Snippets.java,1.1,1.2

Jeffrey Morgan commit at pdx.freedesktop.org
Sun Apr 10 17:47:24 PDT 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/test/snippets
In directory gabe:/tmp/cvs-serv10446/test/snippets

Modified Files:
	Snippets.java 
Log Message:
Changes to match upstream API changes

Index: Snippets.java
===================================================================
RCS file: /cvs/cairo/cairo-java/test/snippets/Snippets.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Snippets.java	8 Mar 2005 11:58:33 -0000	1.1
+++ Snippets.java	11 Apr 2005 00:47:22 -0000	1.2
@@ -373,8 +373,8 @@
 	 */
 	public void text(Cairo cr, double width, double height) {
 		normalize (cr, width, height);
-		cr.selectFont("Sans", FontSlant.NORMAL, FontWeight.BOLD);
-		cr.scaleFont(0.35);
+		cr.selectFontFace("Sans", FontSlant.NORMAL, FontWeight.BOLD);
+		cr.setFontSize(0.35);
 
 		cr.moveTo(0.04, 0.53);
 		cr.showText("Hello");
@@ -403,8 +403,8 @@
 
 		normalize (cr, width, height);
 
-		cr.selectFont("Sans", FontSlant.NORMAL, FontWeight.NORMAL);
-		cr.scaleFont(0.2);
+		cr.selectFontFace("Sans", FontSlant.NORMAL, FontWeight.NORMAL);
+		cr.setFontSize(0.2);
 		TextExtents extents = cr.getTextExtents("cairo");
 		double x = 0.5 -((extents.getWidth()/2.0) + extents.getXBearing());
 		double y = 0.5 -((extents.getHeight()/2.0) + extents.getYBearing());
@@ -433,9 +433,9 @@
 		String utf8 = "cairo";
 		normalize (cr, width, height);
 
-		cr.selectFont("Sans", FontSlant.NORMAL, FontWeight.NORMAL);
+		cr.selectFontFace("Sans", FontSlant.NORMAL, FontWeight.NORMAL);
 
-		cr.scaleFont(0.4);
+		cr.setFontSize(0.4);
 		TextExtents extents = cr.getTextExtents(utf8);
 
 		cr.moveTo(x,y);




More information about the cairo-commit mailing list