From ca8f110730ad5aadbc80a450a46de62c4004cbd1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 22 Sep 2016 14:01:31 +0200 Subject: Clean up annotation enum names. Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum. --- include/mupdf/fitz/annotation.h | 29 -- include/mupdf/pdf/annot.h | 49 +- platform/android/viewer/jni/mupdf.c | 8 +- platform/ios/Classes/MuDocumentController.m | 6 +- platform/ios/Classes/MuPageViewNormal.m | 10 +- platform/java/mupdf_native.h | 544 ++++++++++----------- .../java/src/com/artifex/mupdf/fitz/Device.java | 64 +-- .../src/com/artifex/mupdf/fitz/StrokeState.java | 18 +- source/pdf/pdf-annot-edit.c | 55 ++- source/pdf/pdf-annot.c | 50 +- source/pdf/pdf-appearance.c | 20 +- source/pdf/pdf-form.c | 26 +- source/pdf/pdf-interpret.c | 6 +- 13 files changed, 443 insertions(+), 442 deletions(-) diff --git a/include/mupdf/fitz/annotation.h b/include/mupdf/fitz/annotation.h index a3120858..9864fd16 100644 --- a/include/mupdf/fitz/annotation.h +++ b/include/mupdf/fitz/annotation.h @@ -6,35 +6,6 @@ #include "mupdf/fitz/math.h" #include "mupdf/fitz/document.h" -typedef enum -{ - FZ_ANNOT_TEXT, - FZ_ANNOT_LINK, - FZ_ANNOT_FREETEXT, - FZ_ANNOT_LINE, - FZ_ANNOT_SQUARE, - FZ_ANNOT_CIRCLE, - FZ_ANNOT_POLYGON, - FZ_ANNOT_POLYLINE, - FZ_ANNOT_HIGHLIGHT, - FZ_ANNOT_UNDERLINE, - FZ_ANNOT_SQUIGGLY, - FZ_ANNOT_STRIKEOUT, - FZ_ANNOT_STAMP, - FZ_ANNOT_CARET, - FZ_ANNOT_INK, - FZ_ANNOT_POPUP, - FZ_ANNOT_FILEATTACHMENT, - FZ_ANNOT_SOUND, - FZ_ANNOT_MOVIE, - FZ_ANNOT_WIDGET, - FZ_ANNOT_SCREEN, - FZ_ANNOT_PRINTERMARK, - FZ_ANNOT_TRAPNET, - FZ_ANNOT_WATERMARK, - FZ_ANNOT_3D -} fz_annot_type; - /* fz_new_annot: Create and initialize an annotation struct. */ diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 499a56fc..a7a83348 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -1,18 +1,47 @@ #ifndef MUPDF_PDF_ANNOT_H #define MUPDF_PDF_ANNOT_H +typedef enum +{ + PDF_ANNOT_TEXT, + PDF_ANNOT_LINK, + PDF_ANNOT_FREE_TEXT, + PDF_ANNOT_LINE, + PDF_ANNOT_SQUARE, + PDF_ANNOT_CIRCLE, + PDF_ANNOT_POLYGON, + PDF_ANNOT_POLY_LINE, + PDF_ANNOT_HIGHLIGHT, + PDF_ANNOT_UNDERLINE, + PDF_ANNOT_SQUIGGLY, + PDF_ANNOT_STRIKE_OUT, + PDF_ANNOT_STAMP, + PDF_ANNOT_CARET, + PDF_ANNOT_INK, + PDF_ANNOT_POPUP, + PDF_ANNOT_FILE_ATTACHMENT, + PDF_ANNOT_SOUND, + PDF_ANNOT_MOVIE, + PDF_ANNOT_WIDGET, + PDF_ANNOT_SCREEN, + PDF_ANNOT_PRINTER_MARK, + PDF_ANNOT_TRAP_NET, + PDF_ANNOT_WATERMARK, + PDF_ANNOT_3D +} fz_annot_type; + enum { - F_Invisible = 1 << (1-1), - F_Hidden = 1 << (2-1), - F_Print = 1 << (3-1), - F_NoZoom = 1 << (4-1), - F_NoRotate = 1 << (5-1), - F_NoView = 1 << (6-1), - F_ReadOnly = 1 << (7-1), - F_Locked = 1 << (8-1), - F_ToggleNoView = 1 << (9-1), - F_LockedContents = 1 << (10-1) + PDF_ANNOT_IS_INVISIBLE = 1 << (1-1), + PDF_ANNOT_IS_HIDDEN = 1 << (2-1), + PDF_ANNOT_IS_PRINT = 1 << (3-1), + PDF_ANNOT_IS_NO_ZOOM = 1 << (4-1), + PDF_ANNOT_IS_NO_ROTATE = 1 << (5-1), + PDF_ANNOT_IS_NO_VIEW = 1 << (6-1), + PDF_ANNOT_IS_READ_ONLY = 1 << (7-1), + PDF_ANNOT_IS_LOCKED = 1 << (8-1), + PDF_ANNOT_IS_TOGGLE_NO_VIEW = 1 << (9-1), + PDF_ANNOT_IS_LOCKED_CONTENTS = 1 << (10-1) }; /* diff --git a/platform/android/viewer/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c index 4f3b31f7..b682296c 100644 --- a/platform/android/viewer/jni/mupdf.c +++ b/platform/android/viewer/jni/mupdf.c @@ -1546,7 +1546,7 @@ JNI_FN(MuPDFCore_addMarkupAnnotationInternal)(JNIEnv * env, jobject thiz, jobjec switch (type) { - case FZ_ANNOT_HIGHLIGHT: + case PDF_ANNOT_HIGHLIGHT: color[0] = 1.0; color[1] = 1.0; color[2] = 0.0; @@ -1554,7 +1554,7 @@ JNI_FN(MuPDFCore_addMarkupAnnotationInternal)(JNIEnv * env, jobject thiz, jobjec line_thickness = 1.0; line_height = 0.5; break; - case FZ_ANNOT_UNDERLINE: + case PDF_ANNOT_UNDERLINE: color[0] = 0.0; color[1] = 0.0; color[2] = 1.0; @@ -1562,7 +1562,7 @@ JNI_FN(MuPDFCore_addMarkupAnnotationInternal)(JNIEnv * env, jobject thiz, jobjec line_thickness = LINE_THICKNESS; line_height = UNDERLINE_HEIGHT; break; - case FZ_ANNOT_STRIKEOUT: + case PDF_ANNOT_STRIKE_OUT: color[0] = 1.0; color[1] = 0.0; color[2] = 0.0; @@ -1697,7 +1697,7 @@ JNI_FN(MuPDFCore_addInkAnnotationInternal)(JNIEnv * env, jobject thiz, jobjectAr (*env)->DeleteLocalRef(env, arc); } - annot = (fz_annot *)pdf_create_annot(ctx, idoc, (pdf_page *)pc->page, FZ_ANNOT_INK); + annot = (fz_annot *)pdf_create_annot(ctx, idoc, (pdf_page *)pc->page, PDF_ANNOT_INK); pdf_set_ink_annot_list(ctx, idoc, (pdf_annot *)annot, pts, counts, n, color, INK_THICKNESS); diff --git a/platform/ios/Classes/MuDocumentController.m b/platform/ios/Classes/MuDocumentController.m index a06e5912..02efe1ee 100644 --- a/platform/ios/Classes/MuDocumentController.m +++ b/platform/ios/Classes/MuDocumentController.m @@ -695,15 +695,15 @@ static void saveDoc(const char *current_path, fz_document *doc) switch (barmode) { case BARMODE_HIGHLIGHT: - [view saveSelectionAsMarkup:FZ_ANNOT_HIGHLIGHT]; + [view saveSelectionAsMarkup:PDF_ANNOT_HIGHLIGHT]; break; case BARMODE_UNDERLINE: - [view saveSelectionAsMarkup:FZ_ANNOT_UNDERLINE]; + [view saveSelectionAsMarkup:PDF_ANNOT_UNDERLINE]; break; case BARMODE_STRIKE: - [view saveSelectionAsMarkup:FZ_ANNOT_STRIKEOUT]; + [view saveSelectionAsMarkup:PDF_ANNOT_STRIKEOUT]; break; case BARMODE_INK: diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m index fb88d8de..496b62ce 100644 --- a/platform/ios/Classes/MuPageViewNormal.m +++ b/platform/ios/Classes/MuPageViewNormal.m @@ -168,7 +168,7 @@ static void addMarkupAnnot(fz_document *doc, fz_page *page, int type, NSArray *r switch (type) { - case FZ_ANNOT_HIGHLIGHT: + case PDF_ANNOT_HIGHLIGHT: color[0] = 1.0; color[1] = 1.0; color[2] = 0.0; @@ -176,7 +176,7 @@ static void addMarkupAnnot(fz_document *doc, fz_page *page, int type, NSArray *r line_thickness = 1.0; line_height = 0.5; break; - case FZ_ANNOT_UNDERLINE: + case PDF_ANNOT_UNDERLINE: color[0] = 0.0; color[1] = 0.0; color[2] = 1.0; @@ -184,7 +184,7 @@ static void addMarkupAnnot(fz_document *doc, fz_page *page, int type, NSArray *r line_thickness = LINE_THICKNESS; line_height = UNDERLINE_HEIGHT; break; - case FZ_ANNOT_STRIKEOUT: + case PDF_ANNOT_STRIKEOUT: color[0] = 1.0; color[1] = 0.0; color[2] = 0.0; @@ -283,7 +283,7 @@ static void addInkAnnot(fz_document *doc, fz_page *page, NSArray *curves) } } - annot = pdf_create_annot(ctx, idoc, (pdf_page *)page, FZ_ANNOT_INK); + annot = pdf_create_annot(ctx, idoc, (pdf_page *)page, PDF_ANNOT_INK); pdf_set_ink_annot_list(ctx, idoc, annot, pts, counts, n, color, INK_THICKNESS); } fz_always(ctx) @@ -1360,7 +1360,7 @@ static void updatePixmap(fz_document *doc, fz_display_list *page_list, fz_displa for (i = 0; i < annotations.count; i++) { MuAnnotation *annot = annotations[i]; - if (annot.type != FZ_ANNOT_WIDGET && CGRectContainsPoint(annot.rect, ipt)) + if (annot.type != PDF_ANNOT_WIDGET && CGRectContainsPoint(annot.rect, ipt)) { [self selectAnnotation:i]; return [[[MuTapResultAnnotation alloc] initWithAnnotation:annot] autorelease]; diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h index 6807d27c..1a7a018c 100644 --- a/platform/java/mupdf_native.h +++ b/platform/java/mupdf_native.h @@ -336,70 +336,70 @@ JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Cookie_abort #ifdef __cplusplus extern "C" { #endif -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_MASK -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_MASK 1L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_COLOR -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_COLOR 2L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_UNCACHEABLE -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_UNCACHEABLE 4L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_FILLCOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_FILLCOLOR_UNDEFINED 8L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_STROKECOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_STROKECOLOR_UNDEFINED 16L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_STARTCAP_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_STARTCAP_UNDEFINED 32L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_DASHCAP_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_DASHCAP_UNDEFINED 64L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_ENDCAP_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_ENDCAP_UNDEFINED 128L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_LINEJOIN_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_LINEJOIN_UNDEFINED 256L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_MITERLIMIT_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_MITERLIMIT_UNDEFINED 512L -#undef com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_LINEWIDTH_UNDEFINED -#define com_artifex_mupdf_fitz_Device_FZ_DEVFLAG_LINEWIDTH_UNDEFINED 1024L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_NORMAL -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_NORMAL 0L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_MULTIPLY -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_MULTIPLY 1L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_SCREEN -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_SCREEN 2L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_OVERLAY -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_OVERLAY 3L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_DARKEN -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_DARKEN 4L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_LIGHTEN -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_LIGHTEN 5L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_COLOR_DODGE -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_COLOR_DODGE 6L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_COLOR_BURN -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_COLOR_BURN 7L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_HARD_LIGHT -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_HARD_LIGHT 8L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_SOFT_LIGHT -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_SOFT_LIGHT 9L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_DIFFERENCE -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_DIFFERENCE 10L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_EXCLUSION -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_EXCLUSION 11L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_HUE -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_HUE 12L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_SATURATION -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_SATURATION 13L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_COLOR -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_COLOR 14L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_LUMINOSITY -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_LUMINOSITY 15L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_MODEMASK -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_MODEMASK 15L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_ISOLATED -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_ISOLATED 16L -#undef com_artifex_mupdf_fitz_Device_FZ_BLEND_KNOCKOUT -#define com_artifex_mupdf_fitz_Device_FZ_BLEND_KNOCKOUT 32L -#undef com_artifex_mupdf_fitz_Device_FZ_IGNORE_IMAGE -#define com_artifex_mupdf_fitz_Device_FZ_IGNORE_IMAGE 1L -#undef com_artifex_mupdf_fitz_Device_FZ_IGNORE_SHADE -#define com_artifex_mupdf_fitz_Device_FZ_IGNORE_SHADE 2L +#undef com_artifex_mupdf_fitz_Device_FLAG_MASK +#define com_artifex_mupdf_fitz_Device_FLAG_MASK 1L +#undef com_artifex_mupdf_fitz_Device_FLAG_COLOR +#define com_artifex_mupdf_fitz_Device_FLAG_COLOR 2L +#undef com_artifex_mupdf_fitz_Device_FLAG_UNCACHEABLE +#define com_artifex_mupdf_fitz_Device_FLAG_UNCACHEABLE 4L +#undef com_artifex_mupdf_fitz_Device_FLAG_FILLCOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_FILLCOLOR_UNDEFINED 8L +#undef com_artifex_mupdf_fitz_Device_FLAG_STROKECOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_STROKECOLOR_UNDEFINED 16L +#undef com_artifex_mupdf_fitz_Device_FLAG_STARTCAP_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_STARTCAP_UNDEFINED 32L +#undef com_artifex_mupdf_fitz_Device_FLAG_DASHCAP_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_DASHCAP_UNDEFINED 64L +#undef com_artifex_mupdf_fitz_Device_FLAG_ENDCAP_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_ENDCAP_UNDEFINED 128L +#undef com_artifex_mupdf_fitz_Device_FLAG_LINEJOIN_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_LINEJOIN_UNDEFINED 256L +#undef com_artifex_mupdf_fitz_Device_FLAG_MITERLIMIT_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_MITERLIMIT_UNDEFINED 512L +#undef com_artifex_mupdf_fitz_Device_FLAG_LINEWIDTH_UNDEFINED +#define com_artifex_mupdf_fitz_Device_FLAG_LINEWIDTH_UNDEFINED 1024L +#undef com_artifex_mupdf_fitz_Device_BLEND_NORMAL +#define com_artifex_mupdf_fitz_Device_BLEND_NORMAL 0L +#undef com_artifex_mupdf_fitz_Device_BLEND_MULTIPLY +#define com_artifex_mupdf_fitz_Device_BLEND_MULTIPLY 1L +#undef com_artifex_mupdf_fitz_Device_BLEND_SCREEN +#define com_artifex_mupdf_fitz_Device_BLEND_SCREEN 2L +#undef com_artifex_mupdf_fitz_Device_BLEND_OVERLAY +#define com_artifex_mupdf_fitz_Device_BLEND_OVERLAY 3L +#undef com_artifex_mupdf_fitz_Device_BLEND_DARKEN +#define com_artifex_mupdf_fitz_Device_BLEND_DARKEN 4L +#undef com_artifex_mupdf_fitz_Device_BLEND_LIGHTEN +#define com_artifex_mupdf_fitz_Device_BLEND_LIGHTEN 5L +#undef com_artifex_mupdf_fitz_Device_BLEND_COLOR_DODGE +#define com_artifex_mupdf_fitz_Device_BLEND_COLOR_DODGE 6L +#undef com_artifex_mupdf_fitz_Device_BLEND_COLOR_BURN +#define com_artifex_mupdf_fitz_Device_BLEND_COLOR_BURN 7L +#undef com_artifex_mupdf_fitz_Device_BLEND_HARD_LIGHT +#define com_artifex_mupdf_fitz_Device_BLEND_HARD_LIGHT 8L +#undef com_artifex_mupdf_fitz_Device_BLEND_SOFT_LIGHT +#define com_artifex_mupdf_fitz_Device_BLEND_SOFT_LIGHT 9L +#undef com_artifex_mupdf_fitz_Device_BLEND_DIFFERENCE +#define com_artifex_mupdf_fitz_Device_BLEND_DIFFERENCE 10L +#undef com_artifex_mupdf_fitz_Device_BLEND_EXCLUSION +#define com_artifex_mupdf_fitz_Device_BLEND_EXCLUSION 11L +#undef com_artifex_mupdf_fitz_Device_BLEND_HUE +#define com_artifex_mupdf_fitz_Device_BLEND_HUE 12L +#undef com_artifex_mupdf_fitz_Device_BLEND_SATURATION +#define com_artifex_mupdf_fitz_Device_BLEND_SATURATION 13L +#undef com_artifex_mupdf_fitz_Device_BLEND_COLOR +#define com_artifex_mupdf_fitz_Device_BLEND_COLOR 14L +#undef com_artifex_mupdf_fitz_Device_BLEND_LUMINOSITY +#define com_artifex_mupdf_fitz_Device_BLEND_LUMINOSITY 15L +#undef com_artifex_mupdf_fitz_Device_BLEND_MODEMASK +#define com_artifex_mupdf_fitz_Device_BLEND_MODEMASK 15L +#undef com_artifex_mupdf_fitz_Device_BLEND_ISOLATED +#define com_artifex_mupdf_fitz_Device_BLEND_ISOLATED 16L +#undef com_artifex_mupdf_fitz_Device_BLEND_KNOCKOUT +#define com_artifex_mupdf_fitz_Device_BLEND_KNOCKOUT 32L +#undef com_artifex_mupdf_fitz_Device_IGNORE_IMAGE +#define com_artifex_mupdf_fitz_Device_IGNORE_IMAGE 1L +#undef com_artifex_mupdf_fitz_Device_IGNORE_SHADE +#define com_artifex_mupdf_fitz_Device_IGNORE_SHADE 2L /* * Class: com_artifex_mupdf_fitz_Device * Method: finalize @@ -510,70 +510,70 @@ JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_DisplayList_run #ifdef __cplusplus extern "C" { #endif -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_MASK -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_MASK 1L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_COLOR -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_COLOR 2L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_UNCACHEABLE -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_UNCACHEABLE 4L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_FILLCOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_FILLCOLOR_UNDEFINED 8L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_STROKECOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_STROKECOLOR_UNDEFINED 16L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_STARTCAP_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_STARTCAP_UNDEFINED 32L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_DASHCAP_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_DASHCAP_UNDEFINED 64L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_ENDCAP_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_ENDCAP_UNDEFINED 128L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_LINEJOIN_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_LINEJOIN_UNDEFINED 256L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_MITERLIMIT_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_MITERLIMIT_UNDEFINED 512L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_LINEWIDTH_UNDEFINED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_DEVFLAG_LINEWIDTH_UNDEFINED 1024L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_NORMAL -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_NORMAL 0L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_MULTIPLY -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_MULTIPLY 1L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_SCREEN -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_SCREEN 2L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_OVERLAY -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_OVERLAY 3L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_DARKEN -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_DARKEN 4L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_LIGHTEN -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_LIGHTEN 5L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_COLOR_DODGE -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_COLOR_DODGE 6L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_COLOR_BURN -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_COLOR_BURN 7L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_HARD_LIGHT -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_HARD_LIGHT 8L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_SOFT_LIGHT -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_SOFT_LIGHT 9L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_DIFFERENCE -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_DIFFERENCE 10L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_EXCLUSION -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_EXCLUSION 11L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_HUE -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_HUE 12L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_SATURATION -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_SATURATION 13L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_COLOR -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_COLOR 14L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_LUMINOSITY -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_LUMINOSITY 15L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_MODEMASK -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_MODEMASK 15L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_ISOLATED -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_ISOLATED 16L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_KNOCKOUT -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_BLEND_KNOCKOUT 32L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_IGNORE_IMAGE -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_IGNORE_IMAGE 1L -#undef com_artifex_mupdf_fitz_DisplayListDevice_FZ_IGNORE_SHADE -#define com_artifex_mupdf_fitz_DisplayListDevice_FZ_IGNORE_SHADE 2L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_MASK +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_MASK 1L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_COLOR +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_COLOR 2L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_UNCACHEABLE +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_UNCACHEABLE 4L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_FILLCOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_FILLCOLOR_UNDEFINED 8L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_STROKECOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_STROKECOLOR_UNDEFINED 16L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_STARTCAP_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_STARTCAP_UNDEFINED 32L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_DASHCAP_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_DASHCAP_UNDEFINED 64L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_ENDCAP_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_ENDCAP_UNDEFINED 128L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_LINEJOIN_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_LINEJOIN_UNDEFINED 256L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_MITERLIMIT_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_MITERLIMIT_UNDEFINED 512L +#undef com_artifex_mupdf_fitz_DisplayListDevice_FLAG_LINEWIDTH_UNDEFINED +#define com_artifex_mupdf_fitz_DisplayListDevice_FLAG_LINEWIDTH_UNDEFINED 1024L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_NORMAL +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_NORMAL 0L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_MULTIPLY +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_MULTIPLY 1L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_SCREEN +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_SCREEN 2L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_OVERLAY +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_OVERLAY 3L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_DARKEN +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_DARKEN 4L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_LIGHTEN +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_LIGHTEN 5L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_COLOR_DODGE +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_COLOR_DODGE 6L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_COLOR_BURN +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_COLOR_BURN 7L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_HARD_LIGHT +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_HARD_LIGHT 8L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_SOFT_LIGHT +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_SOFT_LIGHT 9L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_DIFFERENCE +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_DIFFERENCE 10L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_EXCLUSION +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_EXCLUSION 11L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_HUE +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_HUE 12L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_SATURATION +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_SATURATION 13L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_COLOR +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_COLOR 14L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_LUMINOSITY +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_LUMINOSITY 15L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_MODEMASK +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_MODEMASK 15L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_ISOLATED +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_ISOLATED 16L +#undef com_artifex_mupdf_fitz_DisplayListDevice_BLEND_KNOCKOUT +#define com_artifex_mupdf_fitz_DisplayListDevice_BLEND_KNOCKOUT 32L +#undef com_artifex_mupdf_fitz_DisplayListDevice_IGNORE_IMAGE +#define com_artifex_mupdf_fitz_DisplayListDevice_IGNORE_IMAGE 1L +#undef com_artifex_mupdf_fitz_DisplayListDevice_IGNORE_SHADE +#define com_artifex_mupdf_fitz_DisplayListDevice_IGNORE_SHADE 2L /* * Class: com_artifex_mupdf_fitz_DisplayListDevice * Method: newNative @@ -767,70 +767,70 @@ JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_DocumentWriter_close #ifdef __cplusplus extern "C" { #endif -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_MASK -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_MASK 1L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_COLOR -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_COLOR 2L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_UNCACHEABLE -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_UNCACHEABLE 4L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_FILLCOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_FILLCOLOR_UNDEFINED 8L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_STROKECOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_STROKECOLOR_UNDEFINED 16L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_STARTCAP_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_STARTCAP_UNDEFINED 32L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_DASHCAP_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_DASHCAP_UNDEFINED 64L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_ENDCAP_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_ENDCAP_UNDEFINED 128L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_LINEJOIN_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_LINEJOIN_UNDEFINED 256L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_MITERLIMIT_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_MITERLIMIT_UNDEFINED 512L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_LINEWIDTH_UNDEFINED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_DEVFLAG_LINEWIDTH_UNDEFINED 1024L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_NORMAL -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_NORMAL 0L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_MULTIPLY -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_MULTIPLY 1L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_SCREEN -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_SCREEN 2L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_OVERLAY -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_OVERLAY 3L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_DARKEN -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_DARKEN 4L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_LIGHTEN -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_LIGHTEN 5L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_COLOR_DODGE -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_COLOR_DODGE 6L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_COLOR_BURN -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_COLOR_BURN 7L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_HARD_LIGHT -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_HARD_LIGHT 8L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_SOFT_LIGHT -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_SOFT_LIGHT 9L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_DIFFERENCE -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_DIFFERENCE 10L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_EXCLUSION -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_EXCLUSION 11L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_HUE -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_HUE 12L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_SATURATION -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_SATURATION 13L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_COLOR -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_COLOR 14L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_LUMINOSITY -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_LUMINOSITY 15L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_MODEMASK -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_MODEMASK 15L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_ISOLATED -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_ISOLATED 16L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_KNOCKOUT -#define com_artifex_mupdf_fitz_DrawDevice_FZ_BLEND_KNOCKOUT 32L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_IGNORE_IMAGE -#define com_artifex_mupdf_fitz_DrawDevice_FZ_IGNORE_IMAGE 1L -#undef com_artifex_mupdf_fitz_DrawDevice_FZ_IGNORE_SHADE -#define com_artifex_mupdf_fitz_DrawDevice_FZ_IGNORE_SHADE 2L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_MASK +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_MASK 1L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_COLOR +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_COLOR 2L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_UNCACHEABLE +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_UNCACHEABLE 4L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_FILLCOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_FILLCOLOR_UNDEFINED 8L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_STROKECOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_STROKECOLOR_UNDEFINED 16L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_STARTCAP_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_STARTCAP_UNDEFINED 32L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_DASHCAP_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_DASHCAP_UNDEFINED 64L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_ENDCAP_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_ENDCAP_UNDEFINED 128L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_LINEJOIN_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_LINEJOIN_UNDEFINED 256L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_MITERLIMIT_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_MITERLIMIT_UNDEFINED 512L +#undef com_artifex_mupdf_fitz_DrawDevice_FLAG_LINEWIDTH_UNDEFINED +#define com_artifex_mupdf_fitz_DrawDevice_FLAG_LINEWIDTH_UNDEFINED 1024L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_NORMAL +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_NORMAL 0L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_MULTIPLY +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_MULTIPLY 1L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_SCREEN +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_SCREEN 2L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_OVERLAY +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_OVERLAY 3L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_DARKEN +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_DARKEN 4L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_LIGHTEN +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_LIGHTEN 5L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_COLOR_DODGE +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_COLOR_DODGE 6L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_COLOR_BURN +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_COLOR_BURN 7L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_HARD_LIGHT +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_HARD_LIGHT 8L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_SOFT_LIGHT +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_SOFT_LIGHT 9L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_DIFFERENCE +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_DIFFERENCE 10L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_EXCLUSION +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_EXCLUSION 11L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_HUE +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_HUE 12L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_SATURATION +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_SATURATION 13L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_COLOR +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_COLOR 14L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_LUMINOSITY +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_LUMINOSITY 15L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_MODEMASK +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_MODEMASK 15L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_ISOLATED +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_ISOLATED 16L +#undef com_artifex_mupdf_fitz_DrawDevice_BLEND_KNOCKOUT +#define com_artifex_mupdf_fitz_DrawDevice_BLEND_KNOCKOUT 32L +#undef com_artifex_mupdf_fitz_DrawDevice_IGNORE_IMAGE +#define com_artifex_mupdf_fitz_DrawDevice_IGNORE_IMAGE 1L +#undef com_artifex_mupdf_fitz_DrawDevice_IGNORE_SHADE +#define com_artifex_mupdf_fitz_DrawDevice_IGNORE_SHADE 2L /* * Class: com_artifex_mupdf_fitz_DrawDevice * Method: newNative @@ -1046,70 +1046,70 @@ extern "C" { #ifdef __cplusplus extern "C" { #endif -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_MASK -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_MASK 1L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_COLOR -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_COLOR 2L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_UNCACHEABLE -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_UNCACHEABLE 4L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_FILLCOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_FILLCOLOR_UNDEFINED 8L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_STROKECOLOR_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_STROKECOLOR_UNDEFINED 16L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_STARTCAP_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_STARTCAP_UNDEFINED 32L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_DASHCAP_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_DASHCAP_UNDEFINED 64L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_ENDCAP_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_ENDCAP_UNDEFINED 128L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_LINEJOIN_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_LINEJOIN_UNDEFINED 256L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_MITERLIMIT_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_MITERLIMIT_UNDEFINED 512L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_LINEWIDTH_UNDEFINED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_DEVFLAG_LINEWIDTH_UNDEFINED 1024L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_NORMAL -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_NORMAL 0L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_MULTIPLY -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_MULTIPLY 1L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_SCREEN -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_SCREEN 2L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_OVERLAY -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_OVERLAY 3L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_DARKEN -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_DARKEN 4L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_LIGHTEN -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_LIGHTEN 5L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_COLOR_DODGE -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_COLOR_DODGE 6L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_COLOR_BURN -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_COLOR_BURN 7L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_HARD_LIGHT -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_HARD_LIGHT 8L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_SOFT_LIGHT -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_SOFT_LIGHT 9L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_DIFFERENCE -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_DIFFERENCE 10L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_EXCLUSION -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_EXCLUSION 11L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_HUE -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_HUE 12L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_SATURATION -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_SATURATION 13L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_COLOR -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_COLOR 14L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_LUMINOSITY -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_LUMINOSITY 15L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_MODEMASK -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_MODEMASK 15L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_ISOLATED -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_ISOLATED 16L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_KNOCKOUT -#define com_artifex_mupdf_fitz_NativeDevice_FZ_BLEND_KNOCKOUT 32L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_IGNORE_IMAGE -#define com_artifex_mupdf_fitz_NativeDevice_FZ_IGNORE_IMAGE 1L -#undef com_artifex_mupdf_fitz_NativeDevice_FZ_IGNORE_SHADE -#define com_artifex_mupdf_fitz_NativeDevice_FZ_IGNORE_SHADE 2L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_MASK +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_MASK 1L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_COLOR +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_COLOR 2L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_UNCACHEABLE +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_UNCACHEABLE 4L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_FILLCOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_FILLCOLOR_UNDEFINED 8L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_STROKECOLOR_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_STROKECOLOR_UNDEFINED 16L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_STARTCAP_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_STARTCAP_UNDEFINED 32L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_DASHCAP_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_DASHCAP_UNDEFINED 64L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_ENDCAP_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_ENDCAP_UNDEFINED 128L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_LINEJOIN_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_LINEJOIN_UNDEFINED 256L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_MITERLIMIT_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_MITERLIMIT_UNDEFINED 512L +#undef com_artifex_mupdf_fitz_NativeDevice_FLAG_LINEWIDTH_UNDEFINED +#define com_artifex_mupdf_fitz_NativeDevice_FLAG_LINEWIDTH_UNDEFINED 1024L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_NORMAL +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_NORMAL 0L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_MULTIPLY +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_MULTIPLY 1L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_SCREEN +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_SCREEN 2L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_OVERLAY +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_OVERLAY 3L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_DARKEN +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_DARKEN 4L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_LIGHTEN +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_LIGHTEN 5L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_COLOR_DODGE +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_COLOR_DODGE 6L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_COLOR_BURN +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_COLOR_BURN 7L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_HARD_LIGHT +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_HARD_LIGHT 8L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_SOFT_LIGHT +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_SOFT_LIGHT 9L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_DIFFERENCE +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_DIFFERENCE 10L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_EXCLUSION +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_EXCLUSION 11L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_HUE +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_HUE 12L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_SATURATION +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_SATURATION 13L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_COLOR +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_COLOR 14L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_LUMINOSITY +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_LUMINOSITY 15L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_MODEMASK +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_MODEMASK 15L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_ISOLATED +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_ISOLATED 16L +#undef com_artifex_mupdf_fitz_NativeDevice_BLEND_KNOCKOUT +#define com_artifex_mupdf_fitz_NativeDevice_BLEND_KNOCKOUT 32L +#undef com_artifex_mupdf_fitz_NativeDevice_IGNORE_IMAGE +#define com_artifex_mupdf_fitz_NativeDevice_IGNORE_IMAGE 1L +#undef com_artifex_mupdf_fitz_NativeDevice_IGNORE_SHADE +#define com_artifex_mupdf_fitz_NativeDevice_IGNORE_SHADE 2L /* * Class: com_artifex_mupdf_fitz_NativeDevice * Method: finalize @@ -2496,22 +2496,22 @@ JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Shade_finalize #ifdef __cplusplus extern "C" { #endif -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_BUTT -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_BUTT 0L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_ROUND -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_ROUND 1L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_SQUARE -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_SQUARE 2L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_TRIANGLE -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINECAP_TRIANGLE 3L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_MITER -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_MITER 0L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_ROUND -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_ROUND 1L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_BEVEL -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_BEVEL 2L -#undef com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_MITER_XPS -#define com_artifex_mupdf_fitz_StrokeState_FZ_LINEJOIN_MITER_XPS 3L +#undef com_artifex_mupdf_fitz_StrokeState_LINECAP_BUTT +#define com_artifex_mupdf_fitz_StrokeState_LINECAP_BUTT 0L +#undef com_artifex_mupdf_fitz_StrokeState_LINECAP_ROUND +#define com_artifex_mupdf_fitz_StrokeState_LINECAP_ROUND 1L +#undef com_artifex_mupdf_fitz_StrokeState_LINECAP_SQUARE +#define com_artifex_mupdf_fitz_StrokeState_LINECAP_SQUARE 2L +#undef com_artifex_mupdf_fitz_StrokeState_LINECAP_TRIANGLE +#define com_artifex_mupdf_fitz_StrokeState_LINECAP_TRIANGLE 3L +#undef com_artifex_mupdf_fitz_StrokeState_LINEJOIN_MITER +#define com_artifex_mupdf_fitz_StrokeState_LINEJOIN_MITER 0L +#undef com_artifex_mupdf_fitz_StrokeState_LINEJOIN_ROUND +#define com_artifex_mupdf_fitz_StrokeState_LINEJOIN_ROUND 1L +#undef com_artifex_mupdf_fitz_StrokeState_LINEJOIN_BEVEL +#define com_artifex_mupdf_fitz_StrokeState_LINEJOIN_BEVEL 2L +#undef com_artifex_mupdf_fitz_StrokeState_LINEJOIN_MITER_XPS +#define com_artifex_mupdf_fitz_StrokeState_LINEJOIN_MITER_XPS 3L /* * Class: com_artifex_mupdf_fitz_StrokeState * Method: finalize diff --git a/platform/java/src/com/artifex/mupdf/fitz/Device.java b/platform/java/src/com/artifex/mupdf/fitz/Device.java index 295226fe..bbb5ae3b 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Device.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Device.java @@ -61,44 +61,44 @@ public class Device public void endTile() {} /* Flags */ - public static final int FZ_DEVFLAG_MASK = 1; - public static final int FZ_DEVFLAG_COLOR = 2; - public static final int FZ_DEVFLAG_UNCACHEABLE = 4; - public static final int FZ_DEVFLAG_FILLCOLOR_UNDEFINED = 8; - public static final int FZ_DEVFLAG_STROKECOLOR_UNDEFINED = 16; - public static final int FZ_DEVFLAG_STARTCAP_UNDEFINED = 32; - public static final int FZ_DEVFLAG_DASHCAP_UNDEFINED = 64; - public static final int FZ_DEVFLAG_ENDCAP_UNDEFINED = 128; - public static final int FZ_DEVFLAG_LINEJOIN_UNDEFINED = 256; - public static final int FZ_DEVFLAG_MITERLIMIT_UNDEFINED = 512; - public static final int FZ_DEVFLAG_LINEWIDTH_UNDEFINED = 1024; + public static final int FLAG_MASK = 1; + public static final int FLAG_COLOR = 2; + public static final int FLAG_UNCACHEABLE = 4; + public static final int FLAG_FILLCOLOR_UNDEFINED = 8; + public static final int FLAG_STROKECOLOR_UNDEFINED = 16; + public static final int FLAG_STARTCAP_UNDEFINED = 32; + public static final int FLAG_DASHCAP_UNDEFINED = 64; + public static final int FLAG_ENDCAP_UNDEFINED = 128; + public static final int FLAG_LINEJOIN_UNDEFINED = 256; + public static final int FLAG_MITERLIMIT_UNDEFINED = 512; + public static final int FLAG_LINEWIDTH_UNDEFINED = 1024; /* PDF 1.4 -- standard separable */ - public static final int FZ_BLEND_NORMAL = 0; - public static final int FZ_BLEND_MULTIPLY = 1; - public static final int FZ_BLEND_SCREEN = 2; - public static final int FZ_BLEND_OVERLAY = 3; - public static final int FZ_BLEND_DARKEN = 4; - public static final int FZ_BLEND_LIGHTEN = 5; - public static final int FZ_BLEND_COLOR_DODGE = 6; - public static final int FZ_BLEND_COLOR_BURN = 7; - public static final int FZ_BLEND_HARD_LIGHT = 8; - public static final int FZ_BLEND_SOFT_LIGHT = 9; - public static final int FZ_BLEND_DIFFERENCE = 10; - public static final int FZ_BLEND_EXCLUSION = 11; + public static final int BLEND_NORMAL = 0; + public static final int BLEND_MULTIPLY = 1; + public static final int BLEND_SCREEN = 2; + public static final int BLEND_OVERLAY = 3; + public static final int BLEND_DARKEN = 4; + public static final int BLEND_LIGHTEN = 5; + public static final int BLEND_COLOR_DODGE = 6; + public static final int BLEND_COLOR_BURN = 7; + public static final int BLEND_HARD_LIGHT = 8; + public static final int BLEND_SOFT_LIGHT = 9; + public static final int BLEND_DIFFERENCE = 10; + public static final int BLEND_EXCLUSION = 11; /* PDF 1.4 -- standard non-separable */ - public static final int FZ_BLEND_HUE = 12; - public static final int FZ_BLEND_SATURATION = 13; - public static final int FZ_BLEND_COLOR = 14; - public static final int FZ_BLEND_LUMINOSITY = 15; + public static final int BLEND_HUE = 12; + public static final int BLEND_SATURATION = 13; + public static final int BLEND_COLOR = 14; + public static final int BLEND_LUMINOSITY = 15; /* For packing purposes */ - public static final int FZ_BLEND_MODEMASK = 15; - public static final int FZ_BLEND_ISOLATED = 16; - public static final int FZ_BLEND_KNOCKOUT = 32; + public static final int BLEND_MODEMASK = 15; + public static final int BLEND_ISOLATED = 16; + public static final int BLEND_KNOCKOUT = 32; /* Device hints */ - public static final int FZ_IGNORE_IMAGE = 1; - public static final int FZ_IGNORE_SHADE = 2; + public static final int IGNORE_IMAGE = 1; + public static final int IGNORE_SHADE = 2; } diff --git a/platform/java/src/com/artifex/mupdf/fitz/StrokeState.java b/platform/java/src/com/artifex/mupdf/fitz/StrokeState.java index 7f333f76..c29291fc 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/StrokeState.java +++ b/platform/java/src/com/artifex/mupdf/fitz/StrokeState.java @@ -2,15 +2,15 @@ package com.artifex.mupdf.fitz; public class StrokeState { - public static final int FZ_LINECAP_BUTT = 0; - public static final int FZ_LINECAP_ROUND = 1; - public static final int FZ_LINECAP_SQUARE = 2; - public static final int FZ_LINECAP_TRIANGLE = 3; - - public static final int FZ_LINEJOIN_MITER = 0; - public static final int FZ_LINEJOIN_ROUND = 1; - public static final int FZ_LINEJOIN_BEVEL = 2; - public static final int FZ_LINEJOIN_MITER_XPS = 3; + public static final int LINECAP_BUTT = 0; + public static final int LINECAP_ROUND = 1; + public static final int LINECAP_SQUARE = 2; + public static final int LINECAP_TRIANGLE = 3; + + public static final int LINEJOIN_MITER = 0; + public static final int LINEJOIN_ROUND = 1; + public static final int LINEJOIN_BEVEL = 2; + public static final int LINEJOIN_MITER_XPS = 3; private long pointer; diff --git a/source/pdf/pdf-annot-edit.c b/source/pdf/pdf-annot-edit.c index 9f7e74bd..32c3f353 100644 --- a/source/pdf/pdf-annot-edit.c +++ b/source/pdf/pdf-annot-edit.c @@ -6,31 +6,31 @@ static const char *annot_type_str(fz_annot_type type) { switch (type) { - case FZ_ANNOT_TEXT: return "Text"; - case FZ_ANNOT_LINK: return "Link"; - case FZ_ANNOT_FREETEXT: return "FreeText"; - case FZ_ANNOT_LINE: return "Line"; - case FZ_ANNOT_SQUARE: return "Square"; - case FZ_ANNOT_CIRCLE: return "Circle"; - case FZ_ANNOT_POLYGON: return "Polygon"; - case FZ_ANNOT_POLYLINE: return "PolyLine"; - case FZ_ANNOT_HIGHLIGHT: return "Highlight"; - case FZ_ANNOT_UNDERLINE: return "Underline"; - case FZ_ANNOT_SQUIGGLY: return "Squiggly"; - case FZ_ANNOT_STRIKEOUT: return "StrikeOut"; - case FZ_ANNOT_STAMP: return "Stamp"; - case FZ_ANNOT_CARET: return "Caret"; - case FZ_ANNOT_INK: return "Ink"; - case FZ_ANNOT_POPUP: return "Popup"; - case FZ_ANNOT_FILEATTACHMENT: return "FileAttachment"; - case FZ_ANNOT_SOUND: return "Sound"; - case FZ_ANNOT_MOVIE: return "Movie"; - case FZ_ANNOT_WIDGET: return "Widget"; - case FZ_ANNOT_SCREEN: return "Screen"; - case FZ_ANNOT_PRINTERMARK: return "PrinterMark"; - case FZ_ANNOT_TRAPNET: return "TrapNet"; - case FZ_ANNOT_WATERMARK: return "Watermark"; - case FZ_ANNOT_3D: return "3D"; + case PDF_ANNOT_TEXT: return "Text"; + case PDF_ANNOT_LINK: return "Link"; + case PDF_ANNOT_FREE_TEXT: return "FreeText"; + case PDF_ANNOT_LINE: return "Line"; + case PDF_ANNOT_SQUARE: return "Square"; + case PDF_ANNOT_CIRCLE: return "Circle"; + case PDF_ANNOT_POLYGON: return "Polygon"; + case PDF_ANNOT_POLY_LINE: return "PolyLine"; + case PDF_ANNOT_HIGHLIGHT: return "Highlight"; + case PDF_ANNOT_UNDERLINE: return "Underline"; + case PDF_ANNOT_SQUIGGLY: return "Squiggly"; + case PDF_ANNOT_STRIKE_OUT: return "StrikeOut"; + case PDF_ANNOT_STAMP: return "Stamp"; + case PDF_ANNOT_CARET: return "Caret"; + case PDF_ANNOT_INK: return "Ink"; + case PDF_ANNOT_POPUP: return "Popup"; + case PDF_ANNOT_FILE_ATTACHMENT: return "FileAttachment"; + case PDF_ANNOT_SOUND: return "Sound"; + case PDF_ANNOT_MOVIE: return "Movie"; + case PDF_ANNOT_WIDGET: return "Widget"; + case PDF_ANNOT_SCREEN: return "Screen"; + case PDF_ANNOT_PRINTER_MARK: return "PrinterMark"; + case PDF_ANNOT_TRAP_NET: return "TrapNet"; + case PDF_ANNOT_WATERMARK: return "Watermark"; + case PDF_ANNOT_3D: return "3D"; default: return ""; } } @@ -112,7 +112,7 @@ pdf_create_annot(fz_context *ctx, pdf_document *doc, pdf_page *page, fz_annot_ty pdf_dict_put_drop(ctx, annot_obj, PDF_NAME_Rect, pdf_new_rect(ctx, doc, &rect)); /* Make printable as default */ - pdf_dict_put_drop(ctx, annot_obj, PDF_NAME_F, pdf_new_int(ctx, doc, F_Print)); + pdf_dict_put_drop(ctx, annot_obj, PDF_NAME_F, pdf_new_int(ctx, doc, PDF_ANNOT_IS_PRINT)); annot = pdf_new_annot(ctx, page); annot->ap = NULL; @@ -351,7 +351,7 @@ void pdf_set_text_annot_position(fz_context *ctx, pdf_document *doc, pdf_annot * pdf_dict_put_drop(ctx, annot->obj, PDF_NAME_Rect, pdf_new_rect(ctx, doc, &rect)); flags = pdf_to_int(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_F)); - flags |= (F_NoZoom|F_NoRotate); + flags |= (PDF_ANNOT_IS_NO_ZOOM|PDF_ANNOT_IS_NO_ROTATE); pdf_dict_put_drop(ctx, annot->obj, PDF_NAME_F, pdf_new_int(ctx, doc, flags)); } @@ -372,6 +372,7 @@ const char *pdf_annot_author(fz_context *ctx, pdf_annot *annot) const char *pdf_annot_date(fz_context *ctx, pdf_annot *annot) { + // TODO: PDF_NAME_M return pdf_to_str_buf(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_CreationDate)); } diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index acf81961..d1ca7de0 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -434,55 +434,55 @@ fz_annot_type pdf_annot_type(fz_context *ctx, pdf_annot *annot) pdf_obj *obj = annot->obj; pdf_obj *subtype = pdf_dict_get(ctx, obj, PDF_NAME_Subtype); if (pdf_name_eq(ctx, PDF_NAME_Text, subtype)) - return FZ_ANNOT_TEXT; + return PDF_ANNOT_TEXT; else if (pdf_name_eq(ctx, PDF_NAME_Link, subtype)) - return FZ_ANNOT_LINK; + return PDF_ANNOT_LINK; else if (pdf_name_eq(ctx, PDF_NAME_FreeText, subtype)) - return FZ_ANNOT_FREETEXT; + return PDF_ANNOT_FREE_TEXT; else if (pdf_name_eq(ctx, PDF_NAME_Line, subtype)) - return FZ_ANNOT_LINE; + return PDF_ANNOT_LINE; else if (pdf_name_eq(ctx, PDF_NAME_Square, subtype)) - return FZ_ANNOT_SQUARE; + return PDF_ANNOT_SQUARE; else if (pdf_name_eq(ctx, PDF_NAME_Circle, subtype)) - return FZ_ANNOT_CIRCLE; + return PDF_ANNOT_CIRCLE; else if (pdf_name_eq(ctx, PDF_NAME_Polygon, subtype)) - return FZ_ANNOT_POLYGON; + return PDF_ANNOT_POLYGON; else if (pdf_name_eq(ctx, PDF_NAME_PolyLine, subtype)) - return FZ_ANNOT_POLYLINE; + return PDF_ANNOT_POLY_LINE; else if (pdf_name_eq(ctx, PDF_NAME_Highlight, subtype)) - return FZ_ANNOT_HIGHLIGHT; + return PDF_ANNOT_HIGHLIGHT; else if (pdf_name_eq(ctx, PDF_NAME_Underline, subtype)) - return FZ_ANNOT_UNDERLINE; + return PDF_ANNOT_UNDERLINE; else if (pdf_name_eq(ctx, PDF_NAME_Squiggly, subtype)) - return FZ_ANNOT_SQUIGGLY; + return PDF_ANNOT_SQUIGGLY; else if (pdf_name_eq(ctx, PDF_NAME_StrikeOut, subtype)) - return FZ_ANNOT_STRIKEOUT; + return PDF_ANNOT_STRIKE_OUT; else if (pdf_name_eq(ctx, PDF_NAME_Stamp, subtype)) - return FZ_ANNOT_STAMP; + return PDF_ANNOT_STAMP; else if (pdf_name_eq(ctx, PDF_NAME_Caret, subtype)) - return FZ_ANNOT_CARET; + return PDF_ANNOT_CARET; else if (pdf_name_eq(ctx, PDF_NAME_Ink, subtype)) - return FZ_ANNOT_INK; + return PDF_ANNOT_INK; else if (pdf_name_eq(ctx, PDF_NAME_Popup, subtype)) - return FZ_ANNOT_POPUP; + return PDF_ANNOT_POPUP; else if (pdf_name_eq(ctx, PDF_NAME_FileAttachment, subtype)) - return FZ_ANNOT_FILEATTACHMENT; + return PDF_ANNOT_FILE_ATTACHMENT; else if (pdf_name_eq(ctx, PDF_NAME_Sound, subtype)) - return FZ_ANNOT_SOUND; + return PDF_ANNOT_SOUND; else if (pdf_name_eq(ctx, PDF_NAME_Movie, subtype)) - return FZ_ANNOT_MOVIE; + return PDF_ANNOT_MOVIE; else if (pdf_name_eq(ctx, PDF_NAME_Widget, subtype)) - return FZ_ANNOT_WIDGET; + return PDF_ANNOT_WIDGET; else if (pdf_name_eq(ctx, PDF_NAME_Screen, subtype)) - return FZ_ANNOT_SCREEN; + return PDF_ANNOT_SCREEN; else if (pdf_name_eq(ctx, PDF_NAME_PrinterMark, subtype)) - return FZ_ANNOT_PRINTERMARK; + return PDF_ANNOT_PRINTER_MARK; else if (pdf_name_eq(ctx, PDF_NAME_TrapNet, subtype)) - return FZ_ANNOT_TRAPNET; + return PDF_ANNOT_TRAP_NET; else if (pdf_name_eq(ctx, PDF_NAME_Watermark, subtype)) - return FZ_ANNOT_WATERMARK; + return PDF_ANNOT_WATERMARK; else if (pdf_name_eq(ctx, PDF_NAME_3D, subtype)) - return FZ_ANNOT_3D; + return PDF_ANNOT_3D; else return -1; } diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index dadb04ce..f22c97c8 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -1534,7 +1534,7 @@ void pdf_update_text_markup_appearance(fz_context *ctx, pdf_document *doc, pdf_a switch (type) { - case FZ_ANNOT_HIGHLIGHT: + case PDF_ANNOT_HIGHLIGHT: color[0] = 1.0; color[1] = 1.0; color[2] = 0.0; @@ -1542,7 +1542,7 @@ void pdf_update_text_markup_appearance(fz_context *ctx, pdf_document *doc, pdf_a line_thickness = 1.0; line_height = 0.5; break; - case FZ_ANNOT_UNDERLINE: + case PDF_ANNOT_UNDERLINE: color[0] = 0.0; color[1] = 0.0; color[2] = 1.0; @@ -1550,7 +1550,7 @@ void pdf_update_text_markup_appearance(fz_context *ctx, pdf_document *doc, pdf_a line_thickness = LINE_THICKNESS; line_height = UNDERLINE_HEIGHT; break; - case FZ_ANNOT_STRIKEOUT: + case PDF_ANNOT_STRIKE_OUT: color[0] = 1.0; color[1] = 0.0; color[2] = 0.0; @@ -2458,7 +2458,7 @@ void pdf_update_appearance(fz_context *ctx, pdf_document *doc, pdf_annot *annot) fz_annot_type type = pdf_annot_type(ctx, annot); switch (type) { - case FZ_ANNOT_WIDGET: + case PDF_ANNOT_WIDGET: switch (pdf_field_type(ctx, doc, obj)) { case PDF_WIDGET_TYPE_TEXT: @@ -2506,18 +2506,18 @@ void pdf_update_appearance(fz_context *ctx, pdf_document *doc, pdf_annot *annot) break; } break; - case FZ_ANNOT_TEXT: + case PDF_ANNOT_TEXT: pdf_update_text_annot_appearance(ctx, doc, annot); break; - case FZ_ANNOT_FREETEXT: + case PDF_ANNOT_FREE_TEXT: pdf_update_free_text_annot_appearance(ctx, doc, annot); break; - case FZ_ANNOT_STRIKEOUT: - case FZ_ANNOT_UNDERLINE: - case FZ_ANNOT_HIGHLIGHT: + case PDF_ANNOT_STRIKE_OUT: + case PDF_ANNOT_UNDERLINE: + case PDF_ANNOT_HIGHLIGHT: pdf_update_text_markup_appearance(ctx, doc, annot, type); break; - case FZ_ANNOT_INK: + case PDF_ANNOT_INK: pdf_update_ink_appearance(ctx, doc, annot); break; default: diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c index 395703a9..045e1b86 100644 --- a/source/pdf/pdf-form.c +++ b/source/pdf/pdf-form.c @@ -600,7 +600,7 @@ int pdf_pass_event(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_ui_ev { int f = pdf_to_int(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_F)); - if (f & (F_Hidden|F_NoView)) + if (f & (PDF_ANNOT_IS_HIDDEN|PDF_ANNOT_IS_NO_VIEW)) annot = NULL; } @@ -748,7 +748,7 @@ pdf_widget *pdf_first_widget(fz_context *ctx, pdf_document *doc, pdf_page *page) { pdf_annot *annot = page->annots; - while (annot && pdf_annot_type(ctx, annot) != FZ_ANNOT_WIDGET) + while (annot && pdf_annot_type(ctx, annot) != PDF_ANNOT_WIDGET) annot = annot->next; return (pdf_widget *)annot; @@ -761,7 +761,7 @@ pdf_widget *pdf_next_widget(fz_context *ctx, pdf_widget *previous) if (annot) annot = annot->next; - while (annot && pdf_annot_type(ctx, annot) != FZ_ANNOT_WIDGET) + while (annot && pdf_annot_type(ctx, annot) != PDF_ANNOT_WIDGET) annot = annot->next; return (pdf_widget *)annot; @@ -771,7 +771,7 @@ pdf_widget *pdf_create_widget(fz_context *ctx, pdf_document *doc, pdf_page *page { pdf_obj *form = NULL; int old_sigflags = pdf_to_int(ctx, pdf_dict_getp(ctx, pdf_trailer(ctx, doc), "Root/AcroForm/SigFlags")); - pdf_annot *annot = pdf_create_annot(ctx, doc, page, FZ_ANNOT_WIDGET); + pdf_annot *annot = pdf_create_annot(ctx, doc, page, PDF_ANNOT_WIDGET); fz_try(ctx) { @@ -815,7 +815,7 @@ pdf_widget *pdf_create_widget(fz_context *ctx, pdf_document *doc, pdf_page *page int pdf_widget_type(fz_context *ctx, pdf_widget *widget) { pdf_annot *annot = (pdf_annot *)widget; - if (pdf_annot_type(ctx, annot) == FZ_ANNOT_WIDGET) + if (pdf_annot_type(ctx, annot) == PDF_ANNOT_WIDGET) return pdf_field_type(ctx, pdf_get_bound_document(ctx, annot->obj), annot->obj); return PDF_WIDGET_TYPE_NOT_WIDGET; } @@ -1000,18 +1000,18 @@ int pdf_field_display(fz_context *ctx, pdf_document *doc, pdf_obj *field) f = pdf_to_int(ctx, pdf_dict_get(ctx, field, PDF_NAME_F)); - if (f & F_Hidden) + if (f & PDF_ANNOT_IS_HIDDEN) { res = Display_Hidden; } - else if (f & F_Print) + else if (f & PDF_ANNOT_IS_PRINT) { - if (f & F_NoView) + if (f & PDF_ANNOT_IS_NO_VIEW) res = Display_NoView; } else { - if (f & F_NoView) + if (f & PDF_ANNOT_IS_NO_VIEW) res = Display_Hidden; else res = Display_NoPrint; @@ -1070,20 +1070,20 @@ void pdf_field_set_display(fz_context *ctx, pdf_document *doc, pdf_obj *field, i if (!kids) { - int mask = (F_Hidden|F_Print|F_NoView); + int mask = (PDF_ANNOT_IS_HIDDEN|PDF_ANNOT_IS_PRINT|PDF_ANNOT_IS_NO_VIEW); int f = pdf_to_int(ctx, pdf_dict_get(ctx, field, PDF_NAME_F)) & ~mask; pdf_obj *fo = NULL; switch (d) { case Display_Visible: - f |= F_Print; + f |= PDF_ANNOT_IS_PRINT; break; case Display_Hidden: - f |= F_Hidden; + f |= PDF_ANNOT_IS_HIDDEN; break; case Display_NoView: - f |= (F_Print|F_NoView); + f |= (PDF_ANNOT_IS_PRINT|PDF_ANNOT_IS_NO_VIEW); break; case Display_NoPrint: break; diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c index 00c4176c..0ae4844a 100644 --- a/source/pdf/pdf-interpret.c +++ b/source/pdf/pdf-interpret.c @@ -1254,14 +1254,14 @@ pdf_process_annot(fz_context *ctx, pdf_processor *proc, pdf_document *doc, pdf_p { int flags = pdf_to_int(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_F)); - if (flags & (F_Invisible | F_Hidden)) + if (flags & (PDF_ANNOT_IS_INVISIBLE | PDF_ANNOT_IS_HIDDEN)) return; if (proc->event) { - if (!strcmp(proc->event, "Print") && !(flags & F_Print)) + if (!strcmp(proc->event, "Print") && !(flags & PDF_ANNOT_IS_PRINT)) return; - if (!strcmp(proc->event, "View") && (flags & F_NoView)) + if (!strcmp(proc->event, "View") && (flags & PDF_ANNOT_IS_NO_VIEW)) return; } -- cgit v1.2.3