diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt b/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt index d8da5f76054..c33319658a1 100644 --- a/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt +++ b/Master/texmf-dist/tex/context/base/mkxl/grph-rul.lmt @@ -22,6 +22,8 @@ local tonode = nuts.tonode local getattribute = tex.getattribute +local direct_value = tokens.values.direct + local a_color = attributes.private('color') local a_transparency = attributes.private('transparency') local a_colormodel = attributes.private('colormodel') @@ -29,20 +31,19 @@ local a_colormodel = attributes.private('colormodel') local floor = math.floor local getrandom = utilities.randomizer.get -do - - local function unsupported() end - - ruleactions.mp = unsupported - ruleactions.fill = unsupported - ruleactions.draw = unsupported - ruleactions.stroke = unsupported - ruleactions.box = unsupported - -end +updaters.register("backends.injections.latebindings",function() + local codeinjections = backends.codeinjections + ruleactions.mp = codeinjections.ruleactionmp + ruleactions.fill = codeinjections.ruleactionfill + ruleactions.draw = codeinjections.ruleactiondraw + ruleactions.stroke = codeinjections.ruleactionstroke + ruleactions.box = codeinjections.ruleactionbox +end) interfaces.implement { name = "frule", + public = true, + protected = true, arguments = { { { "width", "dimension" }, { "height", "dimension" }, @@ -64,34 +65,37 @@ interfaces.implement { else setattrlist(rule,true) end - context(tonode(rule)) -- will become context.nodes.flush + context(tonode(rule)) end } interfaces.implement { - name = "outlinerule", - public = true, + name = "roundedoutline", 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) + arguments = { "dimension", "dimension", "dimension", "dimension", "dimension", "string" }, + actions = function(w,h,d,l,r,c) + local rule = userrule { + width = w, + height = h, + depth = d, + line = l, + radius = r, + corner = c, + } setattrlist(rule,true) - context(tonode(rule)) -- will become context.nodes.flush + context(tonode(rule)) end } interfaces.implement { name = "framedoutline", + -- public = true, + -- protected = true, 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 + context(tonode(rule)) end } |