[cairo-commit] cairo-java/test/kapow Kapow.java,1.11,1.12

Jeffrey Morgan commit at pdx.freedesktop.org
Sat Apr 23 09:48:30 PDT 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/test/kapow
In directory gabe:/tmp/cvs-serv27983/test/kapow

Modified Files:
	Kapow.java 
Log Message:
updated methods to reflect upstream API changes.

Index: Kapow.java
===================================================================
RCS file: /cvs/cairo/cairo-java/test/kapow/Kapow.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Kapow.java	11 Apr 2005 00:47:21 -0000	1.11
+++ Kapow.java	23 Apr 2005 16:48:28 -0000	1.12
@@ -54,22 +54,21 @@
 		cr.save();
 		cr.translate(SHADOW_OFFSET, SHADOW_OFFSET);
 		makeStarPath();
-		cr.setAlpha(0.5);
-		cr.setRGBColor(black);
+		cr.setSourceRGBA(black, 0.5);
 		cr.fill();
 		cr.restore();
 
 		makeStarPath();
-		cr.setAlpha(2);
+		cr.setSourceRGBA(black, 2);
 		Pattern pattern = new Pattern(IMAGE_WIDTH / 2, IMAGE_HEIGHT / 2,
 					10, IMAGE_WIDTH / 2, IMAGE_HEIGHT / 2, 230);
 		pattern.addColorStop(0, yellow, 1);
 		pattern.addColorStop(1, red, 1);
-		cr.setPattern(pattern);
+		cr.setSource(pattern);
 		cr.fill();
 
 		makeStarPath();
-		cr.setRGBColor(black);
+		cr.setSourceRGB(black);
 		cr.stroke();
 
 		cr.selectFontFace("Sans", FontSlant.NORMAL, FontWeight.BOLD);
@@ -85,12 +84,12 @@
 					IMAGE_WIDTH / 2 + 10, 3 * IMAGE_HEIGHT / 4);
 		pattern.addColorStop(0, white, 1);
 		pattern.addColorStop(1, purple, 1);
-		cr.setPattern(pattern);
+		cr.setSource(pattern);
 
 		cr.fill();
 
 		makeTextPath(point, text);
-		cr.setRGBColor(black);
+		cr.setSourceRGB(black);
 		cr.stroke();
 		
 		surface.write(filename);




More information about the cairo-commit mailing list