我有一个ScrollViewWidget,其scrollHeight
大于小部件的高度。我想使用display.save()
和captureOffscreenArea = true
来捕获小部件的全部内容,但是只保存ScrollViewWidget的屏幕上部分。
这个问题有上来之前,但我认为它已经解决了。我正在使用最新的公共建筑(2017.3068)。知道为什么这不管用吗?
发布于 2017-04-24 21:32:42
这似乎是科洛娜的问题。但是,在此期间,一个解决办法是使用另一组与添加到GroupObject中的DisplayObjects相同的DisplayObjects填充ScrollViewWIdget (这可能代价很高/很复杂),并使用这个GroupObject作为display.save()
的captureOffscreenArea = true
的第一个参数。
local _g = display.newGroup()
-- Populate _g with DisplayObjects identical to those in the
-- scroll view, but NOT the same objects (this would remove them
-- from the scroll view).
display.save( _g, {
filename = "foo.jpg",
baseDir = system.TemporaryDirectory,
captureOffscreenArea = true
})
https://stackoverflow.com/questions/43598028
复制相似问题