summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-20 22:02:49 +0000
committerKarl Berry <karl@freefriends.org>2013-12-20 22:02:49 +0000
commit58585d5aef30c63a28a50a637af87f7b84709622 (patch)
treee9d2a815672e27a952b9d6b6e5fa0ee5b0731073 /Master/texmf-dist/source
parent686feafdfa728f8f337210a65b380f168e4a68fe (diff)
luamplib (20dec13)
git-svn-id: svn://tug.org/texlive/trunk@32458 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx14
1 files changed, 5 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
index b2d02e46601..558936a9864 100644
--- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
+++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
@@ -609,9 +609,7 @@ local function putTEXboxes (object)
if sx == 0 then sx = 0.00001 end
if sy == 0 then sy = 0.00001 end
local cs = object.color
- if cs and #cs > 0 then
- cs = luamplib.colorconverter(cs)
- end
+ if cs then cs = luamplib.colorconverter(cs) end
pdf_literalcode("q %f %f %f %f %f %f cm",sx,rx,ry,sy,tx,ty)
if cs then pdf_literalcode(cs) end
texsprint(format("\\mplibputtextbox{%i}",n))
@@ -739,9 +737,7 @@ local function flush(result,flusher)
%
% \begin{macrocode}
local cs = object.color
- if cs and #cs > 0 then
- cs = luamplib.colorconverter(cs)
- end
+ if cs then cs = luamplib.colorconverter(cs) end
pdf_literalcode("q %f %f %f %f %f %f cm",ot[3],ot[4],ot[5],ot[6],ot[1],ot[2])
if cs then pdf_literalcode(cs) end
pdf_textfigure(object.font,object.dsize,object.text,object.width,object.height,object.depth)
@@ -753,9 +749,9 @@ local function flush(result,flusher)
%
% \begin{macrocode}
local cs, cr = object.color, nil
- if cs and #cs > 0 then
+ if cs then
cs, cr = luamplib.colorconverter(cs)
- pdf_literalcode(cs)
+ if cs then pdf_literalcode(cs) end
end
local ml = object.miterlimit
if ml and ml ~= miterlimit then
@@ -862,7 +858,7 @@ local function colorconverter(cr)
elseif n == 3 then
local r, g, b = cr[1], cr[2], cr[3]
return format("%.3f %.3f %.3f rg %.3f %.3f %.3f RG",r,g,b,r,g,b), "0 g 0 G"
- else
+ elseif n == 1 then
local s = cr[1]
return format("%.3f g %.3f G",s,s), "0 g 0 G"
end