2
0
mirror of https://github.com/koreader/koreader synced 2024-11-18 03:25:46 +00:00
koreader/frontend/ui/reader/readerscreenshot.lua

26 lines
465 B
Lua
Raw Normal View History

ReaderScreenshot = InputContainer:new{}
function ReaderScreenshot:init()
local diagonal = math.sqrt(
2013-03-16 00:03:50 +00:00
math.pow(Screen:getWidth(), 2) +
math.pow(Screen:getHeight(), 2)
)
self.ges_events = {
Screenshot = {
GestureRange:new{
ges = "two_finger_tap",
scale = {diagonal - scaleByDPI(100), diagonal},
rate = 1.0,
}
},
}
end
function ReaderScreenshot:onScreenshot()
os.execute("screenshot")
UIManager.full_refresh = true
return true
end