cleanup: remove debug info on bbox

pull/2/merge
chrox 11 years ago
parent f542ffbf57
commit 78f8ca9029

@ -124,7 +124,7 @@ function Document:getPageDimensions(pageno, zoom, rotation)
native_dimen.w, native_dimen.h = native_dimen.h, native_dimen.w native_dimen.w, native_dimen.h = native_dimen.h, native_dimen.w
end end
native_dimen:scaleBy(zoom) native_dimen:scaleBy(zoom)
DEBUG("dimen for pageno", pageno, "zoom", zoom, "rotation", rotation, "is", native_dimen) --DEBUG("dimen for pageno", pageno, "zoom", zoom, "rotation", rotation, "is", native_dimen)
return native_dimen return native_dimen
end end
@ -132,26 +132,26 @@ function Document:getPageBBox(pageno)
local bbox = self.bbox[pageno] -- exact local bbox = self.bbox[pageno] -- exact
local oddEven = math.oddEven(pageno) local oddEven = math.oddEven(pageno)
if bbox ~= nil then if bbox ~= nil then
DEBUG("bbox from", pageno) --DEBUG("bbox from", pageno)
else else
bbox = self.bbox[oddEven] -- odd/even bbox = self.bbox[oddEven] -- odd/even
end end
if bbox ~= nil then -- last used up to this page if bbox ~= nil then -- last used up to this page
DEBUG("bbox from", oddEven) --DEBUG("bbox from", oddEven)
else else
for i = 0,pageno do for i = 0,pageno do
bbox = self.bbox[ pageno - i ] bbox = self.bbox[ pageno - i ]
if bbox ~= nil then if bbox ~= nil then
DEBUG("bbox from", pageno - i) --DEBUG("bbox from", pageno - i)
break break
end end
end end
end end
if bbox == nil then -- fallback bbox if bbox == nil then -- fallback bbox
bbox = self:getUsedBBox(pageno) bbox = self:getUsedBBox(pageno)
DEBUG("bbox from ORIGINAL page") --DEBUG("bbox from ORIGINAL page")
end end
DEBUG("final bbox", bbox) --DEBUG("final bbox", bbox)
return bbox return bbox
end end

Loading…
Cancel
Save