CRE/ImageViewer: get scaled blitbuffer when long-press on SVG
Get a Lua userdata wrapping a crengine LVSvgImageSource object when long-press on a SVG image, and have crengine/LunaSVG render it smoothly scaled to the requested size by ImageViewer.
This commit is contained in:
1 parent
1c44c4c584
commit
76a7d83079
3 files changed
+55
-6
No files matched your search
@@ -1008,7 +1008,9 @@ function ReaderHighlight:onHold(arg, ges)
|
||||
-- check if we were holding on an image
|
||||
-- we provide want_frames=true, so we get a list of images for
|
||||
-- animated GIFs (supported by ImageViewer)
|
||||
local image = self.ui.document:getImageFromPosition(self.hold_pos, true)
|
||||
-- We provide accept_cre_scalable_image=true to get, if the image is a SVG image,
|
||||
-- a function that ImageViewer can use to get a perfect bb at any scale factor.
|
||||
local image = self.ui.document:getImageFromPosition(self.hold_pos, true, true)
|
||||
if image then
|
||||
logger.dbg("hold on image")
|
||||
local ImageViewer = require("ui/widget/imageviewer")
|
||||
|
||||
Reference in new issue
Block a user