summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-pdf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/mlib-pdf.lua')
-rw-r--r--tex/context/base/mkiv/mlib-pdf.lua14
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"