Export snapshot question...

Richmond richmondmathewson at gmail.com
Sun Nov 8 03:25:30 EST 2015


On 08/11/15 06:59, Paul Hibbert wrote:
>> On Nov 7, 2015, at 4:46 PM, Paul Dupuis <paul at researchware.com> wrote:
>>
>> On 11/7/2015 1:46 PM, Paul Hibbert wrote:
>>> Yes this is the expected behaviour. Export snapshot from rect is not be able to take a snapshot of something "off-screen” because it’s not rendered by the display.
>>>
>>> Export snapshot from rect uses the device's display output to render the image, but if you use Export snapshot of an object (stack, card, group etc.), then the LC engine renders the image, so you can take a snapshot of a stack that is off-screen this way. I hope that makes sense!
>> Thank you.
>>
>> My problem is that I am using a custom external that places content
>> generated by the external in to the stack window (via the windowID of
>> the stack that I pass to the external). If I do export snapshot of stack
>> xxx, the content placed in the stack window by the external is not
>> recognized and included in the resulting image.
>>
>> We may have to have the external modified to return an optional image
>> that we can place on a stack for printing.
> That does sound like a more complex problem. Modifying the external sounds like the best option, unless anybody else has any tricks.
>
> Paul
>

This sounds very odd as, surely, EXPORT SNAPSHOT exports a snapshot of 
*/whatever/* is inwith the*rect* or *object* defined.

I wonder if, instead of doing /export snapshot from stack xxx/ you might 
not be better doing /export snapshot from card zzz/: my experience
of doing the thing from the stack has not been altogether satisfactory . 
. . Oops . . .  haven't tried that since DreamCard 2.6 (remember
that???): just tried /export snapshot from stack xxx/ and it "threw a 
bluey", so I don't know what you are doing.

However, /export snapshot from card zzz/ does a perfectly respectable job.

When moved off screen:

on mouseUp
    set the moveSpeed to 65000
    move stack "splat" to -400, -400
    wait 10 ticks
    export snapshot from card id 1002 of stack "splat" to file 
"splatCARDoffScreen.png" as PNG
    wait 10 ticks
    move stack "splat" to 400, 400
end mouseUp

it does just as good a job as on screen.

Here it all is, complete with pretty pictures and my test stack:

http://forums.livecode.com/viewtopic.php?f=9&t=25812

Richmond.




More information about the use-livecode mailing list