[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_Cairo.c, 1.12, 1.13 org_freedesktop_cairo_Surface.c, 1.3, 1.4

Jeffrey Morgan commit at pdx.freedesktop.org
Fri Mar 25 08:53:35 PST 2005


Committed by: kuzman

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

Modified Files:
	org_freedesktop_cairo_Cairo.c org_freedesktop_cairo_Surface.c 
Log Message:
Updated APIs to match upstream changes

Index: org_freedesktop_cairo_Cairo.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Cairo.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- org_freedesktop_cairo_Cairo.c	17 Mar 2005 01:32:08 -0000	1.12
+++ org_freedesktop_cairo_Cairo.c	25 Mar 2005 16:53:33 -0000	1.13
@@ -291,15 +291,15 @@
 
 /*
  * Class:     org_freedesktop_cairo_Cairo
- * Method:    cairo_concat_matrix
+ * Method:    cairo_transform
  * Signature: (Lorg/gnu/glib/Handle;Lorg/gnu/glib/Handle;)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1concat_1matrix
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1transform
   (JNIEnv *env, jclass cls, jobject obj, jobject matrix)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
 	cairo_matrix_t *matrix_g = (cairo_matrix_t*)getPointerFromHandle(env, matrix);
-	cairo_concat_matrix(cr, matrix_g);
+	cairo_transform(cr, matrix_g);
 }
 
 /*
@@ -341,64 +341,64 @@
 
 /*
  * Class:     org_freedesktop_cairo_Cairo
- * Method:    cairo_transform_point
+ * Method:    cairo_user_to_device
  * Signature: (Lorg/gnu/glib/Handle;[D[D)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1transform_1point
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1user_1to_1device
   (JNIEnv *env, jclass cls, jobject obj, jdoubleArray x, jdoubleArray y)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
 	double* x_g = (double*)(*env)->GetDoubleArrayElements(env, x, NULL);
 	double* y_g = (double*)(*env)->GetDoubleArrayElements(env, y, NULL);
-	cairo_transform_point(cr, x_g, y_g);
+	cairo_user_to_device(cr, x_g, y_g);
 	(*env)->ReleaseDoubleArrayElements(env, x, x_g, 0);
 	(*env)->ReleaseDoubleArrayElements(env, y, y_g, 0);
 }
 
 /*
  * Class:     org_freedesktop_cairo_Cairo
- * Method:    cairo_transform_distance
+ * Method:    cairo_user_to_device_distance
  * Signature: (Lorg/gnu/glib/Handle;[D[D)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1transform_1distance
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1user_1to_1device_1distance
   (JNIEnv *env, jclass cls, jobject obj, jdoubleArray dx, jdoubleArray dy)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
 	double* dx_g = (double*)(*env)->GetDoubleArrayElements(env, dx, NULL);
 	double* dy_g = (double*)(*env)->GetDoubleArrayElements(env, dy, NULL);
-	cairo_transform_distance(cr, dx_g, dy_g);
+	cairo_user_to_device_distance(cr, dx_g, dy_g);
 	(*env)->ReleaseDoubleArrayElements(env, dx, dx_g, 0);
 	(*env)->ReleaseDoubleArrayElements(env, dy, dy_g, 0);
 }
 
 /*
  * Class:     org_freedesktop_cairo_Cairo
- * Method:    cairo_inverse_transform_point
+ * Method:    cairo_device_to_user
  * Signature: (Lorg/gnu/glib/Handle;[D[D)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1inverse_1transform_1point
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1device_1to_1user
   (JNIEnv *env, jclass cls, jobject obj, jdoubleArray x, jdoubleArray y)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
 	double* x_g = (double*)(*env)->GetDoubleArrayElements(env, x, NULL);
 	double* y_g = (double*)(*env)->GetDoubleArrayElements(env, y, NULL);
-	cairo_inverse_transform_point(cr, x_g, y_g);
+	cairo_device_to_user(cr, x_g, y_g);
 	(*env)->ReleaseDoubleArrayElements(env, x, x_g, 0);
 	(*env)->ReleaseDoubleArrayElements(env, y, y_g, 0);
 }
 
 /*
  * Class:     org_freedesktop_cairo_Cairo
- * Method:    cairo_inverse_transform_distance
+ * Method:    cairo_device_to_user_distance
  * Signature: (Lorg/gnu/glib/Handle;[D[D)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1inverse_1transform_1distance
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1device_1to_1user_1distance
   (JNIEnv *env, jclass cls, jobject obj, jdoubleArray dx, jdoubleArray dy)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
 	double* dx_g = (double*)(*env)->GetDoubleArrayElements(env, dx, NULL);
 	double* dy_g = (double*)(*env)->GetDoubleArrayElements(env, dy, NULL);
-	cairo_inverse_transform_distance(cr, dx_g, dy_g);
+	cairo_device_to_user_distance(cr, dx_g, dy_g);
 	(*env)->ReleaseDoubleArrayElements(env, dx, dx_g, 0);
 	(*env)->ReleaseDoubleArrayElements(env, dy, dy_g, 0);
 }
@@ -649,14 +649,14 @@
 
 /*
  * Class:     org_freedesktop_cairo_Cairo
- * Method:    cairo_init_clip
+ * Method:    cairo_reset_clip
  * Signature: (Lorg/gnu/glib/Handle;)V
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1init_1clip
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Cairo_cairo_1reset_1clip
   (JNIEnv *env, jclass cls, jobject obj)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
-	cairo_init_clip(cr);
+	cairo_reset_clip(cr);
 }
 
 /*

Index: org_freedesktop_cairo_Surface.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Surface.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- org_freedesktop_cairo_Surface.c	17 Mar 2005 01:32:08 -0000	1.3
+++ org_freedesktop_cairo_Surface.c	25 Mar 2005 16:53:33 -0000	1.4
@@ -146,6 +146,19 @@
 	return cairo_surface_get_filter(surface);
 }
 
+/*
+ * Class:     org_freedesktop_cairo_Surface
+ * Method:    cairo_surface_set_device_offset
+ * Signature: (Lorg/gnu/javagnome/Handle;DD)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Surface_cairo_1surface_1set_1device_1offset
+  (JNIEnv *env, jclass cls, jobject obj, jdouble xoff, jdouble yoff)
+{
+	cairo_surface_t *surface = (cairo_surface_t*)getPointerFromHandle(env, obj);
+	cairo_surface_set_device_offset(surface, xoff, yoff);
+}
+
+
 #ifdef __cplusplus
 }
 #endif




More information about the cairo-commit mailing list