diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-05-14 03:10:20 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-05-14 03:10:20 +0200 |
commit | b29553f008e315297b56570fa5ef303b1fda39d1 (patch) | |
tree | 0d44d3fa5d4be3e98411703f1566b70d71b5c0c4 /tex/context/base/mkiv/grph-rul.lua | |
parent | c364453fcfff40c1a300b4b6d45bfe25257f8e8d (diff) | |
download | context-b29553f008e315297b56570fa5ef303b1fda39d1.tar.gz |
2016-05-14 02:25:00
Diffstat (limited to 'tex/context/base/mkiv/grph-rul.lua')
-rw-r--r-- | tex/context/base/mkiv/grph-rul.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/grph-rul.lua b/tex/context/base/mkiv/grph-rul.lua index 5d3cb8ad5..e5aa05396 100644 --- a/tex/context/base/mkiv/grph-rul.lua +++ b/tex/context/base/mkiv/grph-rul.lua @@ -23,6 +23,10 @@ local a_colorspace = attributes.private('colormodel') local mpcolor = attributes.colors.mpcolor +local trace_mp = false trackers.register("rules.mp", function(v) trace_mp = v end) + +local report_mp = logs.reporter("rules","mp") + local floor = math.floor local random = math.random @@ -65,6 +69,7 @@ FakeWord(%width%,%height%,%depth%,%line%,%color%); FakeRule(%width%,%height%,%depth%,%line%,%color%); ]], ["fake:rest"] = replacer [[ +RuleOption := "%option%" ; RuleWidth := %width% ; RuleHeight := %height% ; RuleDepth := %depth% ; @@ -87,8 +92,12 @@ def RuleColor = %color% enddef ; offset = p.offset or 0, line = (p.line or 65536) * bpfactor, color = mpcolor(p.ma,p.ca,p.ta), + option = p.option or "", } local m = cache[code] + if trace_mp then + report_mp(m) + end if m and m ~= "" then pdfprint("direct",m) end |