diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-11-18 16:12:36 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-11-18 16:12:36 +0100 |
commit | 744095aa4676553437db0d71c281a74557a3222f (patch) | |
tree | bfdf5d203b5fbfa44ee7db705d3b3475361ad28f /tex/context/base/mkiv/back-res.lua | |
parent | e2ee706a3114129601a30908d6b8cbb57068d32c (diff) | |
download | context-744095aa4676553437db0d71c281a74557a3222f.tar.gz |
2018-11-18 14:16:00
Diffstat (limited to 'tex/context/base/mkiv/back-res.lua')
-rw-r--r-- | tex/context/base/mkiv/back-res.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/back-res.lua b/tex/context/base/mkiv/back-res.lua new file mode 100644 index 000000000..be92c74a6 --- /dev/null +++ b/tex/context/base/mkiv/back-res.lua @@ -0,0 +1,44 @@ +if not modules then modules = { } end modules ['back-res'] = { + version = 1.001, + comment = "companion to lpdf-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- A box resource has an index. This happens to be an object number +-- due to the pdf backend but in fact it's an abstraction. This is why +-- we have explicit fetchers. The internal number (as in \Fm123) is yet +-- another number. + +local tex_saveboxresource = tex.saveboxresource +local tex_useboxresource = tex.useboxresource +local tex_getboxresourcebox = tex.getboxresourcebox +local tex_getboxresourcedimensions = tex.getboxresourcedimensions + +updaters.register("backend.update",function() + tex_saveboxresource = tex.saveboxresource + tex_useboxresource = tex.useboxresource + tex_getboxresourcebox = tex.getboxresourcebox + tex_getboxresourcedimensions = tex.getboxresourcedimensions +end) + +tex.boxresources = { + save = function(...) return tex_saveboxresource(...) end, + use = function(...) return tex_useboxresource(...) end, + getbox = function(...) return tex_getboxresourcebox(...) end, + getdimensions = function(...) return tex_getboxresourcedimensions(...) end, +} + +-- local tex_saveimageresource = tex.saveimageresource +-- local tex_useimageresource = tex.useimageresource +-- +-- updaters.register("backend.update",function() +-- tex_saveimageresource = tex.saveimageresource +-- tex_useimageresource = tex.useimageresource +-- end) +-- +-- tex.imageresources = { +-- save = function(...) return tex_saveimageresource(...) end, +-- use = function(...) return tex_useimageresource(...) end, +-- } |