[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_ScaledFont.c, 1.5, 1.6 org_freedesktop_cairo_Matrix.c, 1.7, 1.8

Jeffrey Morgan commit at pdx.freedesktop.org
Fri Oct 28 16:04:48 PDT 2005


Committed by: kuzman

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

Modified Files:
	org_freedesktop_cairo_ScaledFont.c 
	org_freedesktop_cairo_Matrix.c 
Log Message:
Added missing public API.

Index: org_freedesktop_cairo_ScaledFont.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_ScaledFont.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- org_freedesktop_cairo_ScaledFont.c	13 Sep 2005 03:14:10 -0000	1.5
+++ org_freedesktop_cairo_ScaledFont.c	28 Oct 2005 23:04:46 -0000	1.6
@@ -55,6 +55,29 @@
 	updateHandle(env, ext, ext_g);
 }
 
+/*
+ * Class:     org_freedesktop_cairo_ScaledFont
+ * Method:    cairo_scaled_font_glyph_extents
+ * Signature: (Lorg/gnu/javagnome/Handle;[Lorg/gnu/javagnome/Handle;Lorg/gnu/javagnome/Handle;)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_ScaledFont_cairo_1scaled_1font_1glyph_1extents
+  (JNIEnv *env, jclass cls, jobject sfont, jobjectArray g, jobject ext)
+{
+	cairo_scaled_font_t *scaled_font; 
+	cairo_glyph_t *glyphs;
+	int num_glyphs;
+	cairo_text_extents_t *extents;
+	
+	
+	scaled_font = (cairo_scaled_font_t*)getPointerFromHandle(env, sfont);
+	glyphs = (cairo_glyph_t*)getPointerArrayFromHandles(env, g);
+	num_glyphs = (*env)->GetArrayLength(env, g);
+	extents = g_new(cairo_text_extents_t, 1);
+	cairo_scaled_font_glyph_extents(scaled_font, glyphs, num_glyphs, extents);
+	updateHandle(env, ext, extents);
+} 
+
+
 #ifdef __cplusplus
 }
 #endif

Index: org_freedesktop_cairo_Matrix.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Matrix.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- org_freedesktop_cairo_Matrix.c	13 Sep 2005 03:14:10 -0000	1.7
+++ org_freedesktop_cairo_Matrix.c	28 Oct 2005 23:04:46 -0000	1.8
@@ -187,6 +187,77 @@
 
 /*
  * Class:     org_freedesktop_cairo_Matrix
+ * Method:    cairo_matrix_init
+ * Signature: (Lorg/gnu/javagnome/Handle;DDDDDD)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Matrix_cairo_1matrix_1init
+  (JNIEnv *env, jclass cls, jobject obj, jdouble xx, jdouble yx, 
+  jdouble xy, jdouble yy, jdouble x0, jdouble y0)
+{
+	cairo_matrix_t *matrix;
+	
+	matrix = (cairo_matrix_t*)getPointerFromHandle(env, obj);
+	cairo_matrix_init(matrix, xx, yx, xy, yy, x0, y0);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Matrix
+ * Method:    cairo_matrix_init_identity
+ * Signature: (Lorg/gnu/javagnome/Handle;)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Matrix_cairo_1matrix_1init_1identity
+  (JNIEnv *env, jclass cls, jobject obj)
+{
+	cairo_matrix_t *matrix;
+	
+	matrix = (cairo_matrix_t*)getPointerFromHandle(env, obj);
+	cairo_matrix_init_identity(matrix);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Matrix
+ * Method:    cairo_matrix_init_translate
+ * Signature: (Lorg/gnu/javagnome/Handle;DD)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Matrix_cairo_1matrix_1init_1translate
+  (JNIEnv *env, jclass cls, jobject obj, jdouble tx, jdouble ty)
+{
+	cairo_matrix_t *matrix;
+	
+	matrix = (cairo_matrix_t*)getPointerFromHandle(env, obj);
+	cairo_matrix_init_translate(matrix, tx, ty);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Matrix
+ * Method:    cairo_matrix_init_scale
+ * Signature: (Lorg/gnu/javagnome/Handle;DD)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Matrix_cairo_1matrix_1init_1scale
+  (JNIEnv *env, jclass cls, jobject obj, jdouble sx, jdouble sy)
+{
+	cairo_matrix_t *matrix;
+	
+	matrix = (cairo_matrix_t*)getPointerFromHandle(env, obj);
+	cairo_matrix_init_scale(matrix, sx, sy);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Matrix
+ * Method:    cairo_matrix_init_rotate
+ * Signature: (Lorg/gnu/javagnome/Handle;D)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Matrix_cairo_1matrix_1init_1rotate
+  (JNIEnv *env, jclass cls, jobject obj, jdouble rad)
+{
+	cairo_matrix_t *matrix;
+	
+	matrix = (cairo_matrix_t*)getPointerFromHandle(env, obj);
+	cairo_matrix_init_rotate(matrix, rad);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Matrix
  * Method:    cairo_matrix_translate
  * Signature: (Lorg/gnu/glib/Handle;DD)I
  */



More information about the cairo-commit mailing list