diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2020-01-11 12:14:48 -0800 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2020-01-11 12:14:48 -0800 |
commit | 05c41c0dedaa512419f15798cbc3da92b6a90bbc (patch) | |
tree | b021f4d5219d5f6762770e430339ffad06f9a86d /base/gxstroke.c | |
parent | 5faf010d8e043d77ff10f3deee466e9fb2dc7b7e (diff) | |
download | ghostpdl-05c41c0dedaa512419f15798cbc3da92b6a90bbc.tar.gz |
Squashed commit fill-stroke3 branch
This branch had several contributors including Robin Watts,
Ken Sharp and Ray Johnston.
The intent was to add a "fill and stroke" path device method
to ensure we get proper rendering when doing fill/stroke
methods with overprint and transparency. In addition,
adding the method made it possible for pdfwrite to match
the original pdf source file if it also had fill/stroke methods.
The interaction with overprint and transparency led to significant
changes in parts of the code related to those sections. In particular,
overprint was reworked to ensure that the overprint compositor and
the transparency compositor were aware if it was to be using
the overprint drawn_comps for stroke or for fill. The code was
rewritten so that the overprint compositor actions only occurred when
an actual operation occurred (e.g. fill, stroke, image, text) as opposed
to every time that the overprint graphic state values changed.
When there is a fill-stroke operation with transparency, depending upon the
graphic state values, a non-isolated knockout group may be pushed. From this,
an issue with knockout groups within knockout groups was revealed, which was
related to the backdrop selection. The backdrop selection code was simplified.
Diffstat (limited to 'base/gxstroke.c')
-rw-r--r-- | base/gxstroke.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/base/gxstroke.c b/base/gxstroke.c index e3cc508a8..52c15437f 100644 --- a/base/gxstroke.c +++ b/base/gxstroke.c @@ -105,13 +105,18 @@ int gx_stroke_path_expansion(const gs_gstate * pgs, const gx_path * ppath, gs_fixed_point * ppt) { - const subpath *psub = ppath->first_subpath; + const subpath *psub; const segment *pseg; double cx = fabs(pgs->ctm.xx) + fabs(pgs->ctm.yx); double cy = fabs(pgs->ctm.xy) + fabs(pgs->ctm.yy); double expand = pgs->line_params.half_width; int result = 1; + if (ppath == NULL) { + ppt->x = ppt->y = 0; + return 0; /* no expansion */ + } + psub = ppath->first_subpath; /* Adjust the expansion (E) for square caps, if needed */ if (pgs->line_params.start_cap == gs_cap_square || pgs->line_params.end_cap == gs_cap_square) |