diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-06-25 14:10:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-06-25 14:10:00 +0200 |
commit | c087b683dc65ab8ac92819a1de681023331fe1ab (patch) | |
tree | 5a4f65c32d4e90454d3c99672e989ce0fa2e2aa5 /tex/context/base/node-tra.lua | |
parent | 614f10aaaf6ed9b12ab2415915341f505fcb0667 (diff) | |
download | context-c087b683dc65ab8ac92819a1de681023331fe1ab.tar.gz |
beta 2012.06.25 14:10
Diffstat (limited to 'tex/context/base/node-tra.lua')
-rw-r--r-- | tex/context/base/node-tra.lua | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tex/context/base/node-tra.lua b/tex/context/base/node-tra.lua index 70e4639b8..64b8e84fb 100644 --- a/tex/context/base/node-tra.lua +++ b/tex/context/base/node-tra.lua @@ -726,6 +726,62 @@ function colors.set(n,c,s) end end +function colors.setlist(n,c,s) + while n do + local mc = mapping[c] + if not mc then + unset_attribute(n,attribute) + else + if not get_attribute(n,colormodel) then + set_attribute(n,colormodel,s or 1) + end + set_attribute(n,attribute,mc) + end + n = n.next + end +end + function colors.reset(n) unset_attribute(n,attribute) end + +-- maybe + +local transparencies = { } +tracers.transparencies = transparencies + +local attribute = attributes.private('transparency') +local mapping = attributes.list[attribute] or { } + +function transparencies.set(n,t) + local mt = mapping[t] + if not mt then + unset_attribute(n,attribute) + else + set_attribute(n,attribute,mt) + end +end + +function transparencies.setlist(n,c,s) + while n do + local mt = mapping[c] + if not mt then + unset_attribute(n,attribute) + else + set_attribute(n,attribute,mt) + end + n = n.next + end +end + +function transparencies.reset(n) + unset_attribute(n,attribute) +end + +-- for the moment here + +nodes.visualizers = { } + +function nodes.visualizers.handler(head) + return head, false +end |