[cairo-commit] cairo-java/test/kapow Kapow.java,1.9,1.10

Jeffrey Morgan commit at pdx.freedesktop.org
Sat Apr 2 13:07:26 PST 2005


Committed by: kuzman

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

Modified Files:
	Kapow.java 
Log Message:
updated to latest API

Index: Kapow.java
===================================================================
RCS file: /cvs/cairo/cairo-java/test/kapow/Kapow.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Kapow.java	1 Apr 2005 13:58:45 -0000	1.9
+++ Kapow.java	2 Apr 2005 21:07:24 -0000	1.10
@@ -1,5 +1,5 @@
 /*
- * Java-Gnome Bindings Library
+s * Java-Gnome Bindings Library
  *
  * Copyright 1998-2005 the Java-Gnome Team, all rights reserved.
  *
@@ -16,6 +16,7 @@
 import org.freedesktop.cairo.Format;
 import org.freedesktop.cairo.Pattern;
 import org.freedesktop.cairo.PngSurface;
+//import org.freedesktop.cairo.PngSurface;
 import org.freedesktop.cairo.Point;
 import org.freedesktop.cairo.RGBColor;
 import org.freedesktop.cairo.TextExtents;
@@ -46,8 +47,7 @@
 
 	public Kapow(String text) throws Exception {
 		cr = new Cairo();
-		PngSurface surface = 
-			new PngSurface(filename);
+		PngSurface surface = new PngSurface(Format.ARGB32, IMAGE_WIDTH, IMAGE_HEIGHT);
 		cr.setTargetSurface(surface);
 
 		cr.setLineWidth(2);
@@ -93,9 +93,8 @@
 		cr.setRGBColor(black);
 		cr.stroke();
 		
-		cr.showPage();
+		surface.write(filename);
 		cr.dispose();
-		surface.close();
 	}
 	
 	private void makeStarPath() {




More information about the cairo-commit mailing list