diff options
Diffstat (limited to 'tex/context/base/mkxl/mlib-lmt.lmt')
-rw-r--r-- | tex/context/base/mkxl/mlib-lmt.lmt | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tex/context/base/mkxl/mlib-lmt.lmt b/tex/context/base/mkxl/mlib-lmt.lmt index cf60774f3..e44674d13 100644 --- a/tex/context/base/mkxl/mlib-lmt.lmt +++ b/tex/context/base/mkxl/mlib-lmt.lmt @@ -163,11 +163,12 @@ registerscript("scrutenized", function() local x1 = round(p[1][1]) local y1 = round(p[1][2]) local n = 1 + local m = #p local t = { p[1], cycle = p.cycle } - for i=2,#p do + for i=2,m-1 do local pi = p[i] - local x2 = round(pi[1]) - local y2 = round(pi[2]) + local x2 = r(pi[1]) + local y2 = r(pi[2]) if x1 ~= x2 or y1 ~= y2 then n = n + 1 t[n] = p[i] @@ -175,5 +176,15 @@ registerscript("scrutenized", function() y1 = y2 end end - injectpath(t) + local x1 = r(p[1][1]) + local y1 = r(p[1][2]) + local x2 = r(p[m][1]) + local y2 = r(p[m][2]) + if x1 ~= x2 or y1 ~= y2 then + n = n + 1 + t[n] = p[m] + end + mp.path(t) + -- injectpath(t) end) + |