John Hewson created PDFBOX-1939:
-----------------------------------
Summary: Store all stroke information in the graphics state
Key: PDFBOX-1939
URL: https://issues.apache.org/jira/browse/PDFBOX-1939
Project: PDFBox
Issue Type: Improvement
Components: Rendering
Affects Versions: 2.0.0
Reporter: John Hewson
Recently PDFBOX-1917 has fixed an issue with how the current AWT stroke is
calculated. This prompted me to look at the file from PDFBOX-1094 which
contains separate stroking errors. This led to the identification of a problem:
the BasicStroke is being used to keep track of the stroke state, rather than
using the information from the graphics state. This fails when the graphics
state is modified e.g. Save/Restore and the BasicStroke in PageDrawer is not
correspondingly updated.
Having looked at the code, it seems that this is a long-standing issue. The
solution is to remove the BasicStroke variable from PageDrawer and to calculate
it each time it is needed, using only the information stored in the graphics
state. The following classes which directly modify the BasicStroke can be
removed:
pagedrawer.SetLineCapStyle
pagedrawer.SetLineDashPattern
pagedrawer.SetLineJoinStyle
pagedrawer.SetLineMiterLimit
pagedrawer.SetLineWidth
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)