diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-04-19 20:58:40 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-04-19 20:58:40 +0200 |
commit | b9a7e870cf47674c90331b41f9267768992b49cb (patch) | |
tree | 7b7bb2ee92af1767712ffcfbec47995c8894e214 /tex/context/modules/mkiv/m-escrito.lua | |
parent | b155eafa1e2d73692eed08ecabeb5ad589ac11dc (diff) | |
download | context-b9a7e870cf47674c90331b41f9267768992b49cb.tar.gz |
2022-04-19 19:52:00
Diffstat (limited to 'tex/context/modules/mkiv/m-escrito.lua')
-rw-r--r-- | tex/context/modules/mkiv/m-escrito.lua | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/tex/context/modules/mkiv/m-escrito.lua b/tex/context/modules/mkiv/m-escrito.lua index 8a45f1a2c..b284aece4 100644 --- a/tex/context/modules/mkiv/m-escrito.lua +++ b/tex/context/modules/mkiv/m-escrito.lua @@ -5499,21 +5499,23 @@ local function boundingbox (page) for i=1,#page do local object = page[i] local p = object.path - linewidth = object.type == "stroke" and object.linewidth - for i=1,#p do - local segment = p[i] - local type = segment[1] - if type == "lineto" then - if startx then - update_bbox(startx,starty) + if p then + linewidth = object.type == "stroke" and object.linewidth + for i=1,#p do + local segment = p[i] + local type = segment[1] + if type == "lineto" then + if startx then + update_bbox(startx,starty) + end + update_bbox(segment[2],segment[3]) + elseif type == "curveto" then + local c6 = segment[6] + local c7 = segment[7] + splitter(0, 0, 1, startx, starty, segment[2], segment[3], segment[4], segment[5], c6, c7, startx, starty, c6, c7) + elseif type == "moveto" then + startx, starty = segment[2], segment[3] end - update_bbox(segment[2],segment[3]) - elseif type == "curveto" then - local c6 = segment[6] - local c7 = segment[7] - splitter(0, 0, 1, startx, starty, segment[2], segment[3], segment[4], segment[5], c6, c7, startx, starty, c6, c7) - elseif type == "moveto" then - startx, starty = segment[2], segment[3] end end end |