mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Allow for colored rendering (#3276)
* Allow for colored rendering Available with all engines (CRE, PDF, Images). Needs to manually add setting: "color_rendering" = true * Disable color for djvudocument * Use Screen:isColorEnabled() * Bump base
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local Document = require("document/document")
|
||||
local DrawContext = require("ffi/drawcontext")
|
||||
local Screen = require("device").screen
|
||||
local pic = nil
|
||||
|
||||
local PicDocument = Document:new{
|
||||
@@ -10,6 +11,7 @@ local PicDocument = Document:new{
|
||||
|
||||
function PicDocument:init()
|
||||
if not pic then pic = require("ffi/pic") end
|
||||
pic.color = Screen:isColorEnabled()
|
||||
local ok
|
||||
ok, self._document = pcall(pic.openDocument, self.file)
|
||||
if not ok then
|
||||
|
||||
Reference in New Issue
Block a user