From a6594e033f9f725e87f65dc221cd523b5f8ed466 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 20 Apr 2017 18:11:26 +0800 Subject: 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. --- source/pdf/pdf-appearance.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source') 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); -- cgit v1.2.3