diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2019-10-31 16:03:27 -0700 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2020-01-10 09:37:22 -0800 |
commit | f533a43512aa3457e8fea4e1d814c434d0d642e9 (patch) | |
tree | 37fb5863fc3b3ac172f42e103fa419e57db8f5ba | |
parent | 3b781b30d050d088aab97e45f8729719f2c2f57f (diff) | |
download | ghostpdl-f533a43512aa3457e8fea4e1d814c434d0d642e9.tar.gz |
Simplify stroke fill color setup to work with patterns
-rw-r--r-- | base/gspaint.c | 20 |
1 files 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. |