[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_Cairo.c, 1.2, 1.3

Jeffrey Morgan commit at pdx.freedesktop.org
Fri Mar 4 17:59:44 PST 2005


Committed by: kuzman

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

Modified Files:
	org_freedesktop_cairo_Cairo.c 
Log Message:
fixed a couple of bugs and added more snippets.

Index: org_freedesktop_cairo_Cairo.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Cairo.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- org_freedesktop_cairo_Cairo.c	4 Mar 2005 20:34:47 -0000	1.2
+++ org_freedesktop_cairo_Cairo.c	5 Mar 2005 01:59:41 -0000	1.3
@@ -683,7 +683,7 @@
   (JNIEnv *env, jclass cls, jobject obj, jdouble scale)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
-	cairo_scale_font(obj, scale);
+	cairo_scale_font(cr, scale);
 }
 
 /*
@@ -708,7 +708,7 @@
   (JNIEnv *env, jclass cls, jobject obj, jstring text)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
-	const unsigned char* t = (const unsigned char*)(*env)->GetStringUTFChars(env, text, NULL);
+	const char* t = (const char*)(*env)->GetStringUTFChars(env, text, NULL);
 	cairo_show_text(cr, t);
 	(*env)->ReleaseStringUTFChars(env, text, t);
 }
@@ -776,10 +776,10 @@
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
 	const unsigned char *text_g = (const unsigned char*)(*env)->GetStringUTFChars(env, text, NULL);
-	cairo_text_extents_t *extents_g = (cairo_text_extents_t*)getPointerFromHandle(env, extents);
-	cairo_text_extents(cr, text_g, extents_g);
+	cairo_text_extents_t extents_g;
+	cairo_text_extents(cr, text_g, &extents_g);
 	(*env)->ReleaseStringUTFChars(env, text, text_g);
-	updateHandle(env, extents, extents_g);
+	updateHandle(env, extents, &extents_g);
 }
 
 /*




More information about the cairo-commit mailing list