diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-09-22 14:01:31 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-09-23 12:40:33 +0200 |
commit | ca8f110730ad5aadbc80a450a46de62c4004cbd1 (patch) | |
tree | e2b3dbe2bef2ae4adf78643150575d9722b573a2 /platform/ios/Classes | |
parent | 3a29d83d78af4c580d02bae6ae7a81127005a8b6 (diff) | |
download | mupdf-ca8f110730ad5aadbc80a450a46de62c4004cbd1.tar.xz |
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.
Diffstat (limited to 'platform/ios/Classes')
-rw-r--r-- | platform/ios/Classes/MuDocumentController.m | 6 | ||||
-rw-r--r-- | platform/ios/Classes/MuPageViewNormal.m | 10 |
2 files changed, 8 insertions, 8 deletions
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]; |