mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
488 B
Lua
26 lines
488 B
Lua
12 years ago
|
|
||
|
ReaderScreenshot = InputContainer:new{}
|
||
|
|
||
|
function ReaderScreenshot:init()
|
||
|
local diagonal = math.sqrt(
|
||
|
math.pow(Screen:getWidth(), 2) +
|
||
|
math.pow(Screen:getHeight(), 2)
|
||
|
)
|
||
|
self.ges_events = {
|
||
|
Screenshot = {
|
||
|
GestureRange:new{
|
||
|
ges = "two_finger_tap",
|
||
|
scale = {diagonal - 80*Screen:getDPI()/167, diagonal},
|
||
|
rate = 1.0,
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
end
|
||
|
|
||
|
function ReaderScreenshot:onScreenshot()
|
||
|
os.execute("screenshot")
|
||
|
UIManager:setDirty(self.view.dialog, "full")
|
||
|
return true
|
||
|
end
|
||
|
|