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:
poire-z
2017-10-01 00:16:38 +02:00
committed by Frans de Jonge
parent a2ea46bfdc
commit 180f5755f4
7 changed files with 35 additions and 11 deletions

View File

@@ -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