[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_PdfSurface.c, 1.3, 1.4

Jeffrey Morgan commit at pdx.freedesktop.org
Fri Mar 25 08:18:56 PST 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/src/jni
In directory gabe:/tmp/cvs-serv20222/src/jni

Modified Files:
	org_freedesktop_cairo_PdfSurface.c 
Log Message:
updated api to match upstream lib

Index: org_freedesktop_cairo_PdfSurface.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_PdfSurface.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- org_freedesktop_cairo_PdfSurface.c	4 Mar 2005 21:03:38 -0000	1.3
+++ org_freedesktop_cairo_PdfSurface.c	25 Mar 2005 16:18:54 -0000	1.4
@@ -27,31 +27,31 @@
 
 /*
  * Class:     org_freedesktop_cairo_PdfSurface
- * Method:    cairo_set_target_pdf
+ * Method:    cairo_set_target_pdf_as_file
  * Signature: (Lorg/gnu/glib/Handle;Ljava/lang/String;DDDD)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_PdfSurface_cairo_1set_1target_1pdf
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_PdfSurface_cairo_1set_1target_1pdf_1as_1file
   (JNIEnv *env, jclass cls, jobject cr, jobject sur, jdouble width, jdouble height, 
   		jdouble x, jdouble y)
 {
 	cairo_t *cr_g = (cairo_t*)getPointerFromHandle(env, cr);
 	jg_pdfsurface_t *s = (jg_pdfsurface_t*)getPointerFromHandle(env, sur);
-	cairo_set_target_pdf(cr_g, s->file, width, height, x, y);
+	cairo_set_target_pdf_as_file(cr_g, s->file, width, height, x, y);
 }
 
 /*
  * Class:     org_freedesktop_cairo_PdfSurface
- * Method:    cairo_pdf_surface_create
+ * Method:    cairo_pdf_surface_create_for_file
  * Signature: (Ljava/lang/String;DDDD)Lorg/gnu/glib/Handle;
  */
-JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_PdfSurface_cairo_1pdf_1surface_1create
+JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_PdfSurface_cairo_1pdf_1surface_1create_1for_1file
   (JNIEnv *env, jclass cls, jstring filename, jdouble width, jdouble height, 
   		jdouble x, jdouble y)
 {
 	jg_pdfsurface_t *s = malloc(sizeof(jg_pdfsurface_t));
 	char *fn = (char*)(*env)->GetStringUTFChars(env, filename, NULL);
 	FILE *f = fopen(fn, "w");
-	cairo_surface_t *sur = cairo_pdf_surface_create(f, width, height, x, y);
+	cairo_surface_t *sur = cairo_pdf_surface_create_for_file(f, width, height, x, y);
 	(*env)->ReleaseStringUTFChars(env, filename, fn);
 	s->surface = sur;
 	s->file = f;




More information about the cairo-commit mailing list