summaryrefslogtreecommitdiff
path: root/platform/java/mupdf_native.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-02-22 11:26:19 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-02-27 14:08:27 +0100
commit4dfced061fe7bc64335d3ccd31435091de0e0fe1 (patch)
tree6f33236c732363e4cc65e8389fb7397907317aa6 /platform/java/mupdf_native.c
parentf4441c3c1a9a17275df5c75099633c4bf63a16d6 (diff)
downloadmupdf-4dfced061fe7bc64335d3ccd31435091de0e0fe1.tar.xz
Add annotation Vertices creation functions.
Diffstat (limited to 'platform/java/mupdf_native.c')
-rw-r--r--platform/java/mupdf_native.c12
1 files changed, 6 insertions, 6 deletions
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;
}