diff options
author | Hans Hagen <pragma@wxs.nl> | 2016-11-28 14:23:17 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-11-28 14:23:17 +0100 |
commit | b8a38bef2eaacea0dd17897dc99f1ef09b46a7e3 (patch) | |
tree | e53017157648c5d4abab9b14ddfd23db0e43de38 /tex/context/base/mkiv/mlib-pdf.lua | |
parent | f4d0ad2ba2c4ca5bfae469650e535fd46749b3f4 (diff) | |
download | context-b8a38bef2eaacea0dd17897dc99f1ef09b46a7e3.tar.gz |
2016-11-28 13:36:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-pdf.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-pdf.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/mlib-pdf.lua b/tex/context/base/mkiv/mlib-pdf.lua index 5989b5b55..4d1756c43 100644 --- a/tex/context/base/mkiv/mlib-pdf.lua +++ b/tex/context/base/mkiv/mlib-pdf.lua @@ -31,6 +31,7 @@ local pen_info = mplib.pen_info local object_fields = mplib.fields local save_table = false +local force_stroke = false metapost = metapost or { } local metapost = metapost @@ -68,6 +69,10 @@ directives.register("metapost.savetable",function(v) end end) +trackers.register("metapost.forcestroke",function(v) + force_stroke = v +end) + local pdfliteral = function(pdfcode) local literal = copy_node(mpsliteral) literal.data = pdfcode @@ -560,7 +565,9 @@ function metapost.flush(result,flusher,askedfig) else flushnormalpath(path,result,open) end - if objecttype == "fill" then + if force_stroke then + result[#result+1] = open and "S" or "h S" + elseif objecttype == "fill" then result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo elseif objecttype == "outline" then if both then @@ -597,7 +604,9 @@ function metapost.flush(result,flusher,askedfig) else flushnormalpath(path,result,open) end - if objecttype == "fill" then + if force_stroke then + result[#result+1] = open and "S" or "h S" + elseif objecttype == "fill" then result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo elseif objecttype == "outline" then result[#result+1] = open and "S" or "h S" |