mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Translator: translate current page (#10438)
This commit is contained in:
@@ -672,8 +672,13 @@ function CreDocument:getWordFromPosition(pos)
|
||||
]]--
|
||||
end
|
||||
|
||||
function CreDocument:getTextFromPositions(pos0, pos1)
|
||||
local text_range = self._document:getTextFromPositions(pos0.x, pos0.y, pos1.x, pos1.y)
|
||||
function CreDocument:getTextFromPositions(pos0, pos1, do_not_draw_selection)
|
||||
local drawSelection, drawSegmentedSelection
|
||||
if do_not_draw_selection then
|
||||
drawSelection, drawSegmentedSelection = false, false
|
||||
end
|
||||
local text_range = self._document:getTextFromPositions(pos0.x, pos0.y, pos1.x, pos1.y,
|
||||
drawSelection, drawSegmentedSelection)
|
||||
logger.dbg("CreDocument: get text range", text_range)
|
||||
if text_range then
|
||||
-- local line_boxes = self:getScreenBoxesFromPositions(text_range.pos0, text_range.pos1)
|
||||
|
||||
Reference in New Issue
Block a user