diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-10-18 12:15:03 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-10-18 12:15:03 +0200 |
commit | ed9e19d67a497d38249698f6a38db7404391946e (patch) | |
tree | 98c6448a40fc6cb383d3d03e780887e465664d5d /tex/context/base/mlib-pdf.lua | |
parent | 155c2d957f50a5e9f25d00d246d25ec63d31b562 (diff) | |
download | context-ed9e19d67a497d38249698f6a38db7404391946e.tar.gz |
2014-10-18 11:17:00
Diffstat (limited to 'tex/context/base/mlib-pdf.lua')
-rw-r--r-- | tex/context/base/mlib-pdf.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua index 80c554de1..1699e8fc5 100644 --- a/tex/context/base/mlib-pdf.lua +++ b/tex/context/base/mlib-pdf.lua @@ -439,9 +439,10 @@ function metapost.flush(result,flusher,askedfig) processspecial(object.prescript) end elseif objecttype == "start_clip" then + local evenodd = not object.istext and object.postscript == "evenodd" result[#result+1] = "q" flushnormalpath(object.path,result,false) - result[#result+1] = "W n" + result[#result+1] = evenodd and "W* n" or "W n" elseif objecttype == "stop_clip" then result[#result+1] = "Q" miterlimit, linecap, linejoin, dashed = -1, -1, -1, false @@ -514,6 +515,7 @@ function metapost.flush(result,flusher,askedfig) if transformed then result[#result+1] = "q" end + local evenodd = not object.istext and object.postscript == "evenodd" if path then if transformed then flushconcatpath(path,result,open) @@ -521,11 +523,11 @@ function metapost.flush(result,flusher,askedfig) flushnormalpath(path,result,open) end if objecttype == "fill" then - result[#result+1] = "h f" + 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" elseif objecttype == "both" then - result[#result+1] = "h B" + result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath end end if transformed then @@ -542,11 +544,11 @@ function metapost.flush(result,flusher,askedfig) flushnormalpath(path,result,open) end if objecttype == "fill" then - result[#result+1] = "h f" + 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" elseif objecttype == "both" then - result[#result+1] = "h B" + result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath end if transformed then result[#result+1] = "Q" |