diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-08-11 01:23:08 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-08-11 01:23:08 +0200 |
commit | 1ef7a093aaf03b6327b3da94d47f53760c868c60 (patch) | |
tree | 228e6d4a5005598aaea191b3317c2fa21e22de75 /tex/context/base/mkiv/anch-pgr.lua | |
parent | b61d5dd3555e906b21601ff75b3268c0f359283e (diff) | |
download | context-1ef7a093aaf03b6327b3da94d47f53760c868c60.tar.gz |
2018-08-10 16:58:00
Diffstat (limited to 'tex/context/base/mkiv/anch-pgr.lua')
-rw-r--r-- | tex/context/base/mkiv/anch-pgr.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/anch-pgr.lua b/tex/context/base/mkiv/anch-pgr.lua index 7b1746582..e0b9132ff 100644 --- a/tex/context/base/mkiv/anch-pgr.lua +++ b/tex/context/base/mkiv/anch-pgr.lua @@ -56,7 +56,6 @@ graphics.backgrounds = backgrounds -- -- -- local texsetattribute = tex.setattribute -local pdfgetpos = pdf.getpos -- why not a generic name ! local a_textbackground = attributes.private("textbackground") @@ -91,13 +90,21 @@ local realpage = 1 local recycle = 1000 -- only tables can overflow this local enabled = false +-- can change: + +local getpos = function() getpos = backends.codeinjections.getpos return getpos() end + +updaters.register("backend.update",function() + getpos = backends.codeinjections.getpos +end) + -- Freeing the data is somewhat tricky as we can have backgrounds spanning -- many pages but for an arbitrary background shape that is not so common. local function check(a,index,depth,d,where,ht,dp) -- this is not yet r2l ready local w = d.shapes[realpage] - local x, y = pdfgetpos() + local x, y = getpos() if trace_ranges then report_shapes("attribute %i, index %i, depth %i, location %s, position (%p,%p)", a,index,depth,where,x,y) |