summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-04-20 18:11:26 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-04-20 19:47:03 +0800
commita6594e033f9f725e87f65dc221cd523b5f8ed466 (patch)
treea316bdd60099c310dbd5d982b14c2a86f644828c /source/pdf
parent82720bdeb46e9bb1860f61e77f5d34e0d159cead (diff)
downloadmupdf-a6594e033f9f725e87f65dc221cd523b5f8ed466.tar.xz
The default color of ink annotation is transparent.
Previously the default color of ink annotations was red, but according to the pdf specification the default color should be colorless transparent if no color is given.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-appearance.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c
index 32047b8b..829b5917 100644
--- a/source/pdf/pdf-appearance.c
+++ b/source/pdf/pdf-appearance.c
@@ -1807,15 +1807,6 @@ void pdf_update_ink_appearance(fz_context *ctx, pdf_document *doc, pdf_annot *an
int n, m, i, j;
int empty = 1;
- cs = pdf_to_color(ctx, doc, pdf_dict_get(ctx, annot->obj, PDF_NAME_C), color);
- if (!cs)
- {
- cs = fz_device_rgb(ctx);
- color[0] = 1.0f;
- color[1] = 0.0f;
- color[2] = 0.0f;
- }
-
width = pdf_annot_border(ctx, annot);
if (width == 0.0f)
width = 1.0f;
@@ -1864,6 +1855,7 @@ void pdf_update_ink_appearance(fz_context *ctx, pdf_document *doc, pdf_annot *an
fz_lineto(ctx, path, pt_last.x, pt_last.y);
}
+ cs = pdf_to_color(ctx, doc, pdf_dict_get(ctx, annot->obj, PDF_NAME_C), color);
fz_stroke_path(ctx, dev, path, stroke, &page_ctm, cs, color, 1.0f);
fz_expand_rect(&rect, width);