diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-09-27 20:24:34 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-09-27 20:24:34 +0200 |
commit | 0a5f59a9aa25b3de7e9659b39ad201aaf7eb5a67 (patch) | |
tree | a652bb083d6bc6a9b6309908dd5d09a539ac3859 /tex/context/base/mkiv/back-ini.lua | |
parent | 58c7c9288160407c874930aac789ef6ef3faa6b5 (diff) | |
download | context-0a5f59a9aa25b3de7e9659b39ad201aaf7eb5a67.tar.gz |
2019-09-27 18:10:00
Diffstat (limited to 'tex/context/base/mkiv/back-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/back-ini.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/back-ini.lua b/tex/context/base/mkiv/back-ini.lua index bc4a67bc0..b0af61edc 100644 --- a/tex/context/base/mkiv/back-ini.lua +++ b/tex/context/base/mkiv/back-ini.lua @@ -182,6 +182,29 @@ implement { end } + +local page_x_origin = 0 +local page_y_origin = 0 + +function codeinjections.setpageorigin(x,y) + page_x_origin = x + page_y_origin = y +end + +function codeinjections.getpageorigin() + local x = page_x_origin + local y = page_y_origin + page_x_origin = 0 + page_y_origin = 0 + return x, y, (x ~= 0 or y ~= 0) +end + +implement { + name = "setpageorigin", + arguments = { "dimension", "dimension" }, + actions = codeinjections.setpageorigin, +} + -- could also be codeinjections function backends.noflatelua() |