ScrollViewWidget 的 display.save() 中的 captureOffscreenArea 似乎没有效果

captureOffscreenArea in display.save() of ScrollViewWidget appears to have no effect

我有一个 scrollHeight 大于小部件高度的 ScrollViewWidget。我想使用 display.save()captureOffscreenArea = true 捕获小部件的全部内容,但只保存了 ScrollViewWidget 的屏幕部分。

这个问题已经 come up before,但我认为它已经解决了。我使用的是最新的 public 版本 (2017.3068)。知道为什么这可能不起作用吗?

这似乎是 Corona 的问题。但是,与此同时,一个变通方法是用另一组与添加到 ScrollViewWIdget 相同的 DisplayObject 填充 GroupObject(这可能是 costly/complicated),并将此 GroupObject 用作​​ [=11= 的第一个参数] 与 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
})