diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-03-15 16:04:31 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-03-15 16:04:31 +0100 |
commit | a4e07f30e880ab27c2918f81f136e257475b7729 (patch) | |
tree | 02db002d3001a49777a049f9a98fdc872a5e1ad1 /tex/context/base/mkiv/mlib-pdf.lua | |
parent | cbc37c39432e0ebe38e0922fc6d14c2955ab3ba2 (diff) | |
download | context-a4e07f30e880ab27c2918f81f136e257475b7729.tar.gz |
2018-03-15 15:36:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-pdf.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-pdf.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/mlib-pdf.lua b/tex/context/base/mkiv/mlib-pdf.lua index 0c2945316..75f810fb3 100644 --- a/tex/context/base/mkiv/mlib-pdf.lua +++ b/tex/context/base/mkiv/mlib-pdf.lua @@ -216,13 +216,14 @@ end local function flushnormalpath(path, t, open) local pth, ith, nt + local length = #path if t then nt = #t else t = { } nt = 0 end - for i=1,#path do + for i=1,length do nt = nt + 1 pth = path[i] if not ith then @@ -242,7 +243,7 @@ local function flushnormalpath(path, t, open) else t[nt] = f_l(one.x_coord,one.y_coord) end - elseif #path == 1 then + elseif length == 1 then -- special case .. draw point local one = path[1] nt = nt + 1 @@ -253,6 +254,7 @@ end local function flushconcatpath(path, t, open) local pth, ith, nt + local length = #path if t then nt = #t else @@ -261,7 +263,7 @@ local function flushconcatpath(path, t, open) end nt = nt + 1 t[nt] = f_cm(sx,rx,ry,sy,tx,ty) - for i=1,#path do + for i=1,length do nt = nt + 1 pth = path[i] if not ith then @@ -285,7 +287,7 @@ local function flushconcatpath(path, t, open) else t[nt] = f_l(mpconcat(one.x_coord,one.y_coord)) end - elseif #path == 1 then + elseif length == 1 then -- special case .. draw point nt = nt + 1 local one = path[1] @@ -576,7 +578,7 @@ function metapost.flush(result,flusher,askedfig) result[#result+1] = open and "S" or "h S" end elseif objecttype == "both" then - result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath + result[#result+1] = evenodd and "h B*" or "h B" -- B* = eo -- b includes closepath end end if transformed then @@ -611,7 +613,7 @@ function metapost.flush(result,flusher,askedfig) elseif objecttype == "outline" then result[#result+1] = open and "S" or "h S" elseif objecttype == "both" then - result[#result+1] = evenodd and "h B*" or "h B"-- B* = eo -- b includes closepath + result[#result+1] = evenodd and "h B*" or "h B" -- B* = eo -- b includes closepath end if transformed then result[#result+1] = "Q" |