kopt: option to invert document in night mode (#14954)

This commit is contained in:
Euphoriyy authored and GitHub committed 2026-03-08 12:31:57 +01:00
1 parent 9b03ee8c6d
commit a47ecfcdc2
4 files changed
+51 -8

No files matched your search

+9
View File
@@ -547,6 +547,15 @@ function Document:drawPage(target, x, y, rect, pageno, zoom, rotation, gamma)
end
end
function Document:drawPageInverted(target, x, y, rect, pageno, zoom, rotation, gamma)
local tile = self:renderPage(pageno, rect, zoom, rotation, gamma)
target:invertblitFrom(tile.bb,
x, y,
rect.x - tile.excerpt.x,
rect.y - tile.excerpt.y,
rect.w, rect.h)
end
function Document:getDrawnImagesStatistics()
-- For now, only set by CreDocument in CreDocument:drawCurrentView()
-- Returns 0, 0 (as per Document:init) otherwise.