summaryrefslogtreecommitdiff
path: root/tex/context/base/mlib-pdf.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-11-18 20:40:15 +0200
committerMarius <mariausol@gmail.com>2010-11-18 20:40:15 +0200
commit5bb2094edebc6fd4fdc9efb49627fa521d1354ff (patch)
tree540c165c7a19b7372adc260dba78a51e2f76e590 /tex/context/base/mlib-pdf.lua
parentc377d7f00db995466f04a81e44cf33f37631220a (diff)
downloadcontext-5bb2094edebc6fd4fdc9efb49627fa521d1354ff.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