From 4dfced061fe7bc64335d3ccd31435091de0e0fe1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 22 Feb 2018 11:26:19 +0100 Subject: Add annotation Vertices creation functions. --- platform/java/mupdf_native.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'platform') diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 42f1a1a8..69546564 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -9104,7 +9104,7 @@ FUN(PDFAnnotation_getInkList)(JNIEnv *env, jobject self) fz_context *ctx = get_context(env); pdf_annot *annot = from_PDFAnnotation(env, self); int i, k, n, m; - float v[2]; + fz_point v; jobject jinklist; jfloatArray jpath; @@ -9137,14 +9137,14 @@ FUN(PDFAnnotation_getInkList)(JNIEnv *env, jobject self) for (k = 0; k < m; k++) { fz_try(ctx) - pdf_annot_ink_list_stroke_vertex(ctx, annot, i, k, v); + v = pdf_annot_ink_list_stroke_vertex(ctx, annot, i, k); fz_catch(ctx) { jni_rethrow(env, ctx); return NULL; } - (*env)->SetFloatArrayRegion(env, jpath, k * 2, 2, &v[0]); + (*env)->SetFloatArrayRegion(env, jpath, k * 2, 2, (float*)&v); if ((*env)->ExceptionCheck(env)) return NULL; } @@ -9270,7 +9270,7 @@ FUN(PDFAnnotation_getVertices)(JNIEnv *env, jobject self) fz_context *ctx = get_context(env); pdf_annot *annot = from_PDFAnnotation(env, self); int i, n; - float vertex[2]; + fz_point v; jobject jvertices; if (!ctx || !annot) return NULL; @@ -9289,14 +9289,14 @@ FUN(PDFAnnotation_getVertices)(JNIEnv *env, jobject self) for (i = 0; i < n; i++) { fz_try(ctx) - pdf_annot_vertex(ctx, annot, i, vertex); + v = pdf_annot_vertex(ctx, annot, i); fz_catch(ctx) { jni_rethrow(env, ctx); return NULL; } - (*env)->SetFloatArrayRegion(env, jvertices, i * 2, 2, &vertex[0]); + (*env)->SetFloatArrayRegion(env, jvertices, i * 2, 2, (float*)&v); if ((*env)->ExceptionCheck(env)) return NULL; } -- cgit v1.2.3