Import Snapshot in iOS
Richard Gaskin
ambassador at fourthworld.com
Wed May 15 09:59:33 EDT 2013
Mark Wilcox wrote:
> Yes, the code I looked at definitely took a rect and not an object.
> I suspect the new method is not taking a snapshot of the screen at
> all but rendering the object into an image. Wouldn't using the new
> method and asking for the current card work for most scenarios?
I would imagine so. In my understanding, the newer "from <object>"
option does indeed work as you described, which is why I guessed it
might be helpful in cases where the "from <rect>" option doesn't work.
I think Björnke's suggestion that this be reported as a bug is valid,
since it's probably possible to change the buffer from which the "from
<rect>" image data is obtained, from what I presume is the rendered card
buffer to the final OS-rendered screen buffer instead. This may be
slightly more difficult on non-mobile systems, since the card buffer
will be using different coordinates from the screen buffer, but even
then those coords should be translatable.
In fact, this may help us understand why John's results are so different:
> There is not a problem with importing a snapshot from a rectangle !..
> and it doesn't matter is acceleratedRendering is true or false.. or
> has even left the room ..:-)
I wonder if successful uses of "from <rect>" are using global
coordinates, while unsuccessful ones are using local coordinates.
If this is true, I'd still consider it a bug but at least it becomes
somewhat understandable, in that perhaps local coords pull from the card
buffer (which is in tiles with acceleratedRendering turned on) while
global coords perhaps pull from the final composited screen buffer.
That's just a wild guess, though. But since John's seeing good results
while others are seeing blank images, there must be some difference
somewhere.
Perhaps we should note engine version numbers with results as this
discussion continues? It may be that ongoing enhancements to the
rendering subsystem introduced a change in a relatively recent version
which is the cause of this.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list