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

Jeffrey Morgan commit at pdx.freedesktop.org
Mon May 16 07:44:15 PDT 2005


Committed by: kuzman

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

Modified Files:
	org_freedesktop_cairo_PDFSurface.c 
Log Message:
Updated PDFSurface to reflect upstream changes.

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	10 May 2005 01:01:59 -0000	1.3
+++ org_freedesktop_cairo_PDFSurface.c	16 May 2005 14:44:13 -0000	1.4
@@ -30,13 +30,12 @@
  * Signature: (Ljava/lang/String;DDDD)Lorg/gnu/glib/Handle;
  */
 JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_PDFSurface_cairo_1pdf_1surface_1create
-  (JNIEnv *env, jclass cls, jstring filename, jdouble width, jdouble height, 
-  		jdouble x, jdouble y)
+  (JNIEnv *env, jclass cls, jstring filename, jdouble width, jdouble height)
 {
 	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(f, width, height);
 	(*env)->ReleaseStringUTFChars(env, filename, fn);
 	s->surface = sur;
 	s->file = f;
@@ -56,6 +55,20 @@
 	free(s);
 }
 
+/*
+ * Class:     org_freedesktop_cairo_PDFSurface
+ * Method:    cairo_pdf_surface_set_ppi
+ * Signature: (Lorg/gnu/javagnome/Handle;DD)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_PDFSurface_cairo_1pdf_1surface_1set_1ppi
+  (JNIEnv *env, jclass cls, jobject sur, jdouble x, jdouble y)
+{
+	jg_pdfsurface_t *s;
+	
+	s = (jg_pdfsurface_t*)getPointerFromHandle(env, sur);
+	cairo_pdf_surface_set_ppi(s, x, y);
+}
+
 
 #ifdef __cplusplus
 }




More information about the cairo-commit mailing list