summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/m-escrito.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/modules/mkiv/m-escrito.lua')
-rw-r--r--tex/context/modules/mkiv/m-escrito.lua30
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