mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Show the current rendering mode in DjVu info
Although the current rendering mode can also be ascertained by pressing "R" and noting the current position in the menu, it is convenient to show it alongside the page type in the Menu status info.
This commit is contained in:
@@ -70,6 +70,24 @@ function DJVUReader:invertTextYAxel(pageno, text_table)
|
||||
return text_table
|
||||
end
|
||||
|
||||
function render_mode_string(rm)
|
||||
if (rm == 0) then
|
||||
return "COLOUR"
|
||||
elseif (rm == 1) then
|
||||
return "B&W"
|
||||
elseif (rm == 2) then
|
||||
return "COLOUR ONLY"
|
||||
elseif (rm == 3) then
|
||||
return "MASK ONLY"
|
||||
elseif (rm == 4) then
|
||||
return "COLOUR BG"
|
||||
elseif (rm == 5) then
|
||||
return "COLOUR FG"
|
||||
else
|
||||
return "UNKNOWN"
|
||||
end
|
||||
end
|
||||
|
||||
function DJVUReader:_drawReadingInfo()
|
||||
local width, height = G_width, G_height
|
||||
local numpages = self.doc:getPages()
|
||||
@@ -88,7 +106,8 @@ function DJVUReader:_drawReadingInfo()
|
||||
renderUtf8Text(fb.bb, 10, 15+6+22, face,
|
||||
"Gm:"..string.format("%.1f",self.globalgamma).." ["..tostring(page_gamma).."], "..
|
||||
tostring(page_width).."x"..tostring(page_height)..", "..
|
||||
tostring(page_dpi).."dpi, "..page_type, true)
|
||||
tostring(page_dpi).."dpi, "..page_type..", "..
|
||||
render_mode_string(self.render_mode), true)
|
||||
|
||||
-- display reading progress on bottom of page
|
||||
local ypos = height - 50
|
||||
|
||||
Reference in New Issue
Block a user