[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_Context.c, 1.13, 1.14

Dan Williams commit at pdx.freedesktop.org
Thu Mar 23 08:32:12 PST 2006


Committed by: dcbw

Update of /cvs/cairo/cairo-java/src/jni
In directory kemper:/tmp/cvs-serv6733/src/jni

Modified Files:
	org_freedesktop_cairo_Context.c 
Log Message:
2006-03-23  Dan Williams  <dcbw at redhat.com>

    * src/java/org/freedesktop/cairo/Context.java
        - make inFill and inStroke public

    * src/jni/org_freedesktop_cairo_Context.c
        - (cairo_get_font_matrix): fix usage of matrix, must be allocated
        first
        - (cairo_get_font_options): fix usage of font options, must be
        allocated first



Index: org_freedesktop_cairo_Context.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Context.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- org_freedesktop_cairo_Context.c	28 Feb 2006 17:51:37 -0000	1.13
+++ org_freedesktop_cairo_Context.c	23 Mar 2006 16:32:09 -0000	1.14
@@ -778,11 +778,10 @@
   (JNIEnv *env, jclass cls, jobject obj)
 {
 	cairo_t *cr;
-	cairo_matrix_t matrix;
-
+	cairo_matrix_t *matrix = malloc (sizeof (cairo_matrix_t));
 	cr = (cairo_t*)getPointerFromHandle(env, obj);
-	cairo_get_font_matrix(cr, &matrix);
-	return getHandleFromPointer(env, &matrix);
+	cairo_get_font_matrix(cr, matrix);
+	return getHandleFromPointer(env, matrix);
 }
 
 /*
@@ -1121,8 +1120,7 @@
   (JNIEnv *env, jclass cls, jobject obj)
 {
 	cairo_t *cr = (cairo_t*)getPointerFromHandle(env, obj);
-	cairo_font_options_t *fo = NULL;
-	
+	cairo_font_options_t *fo = cairo_font_options_create();
 	cairo_get_font_options(cr, fo);
 	return getHandleFromPointer(env, fo);
 }



More information about the cairo-commit mailing list