summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/grph-rul.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-12-07 20:44:55 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-12-07 20:44:55 +0100
commit5bb786877a5617fb8fbe3fd0e7b54fbcea3ce002 (patch)
treeeb0b52ddfc64af42d0fe6ae78a85e4673c4a1ab0 /tex/context/base/mkiv/grph-rul.lua
parent6953b7c4b4c40fab660992622a6fd140fa310b34 (diff)
downloadcontext-5bb786877a5617fb8fbe3fd0e7b54fbcea3ce002.tar.gz
2018-12-07 19:45:00
Diffstat (limited to 'tex/context/base/mkiv/grph-rul.lua')
-rw-r--r--tex/context/base/mkiv/grph-rul.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/grph-rul.lua b/tex/context/base/mkiv/grph-rul.lua
index b30ed21cd..eb9c000b3 100644
--- a/tex/context/base/mkiv/grph-rul.lua
+++ b/tex/context/base/mkiv/grph-rul.lua
@@ -16,6 +16,7 @@ local bpfactor = number.dimenfactors.bp
local nuts = nodes.nuts
local userrule = nuts.rules.userrule
+local outlinerule = nuts.pool.outlinerule
local ruleactions = nuts.rules.ruleactions
local setattrlist = nuts.setattrlist
@@ -250,6 +251,33 @@ interfaces.implement {
}
interfaces.implement {
+ name = "outlinerule",
+ public = true,
+ protected = true,
+ arguments = { {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ { "line", "dimension" },
+ } } ,
+ actions = function(t)
+ local rule = outlinerule(t.width,t.height,t.depth,t.line)
+ setattrlist(rule,true)
+ context(tonode(rule)) -- will become context.nodes.flush
+ end
+}
+
+interfaces.implement {
+ name = "framedoutline",
+ arguments = { "dimension", "dimension", "dimension", "dimension" },
+ actions = function(w,h,d,l)
+ local rule = outlinerule(w,h,d,l)
+ setattrlist(rule,true)
+ context(tonode(rule)) -- will become context.nodes.flush
+ end
+}
+
+interfaces.implement {
name = "fakeword",
arguments = { {
{ "factor", "dimension" },