diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-12 20:41:44 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-15 20:42:16 +0800 |
commit | df4f2031b12d029ea731adfe616034008a75d90f (patch) | |
tree | 3bc887be155a6c7feaae68f2c1659598abb9da0f /platform | |
parent | e73593152c5d9ac1642af14230e0a346f634cdd2 (diff) | |
download | mupdf-df4f2031b12d029ea731adfe616034008a75d90f.tar.xz |
jni: Make jni compile again.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/java/mupdf_native.c | 55 | ||||
-rw-r--r-- | platform/java/mupdf_native.h | 620 | ||||
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/Device.java | 2 | ||||
-rw-r--r-- | platform/java/src/com/artifex/mupdf/fitz/Separations.java | 11 |
4 files changed, 362 insertions, 326 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 8adade90..bed3358d 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -457,7 +457,7 @@ static int find_fids(JNIEnv *env) mid_Device_popClip = get_method(&err, env, "popClip", "()V"); mid_Device_beginMask = get_method(&err, env, "beginMask", "(L"PKG"Rect;ZL"PKG"ColorSpace;[F)V"); mid_Device_endMask = get_method(&err, env, "endMask", "()V"); - mid_Device_beginGroup = get_method(&err, env, "beginGroup", "(L"PKG"Rect;ZZIF)V"); + mid_Device_beginGroup = get_method(&err, env, "beginGroup", "(L"PKG"Rect;L"PKG"ColorSpace;ZZIF)V"); mid_Device_endGroup = get_method(&err, env, "endGroup", "()V"); mid_Device_beginTile = get_method(&err, env, "beginTile", "(L"PKG"Rect;L"PKG"Rect;FFL"PKG"Matrix;I)I"); mid_Device_endTile = get_method(&err, env, "endTile", "()V"); @@ -2112,13 +2112,14 @@ fz_java_device_end_mask(fz_context *ctx, fz_device *dev) } static void -fz_java_device_begin_group(fz_context *ctx, fz_device *dev, const fz_rect *rect, int isolated, int knockout, int blendmode, float alpha) +fz_java_device_begin_group(fz_context *ctx, fz_device *dev, const fz_rect *rect, fz_colorspace *cs, int isolated, int knockout, int blendmode, float alpha) { fz_java_device *jdev = (fz_java_device *)dev; JNIEnv *env = jdev->env; jobject jrect = to_Rect(ctx, env, rect); + jobject jcs = to_ColorSpace(ctx, env, cs); - (*env)->CallVoidMethod(env, jdev->self, mid_Device_beginGroup, jrect, (jboolean)isolated, (jboolean)knockout, (jint)blendmode, alpha); + (*env)->CallVoidMethod(env, jdev->self, mid_Device_beginGroup, jrect, jcs, (jboolean)isolated, (jboolean)knockout, (jint)blendmode, alpha); if ((*env)->ExceptionCheck(env)) fz_throw_java(ctx, env); } @@ -4223,7 +4224,7 @@ FUN(Annotation_toPixmap)(JNIEnv *env, jobject self, jobject jctm, jobject jcs, j if (!ctx || !annot) return NULL; fz_try(ctx) - pixmap = fz_new_pixmap_from_annot(ctx, annot, &ctm, cs, NULL, alpha); + pixmap = fz_new_pixmap_from_annot(ctx, annot, &ctm, cs, alpha); fz_catch(ctx) { jni_rethrow(env, ctx); @@ -4774,7 +4775,7 @@ FUN(Page_toPixmap)(JNIEnv *env, jobject self, jobject jctm, jobject jcs, jboolea if (!ctx || !page) return NULL; fz_try(ctx) - pixmap = fz_new_pixmap_from_page(ctx, page, &ctm, cs, NULL, alpha); + pixmap = fz_new_pixmap_from_page(ctx, page, &ctm, cs, alpha); fz_catch(ctx) { jni_rethrow(env, ctx); @@ -5125,10 +5126,10 @@ FUN(Page_textAsHtml)(JNIEnv *env, jobject self) //fz_write_printf(ctx, out, "p{margin:0;padding:0;}\n"); fz_write_printf(ctx, out, "</style>\n"); fz_write_printf(ctx, out, "<body style=\"margin:0\"><div style=\"padding:10px\" id=\"content\">"); - fz_print_stext_page_html(ctx, out, text); + fz_print_stext_page_as_xhtml(ctx, out, text); fz_write_printf(ctx, out, "</div></body>\n"); fz_write_printf(ctx, out, "<style>\n"); - fz_print_stext_sheet(ctx, out, sheet); + fz_print_stext_page_as_html(ctx, out, text); fz_write_printf(ctx, out, "</style>\n</html>\n"); } fz_always(ctx) @@ -5273,7 +5274,7 @@ FUN(DisplayList_toPixmap)(JNIEnv *env, jobject self, jobject jctm, jobject jcs, if (!ctx || !list) return NULL; fz_try(ctx) - pixmap = fz_new_pixmap_from_display_list(ctx, list, &ctm, cs, NULL, alpha); + pixmap = fz_new_pixmap_from_display_list(ctx, list, &ctm, cs, alpha); fz_catch(ctx) { jni_rethrow(env, ctx); @@ -8855,8 +8856,28 @@ FUN(Separations_getNumberOfSeparations)(JNIEnv *env, jobject self) return nSep; } +JNIEXPORT jint JNICALL +FUN(Separations_getSeparationBehavior)(JNIEnv *env, jobject self, jint sep) +{ + fz_context *ctx = get_context(env); + fz_separations *seps = from_Separations(env, self); + jint behavior; + + if (!ctx || !seps) return 0; + + fz_try(ctx) + behavior = fz_separation_current_behavior(ctx, seps, sep); + fz_catch(ctx) + { + jni_rethrow(env, ctx); + return 0; + } + + return behavior; +} + JNIEXPORT void JNICALL -FUN(Separations_controlSeparation)(JNIEnv *env, jobject self, jint sep, jboolean disable) +FUN(Separations_setSeparationBehavior)(JNIEnv *env, jobject self, jint sep, jint behavior) { fz_context *ctx = get_context(env); fz_separations *seps = from_Separations(env, self); @@ -8864,7 +8885,7 @@ FUN(Separations_controlSeparation)(JNIEnv *env, jobject self, jint sep, jboolean if (!ctx || !seps) return; fz_try(ctx) - fz_control_separation(ctx, seps, sep, disable); + fz_set_separation_behavior(ctx, seps, sep, behavior); fz_catch(ctx) jni_rethrow(env, ctx); } @@ -8899,9 +8920,17 @@ FUN(Separations_areSeparationsControllable)(JNIEnv *env, jobject self) { fz_context *ctx = get_context(env); fz_separations *seps = from_Separations(env, self); - jobject jname = NULL; + jboolean controllable; - if (!ctx || !seps) return 0; + if (!ctx || !seps) return JNI_FALSE; + + fz_try(ctx) + controllable = fz_separations_controllable(ctx, seps); + fz_catch(ctx) + { + jni_rethrow(env, ctx); + return JNI_FALSE; + } - return fz_separations_controllable(ctx, seps); + return controllable; } diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h index 991933c0..ce3bc761 100644 --- a/platform/java/mupdf_native.h +++ b/platform/java/mupdf_native.h @@ -208,17 +208,6 @@ extern "C" { } #endif #endif -/* Header for class com_artifex_mupdf_fitz_ColorParams_RenderingIntent */ - -#ifndef _Included_com_artifex_mupdf_fitz_ColorParams_RenderingIntent -#define _Included_com_artifex_mupdf_fitz_ColorParams_RenderingIntent -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif -#endif /* Header for class com_artifex_mupdf_fitz_ColorParams */ #ifndef _Included_com_artifex_mupdf_fitz_ColorParams @@ -236,6 +225,17 @@ extern "C" { } #endif #endif +/* Header for class com_artifex_mupdf_fitz_ColorParams_RenderingIntent */ + +#ifndef _Included_com_artifex_mupdf_fitz_ColorParams_RenderingIntent +#define _Included_com_artifex_mupdf_fitz_ColorParams_RenderingIntent +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif /* Header for class com_artifex_mupdf_fitz_ColorSpace */ #ifndef _Included_com_artifex_mupdf_fitz_ColorSpace @@ -1321,247 +1321,6 @@ extern "C" { } #endif #endif -/* Header for class com_artifex_mupdf_fitz_Page */ - -#ifndef _Included_com_artifex_mupdf_fitz_Page -#define _Included_com_artifex_mupdf_fitz_Page -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: finalize - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_finalize - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: getBounds - * Signature: ()Lcom/artifex/mupdf/fitz/Rect; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_getBounds - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: toPixmap - * Signature: (Lcom/artifex/mupdf/fitz/Matrix;Lcom/artifex/mupdf/fitz/ColorSpace;Z)Lcom/artifex/mupdf/fitz/Pixmap; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toPixmap - (JNIEnv *, jobject, jobject, jobject, jboolean); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: run - * Signature: (Lcom/artifex/mupdf/fitz/Device;Lcom/artifex/mupdf/fitz/Matrix;Lcom/artifex/mupdf/fitz/Cookie;)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_run - (JNIEnv *, jobject, jobject, jobject, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: runPageContents - * Signature: (Lcom/artifex/mupdf/fitz/Device;Lcom/artifex/mupdf/fitz/Matrix;Lcom/artifex/mupdf/fitz/Cookie;)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_runPageContents - (JNIEnv *, jobject, jobject, jobject, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: getAnnotations - * Signature: ()[Lcom/artifex/mupdf/fitz/Annotation; - */ -JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_getAnnotations - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: getLinks - * Signature: ()[Lcom/artifex/mupdf/fitz/Link; - */ -JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_getLinks - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: toDisplayList - * Signature: (Z)Lcom/artifex/mupdf/fitz/DisplayList; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toDisplayList - (JNIEnv *, jobject, jboolean); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: toStructuredText - * Signature: (Ljava/lang/String;)Lcom/artifex/mupdf/fitz/StructuredText; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toStructuredText - (JNIEnv *, jobject, jstring); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: search - * Signature: (Ljava/lang/String;)[Lcom/artifex/mupdf/fitz/Rect; - */ -JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_search - (JNIEnv *, jobject, jstring); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: textAsHtml - * Signature: ()[B - */ -JNIEXPORT jbyteArray JNICALL Java_com_artifex_mupdf_fitz_Page_textAsHtml - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Page - * Method: getSeparations - * Signature: ()Lcom/artifex/mupdf/fitz/Separations; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_getSeparations - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif -/* Header for class com_artifex_mupdf_fitz_Path */ - -#ifndef _Included_com_artifex_mupdf_fitz_Path -#define _Included_com_artifex_mupdf_fitz_Path -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: finalize - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_finalize - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: newNative - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_com_artifex_mupdf_fitz_Path_newNative - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: cloneNative - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_com_artifex_mupdf_fitz_Path_cloneNative - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: currentPoint - * Signature: ()Lcom/artifex/mupdf/fitz/Point; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Path_currentPoint - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: moveTo - * Signature: (FF)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_moveTo - (JNIEnv *, jobject, jfloat, jfloat); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: lineTo - * Signature: (FF)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_lineTo - (JNIEnv *, jobject, jfloat, jfloat); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: curveTo - * Signature: (FFFFFF)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_curveTo - (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: curveToV - * Signature: (FFFF)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_curveToV - (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: curveToY - * Signature: (FFFF)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_curveToY - (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: rect - * Signature: (IIII)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_rect - (JNIEnv *, jobject, jint, jint, jint, jint); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: closePath - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_closePath - (JNIEnv *, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: transform - * Signature: (Lcom/artifex/mupdf/fitz/Matrix;)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_transform - (JNIEnv *, jobject, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: getBounds - * Signature: (Lcom/artifex/mupdf/fitz/StrokeState;Lcom/artifex/mupdf/fitz/Matrix;)Lcom/artifex/mupdf/fitz/Rect; - */ -JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Path_getBounds - (JNIEnv *, jobject, jobject, jobject); - -/* - * Class: com_artifex_mupdf_fitz_Path - * Method: walk - * Signature: (Lcom/artifex/mupdf/fitz/PathWalker;)V - */ -JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_walk - (JNIEnv *, jobject, jobject); - -#ifdef __cplusplus -} -#endif -#endif -/* Header for class com_artifex_mupdf_fitz_PathWalker */ - -#ifndef _Included_com_artifex_mupdf_fitz_PathWalker -#define _Included_com_artifex_mupdf_fitz_PathWalker -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif -#endif /* Header for class com_artifex_mupdf_fitz_PDFAnnotation */ #ifndef _Included_com_artifex_mupdf_fitz_PDFAnnotation @@ -2617,6 +2376,247 @@ JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_PDFPage_deleteAnnotation } #endif #endif +/* Header for class com_artifex_mupdf_fitz_Page */ + +#ifndef _Included_com_artifex_mupdf_fitz_Page +#define _Included_com_artifex_mupdf_fitz_Page +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: finalize + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_finalize + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: getBounds + * Signature: ()Lcom/artifex/mupdf/fitz/Rect; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_getBounds + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: toPixmap + * Signature: (Lcom/artifex/mupdf/fitz/Matrix;Lcom/artifex/mupdf/fitz/ColorSpace;Z)Lcom/artifex/mupdf/fitz/Pixmap; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toPixmap + (JNIEnv *, jobject, jobject, jobject, jboolean); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: run + * Signature: (Lcom/artifex/mupdf/fitz/Device;Lcom/artifex/mupdf/fitz/Matrix;Lcom/artifex/mupdf/fitz/Cookie;)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_run + (JNIEnv *, jobject, jobject, jobject, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: runPageContents + * Signature: (Lcom/artifex/mupdf/fitz/Device;Lcom/artifex/mupdf/fitz/Matrix;Lcom/artifex/mupdf/fitz/Cookie;)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_runPageContents + (JNIEnv *, jobject, jobject, jobject, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: getAnnotations + * Signature: ()[Lcom/artifex/mupdf/fitz/Annotation; + */ +JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_getAnnotations + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: getLinks + * Signature: ()[Lcom/artifex/mupdf/fitz/Link; + */ +JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_getLinks + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: toDisplayList + * Signature: (Z)Lcom/artifex/mupdf/fitz/DisplayList; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toDisplayList + (JNIEnv *, jobject, jboolean); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: toStructuredText + * Signature: (Ljava/lang/String;)Lcom/artifex/mupdf/fitz/StructuredText; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_toStructuredText + (JNIEnv *, jobject, jstring); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: search + * Signature: (Ljava/lang/String;)[Lcom/artifex/mupdf/fitz/Rect; + */ +JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_search + (JNIEnv *, jobject, jstring); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: textAsHtml + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_com_artifex_mupdf_fitz_Page_textAsHtml + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: getSeparations + * Signature: ()Lcom/artifex/mupdf/fitz/Separations; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_getSeparations + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_Path */ + +#ifndef _Included_com_artifex_mupdf_fitz_Path +#define _Included_com_artifex_mupdf_fitz_Path +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: finalize + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_finalize + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: newNative + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_artifex_mupdf_fitz_Path_newNative + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: cloneNative + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_com_artifex_mupdf_fitz_Path_cloneNative + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: currentPoint + * Signature: ()Lcom/artifex/mupdf/fitz/Point; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Path_currentPoint + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: moveTo + * Signature: (FF)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_moveTo + (JNIEnv *, jobject, jfloat, jfloat); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: lineTo + * Signature: (FF)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_lineTo + (JNIEnv *, jobject, jfloat, jfloat); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: curveTo + * Signature: (FFFFFF)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_curveTo + (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: curveToV + * Signature: (FFFF)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_curveToV + (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: curveToY + * Signature: (FFFF)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_curveToY + (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: rect + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_rect + (JNIEnv *, jobject, jint, jint, jint, jint); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: closePath + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_closePath + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: transform + * Signature: (Lcom/artifex/mupdf/fitz/Matrix;)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_transform + (JNIEnv *, jobject, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: getBounds + * Signature: (Lcom/artifex/mupdf/fitz/StrokeState;Lcom/artifex/mupdf/fitz/Matrix;)Lcom/artifex/mupdf/fitz/Rect; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Path_getBounds + (JNIEnv *, jobject, jobject, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Path + * Method: walk + * Signature: (Lcom/artifex/mupdf/fitz/PathWalker;)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Path_walk + (JNIEnv *, jobject, jobject); + +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_PathWalker */ + +#ifndef _Included_com_artifex_mupdf_fitz_PathWalker +#define _Included_com_artifex_mupdf_fitz_PathWalker +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif /* Header for class com_artifex_mupdf_fitz_Pixmap */ #ifndef _Included_com_artifex_mupdf_fitz_Pixmap @@ -2831,6 +2831,12 @@ extern "C" { #ifdef __cplusplus extern "C" { #endif +#undef com_artifex_mupdf_fitz_Separations_SEPARATION_COMPOSITE +#define com_artifex_mupdf_fitz_Separations_SEPARATION_COMPOSITE 0L +#undef com_artifex_mupdf_fitz_Separations_SEPARATION_SPOT +#define com_artifex_mupdf_fitz_Separations_SEPARATION_SPOT 1L +#undef com_artifex_mupdf_fitz_Separations_SEPARATION_DISABLED +#define com_artifex_mupdf_fitz_Separations_SEPARATION_DISABLED 2L /* * Class: com_artifex_mupdf_fitz_Separations * Method: finalize @@ -2865,19 +2871,19 @@ JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_Separations_areSeparation /* * Class: com_artifex_mupdf_fitz_Separations - * Method: disableSeparation - * Signature: (IZ)Z + * Method: getSeparationBehavior + * Signature: (I)I */ -JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_Separations_disableSeparation - (JNIEnv *, jobject, jint, jboolean); +JNIEXPORT jint JNICALL Java_com_artifex_mupdf_fitz_Separations_getSeparationBehavior + (JNIEnv *, jobject, jint); /* * Class: com_artifex_mupdf_fitz_Separations - * Method: isSeparationDisabled - * Signature: (I)Z + * Method: setSeparationBehavior + * Signature: (II)V */ -JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_Separations_isSeparationDisabled - (JNIEnv *, jobject, jint); +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Separations_setSeparationBehavior + (JNIEnv *, jobject, jint, jint); #ifdef __cplusplus } @@ -3009,50 +3015,6 @@ JNIEXPORT jfloatArray JNICALL Java_com_artifex_mupdf_fitz_StrokeState_getDashes } #endif #endif -/* Header for class com_artifex_mupdf_fitz_StructuredText_TextBlock */ - -#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextBlock -#define _Included_com_artifex_mupdf_fitz_StructuredText_TextBlock -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif -#endif -/* Header for class com_artifex_mupdf_fitz_StructuredText_TextChar */ - -#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextChar -#define _Included_com_artifex_mupdf_fitz_StructuredText_TextChar -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif -#endif -/* Header for class com_artifex_mupdf_fitz_StructuredText_TextLine */ - -#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextLine -#define _Included_com_artifex_mupdf_fitz_StructuredText_TextLine -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif -#endif -/* Header for class com_artifex_mupdf_fitz_StructuredText_TextSpan */ - -#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextSpan -#define _Included_com_artifex_mupdf_fitz_StructuredText_TextSpan -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif -#endif /* Header for class com_artifex_mupdf_fitz_StructuredText */ #ifndef _Included_com_artifex_mupdf_fitz_StructuredText @@ -3104,6 +3066,50 @@ JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_StructuredText_getBlo } #endif #endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextChar */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextChar +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextChar +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextSpan */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextSpan +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextSpan +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextLine */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextLine +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextLine +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif +/* Header for class com_artifex_mupdf_fitz_StructuredText_TextBlock */ + +#ifndef _Included_com_artifex_mupdf_fitz_StructuredText_TextBlock +#define _Included_com_artifex_mupdf_fitz_StructuredText_TextBlock +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif /* Header for class com_artifex_mupdf_fitz_Text */ #ifndef _Included_com_artifex_mupdf_fitz_Text @@ -3190,11 +3196,11 @@ extern "C" { extern "C" { #endif #undef com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -#define com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -3042686055658047285i64 +#define com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -3042686055658047285LL #undef com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -#define com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -3387516993124229948i64 +#define com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -3387516993124229948LL #undef com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -#define com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -7034897190745766939i64 +#define com_artifex_mupdf_fitz_TryLaterException_serialVersionUID -7034897190745766939LL #ifdef __cplusplus } #endif diff --git a/platform/java/src/com/artifex/mupdf/fitz/Device.java b/platform/java/src/com/artifex/mupdf/fitz/Device.java index cda3f2ff..2e5eafe3 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Device.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Device.java @@ -50,7 +50,7 @@ public class Device public void popClip() {} public void beginMask(Rect area, boolean luminosity, ColorSpace cs, float bc[]) {} public void endMask() {} - public void beginGroup(Rect area, boolean isolated, boolean knockout, int blendmode, float alpha) {} + public void beginGroup(Rect area, ColorSpace cs, boolean isolated, boolean knockout, int blendmode, float alpha) {} public void endGroup() {} public int beginTile(Rect area, Rect view, float xstep, float ystep, Matrix ctm, int id) { return 0; } public void endTile() {} diff --git a/platform/java/src/com/artifex/mupdf/fitz/Separations.java b/platform/java/src/com/artifex/mupdf/fitz/Separations.java index 6b86f3a4..d8e69d14 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Separations.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Separations.java @@ -4,6 +4,10 @@ public class Separations { private long pointer; + public static final int SEPARATION_COMPOSITE = 0; + public static final int SEPARATION_SPOT = 1; + public static final int SEPARATION_DISABLED = 2; + protected native void finalize(); public void destroy() { @@ -16,12 +20,9 @@ public class Separations } public native int getNumberOfSeparations(); - public native Separation getSeparation(int separation); public native boolean areSeparationsControllable(); - - public native boolean disableSeparation(int separation, boolean disable); - - public native boolean isSeparationDisabled(int separation); + public native int getSeparationBehavior(int separation); + public native void setSeparationBehavior(int separation, int behavior); } |