lpdf-vfc.lmt /size: 1203 b    last modification: 2021-10-28 13:51
1if not modules then modules = { } end modules ['lpdf-vfc'] = {
2    version   = 1.001,
3    comment   = "companion to lpdf-ini.mkiv",
4    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5    copyright = "PRAGMA ADE / ConTeXt Development Team",
6    license   = "see context related readme files"
7}
8
9local setmetatableindex = table.setmetatableindex
10
11local defaultline = 16384
12
13local vfspecials = backends.pdf.tables.vfspecials or utilities.storage.allocate { }
14backends.pdf.tables.vfspecials = vfspecials
15
16vfspecials.backgrounds = setmetatableindex(function(t,h)
17    local v = setmetatableindex(function(t,d)
18        local v = setmetatableindex(function(t,w)
19            local v = { "frame", w, h, d, defaultline, true, true }
20            t[w] = v
21            return v
22        end)
23        t[d] = v
24        return v
25    end)
26    t[h] = v
27    return v
28end)
29
30vfspecials.outlines = setmetatableindex(function(t,h)
31    local v = setmetatableindex(function(t,d)
32        local v = setmetatableindex(function(t,w)
33            local v = { "frame", w, h, d, defaultline, false, true }
34            t[w] = v
35            return v
36        end)
37        t[d] = v
38        return v
39    end)
40    t[h] = v
41    return v
42end)
43