rename runtimectl to document/canvascontext

This commit is contained in:
Qingping Hou
2019-02-18 08:01:00 -08:00
committed by Frans de Jonge
parent adb5d5a52c
commit 1605409c60
28 changed files with 146 additions and 150 deletions

View File

@@ -1,6 +1,6 @@
local Document = require("document/document")
local DrawContext = require("ffi/drawcontext")
local Runtimectl = require("runtimectl")
local CanvasContext = require("document/canvascontext")
local pic = nil
local PicDocument = Document:new{
@@ -15,7 +15,7 @@ function PicDocument:init()
self:updateColorRendering()
if not pic then pic = require("ffi/pic") end
-- pic.color needs to be true before opening document to allow toggling color
pic.color = Runtimectl.is_color_rendering_enabled
pic.color = CanvasContext.is_color_rendering_enabled
local ok
ok, self._document = pcall(pic.openDocument, self.file)
if not ok then