summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-rul.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-04-16 00:08:11 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-04-16 00:08:11 +0200
commitd5d5a39dc16881d098a99b74cba9020d96be4e11 (patch)
tree3d32c01797d034acc0107f6abd9c2d66af0b5ba6 /tex/context/base/mkiv/node-rul.lua
parent25fcad7435f56cdce2658336909f4da6a65589c0 (diff)
downloadcontext-d5d5a39dc16881d098a99b74cba9020d96be4e11.tar.gz
2018-04-15 23:21:00
Diffstat (limited to 'tex/context/base/mkiv/node-rul.lua')
-rw-r--r--tex/context/base/mkiv/node-rul.lua48
1 files changed, 43 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index 2b0368c2b..b8388f373 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -473,15 +473,53 @@ local function linefiller(current,data,width,location)
direction = getdir(current),
})
else
- local linefiller = new_rule(width,height,depth)
+ local rule = new_rule(width,height,depth)
if ca then
- setattr(linefiller,a_colorspace,ma)
- setattr(linefiller,a_color,ca)
+ setattr(rule,a_colorspace,ma)
+ setattr(rule,a_color,ca)
end
if ta then
- setattr(linefiller,a_transparency,ta)
+ setattr(rule,a_transparency,ta)
+ end
+ return rule
+ end
+end
+
+function nodes.linefillers.filler(current,data,width,height,depth)
+ if width and width > 0 then
+ local height = height or data.height or 0
+ local depth = depth or data.depth or 0
+ if (height + depth) ~= 0 then
+ local mp = data.mp
+ local ma = data.ma
+ local ca = data.ca
+ local ta = data.ta
+ if mp and mp ~= "" then
+ return tonut(userrule {
+ width = width,
+ height = height,
+ depth = depth,
+ type = "mp",
+ line = data.rulethickness,
+ data = mp,
+ ma = ma,
+ ca = ca,
+ ta = ta,
+ option = location,
+ direction = getdir(current),
+ })
+ else
+ local rule = new_rule(width,height,depth)
+ if ca then
+ setattr(rule,a_colorspace,ma)
+ setattr(rule,a_color,ca)
+ end
+ if ta then
+ setattr(rule,a_transparency,ta)
+ end
+ return rule
+ end
end
- return linefiller
end
end