From f533a43512aa3457e8fea4e1d814c434d0d642e9 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Thu, 31 Oct 2019 16:03:27 -0700 Subject: Simplify stroke fill color setup to work with patterns --- base/gspaint.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/base/gspaint.c b/base/gspaint.c index 64e9e9149..5ccc99d76 100644 --- a/base/gspaint.c +++ b/base/gspaint.c @@ -547,22 +547,10 @@ static int do_fill_stroke(gs_gstate *pgs, int rule, int *restart) bool devn; float orig_width, scale, orig_flatness; - /* We alsways restart with fill_color swapped in. If this is */ - /* the first pass (or restarted after error_Remap_Color, */ - /* swap to the stroke color */ - switch (*restart) - { - case 0: - /* Initial entry, or restart after loading stroke color. */ - if (pgs->is_fill_color) - gs_swapcolors_quick(pgs); - break; - case 1: /* restart after loading fill color. NB: color is still fill. */ - break; - default: - assert("This should never happen" == NULL); - break; - } + /* If fill (due to startup or failure during fill setup due + to pattern for fill) then switch to stroke */ + if (pgs->is_fill_color) + gs_swapcolors_quick(pgs); /* We need to distinguish text from vectors to set the object tag. -- cgit v1.2.1