mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[feat] Comics: zoom to panel (#6511)
This pull requests aims to provide convenient way to zoom in comics. The idea is when user holds/double taps (not decided yet) on a manga/comic panel, it gets cut out from the rest of the image and zoomed. More details in koreader/koreader-base#1148. Depends on koreader/koreader-base#1159
This commit is contained in:
@@ -413,6 +413,13 @@ function Document:getDrawnImagesStatistics()
|
||||
return self._drawn_images_count, self._drawn_images_surface_ratio
|
||||
end
|
||||
|
||||
function Document:getPagePart(pageno, rect, rotation)
|
||||
local tile = self:renderPage(pageno, rect, 1, rotation, 1, 0)
|
||||
local target = Blitbuffer.new(rect.w, rect.h, self.render_color and self.color_bb_type or nil)
|
||||
target:blitFrom(tile.bb, 0, 0, rect.x, rect.y, rect.w, rect.h)
|
||||
return target
|
||||
end
|
||||
|
||||
function Document:getPageText(pageno)
|
||||
-- is this worth caching? not done yet.
|
||||
local page = self._document:openPage(pageno)
|
||||
|
||||
Reference in New Issue
Block a user