Line, Rect, RoundedRect, Curve, Ellipse, Circle, Polygon, ...
Almost all of these methods have a wxPdfLineStyle argument. Currently the line style is set before drawing the line, rectangle etc., but the previous line style is not restored afterwards.
I got some comments from users who don't like this behaviour due to the side effect of changing the line style for subsequent methods. So I consider to change the API in the next release.
There are several alternatives to handle line styles:
- Drop wxPdfLineStyle argument from all graphics primitives and always use SetLineStyle to change the line style.
Advantage: consistent behaviour, line style changes only when needed.
- Keep wxPdfLineStyle argument, but automatically restore the previous line style in all graphics primitives.
Advantage: consistent behaviour.
Disadvantage: produces superfluous line style changes thereby enlarging the size of the resulting PDF file.
- No changes to the current API.
Advantage: allows to change line style only when needed.
Disadvantage: inconsistent behaviour.
Regards,
Ulrich