summaryrefslogtreecommitdiff
path: root/tex/context/base/mlib-pdf.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-11-18 19:20:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-11-18 19:20:00 +0100
commitfd5d35407e30e73ec0c1549d4e57bf3519f5b47c (patch)
treefac6a314c89f336fdcdeb807e27678ccb7b6eff4 /tex/context/base/mlib-pdf.lua
parent708d6c92494ec46bf12f692a9d498733cd6c85df (diff)
downloadcontext-fd5d35407e30e73ec0c1549d4e57bf3519f5b47c.tar.gz
beta 2010.11.18 19:20
Diffstat (limited to 'tex/context/base/mlib-pdf.lua')
-rw-r--r--tex/context/base/mlib-pdf.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index 30db3f52c..5ca554292 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -134,16 +134,13 @@ local bend_tolerance = 131/65536
local rx, sx, sy, ry, tx, ty, divider = 1, 0, 0, 1, 0, 0, 1
+local pen_info = mplib.pen_info
+
local function pen_characteristics(object)
- if mplib.pen_info then
- local t = mplib.pen_info(object)
- rx, ry, sx, sy, tx, ty = t.rx, t.ry, t.sx, t.sy, t.tx, t.ty
- divider = sx*sy - rx*ry
- return not (sx==1 and rx==0 and ry==0 and sy==1 and tx==0 and ty==0), t.width
- else
- rx, sx, sy, ry, tx, ty, divider = 1, 0, 0, 1, 0, 0, 1
- return false, 1
- end
+ local t = pen_info(object)
+ rx, ry, sx, sy, tx, ty = t.rx, t.ry, t.sx, t.sy, t.tx, t.ty
+ divider = sx*sy - rx*ry
+ return not (sx==1 and rx==0 and ry==0 and sy==1 and tx==0 and ty==0), t.width
end
local function mpconcat(px, py) -- no tx, ty here / we can move this one inline if needed