This message is my response to a thread on the Use-List about taking screen shots of stacks that are off screen.
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.
Snap-shotting around
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 10102
- Joined: Fri Feb 19, 2010 10:17 am
Snap-shotting around
Last edited by richmond62 on Sun Nov 08, 2015 8:58 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 10102
- Joined: Fri Feb 19, 2010 10:17 am
Re: Snap-shotting around
Trying to do the same sort of thing with the stack's windowID is a pig's breakfast:
on mouseUp
set the moveSpeed to 65000
move stack "splat" to -400, -400
wait 10 ticks
put the windowID of this stack into WINDAE
export snapshot from stack WINDAE to file "splatCARDoffScreenWID.png" as PNG
wait 10 ticks
move stack "splat" to 400, 400
end mouseUp
here's my result:
which is a load of old cobblers.
on mouseUp
set the moveSpeed to 65000
move stack "splat" to -400, -400
wait 10 ticks
put the windowID of this stack into WINDAE
export snapshot from stack WINDAE to file "splatCARDoffScreenWID.png" as PNG
wait 10 ticks
move stack "splat" to 400, 400
end mouseUp
here's my result:
which is a load of old cobblers.
Re: Snap-shotting around
Just to confirm your arguing, Richmond.
I also use "export snapshot" with LC 6-8 after setting top or left of objects 20000 pixels off the main screen (5000 is today not enough for a large multiple monitor arrangement), also for *hidden* objects, also "with effects".
But one should have one thing in mind when going "offset":
Coordinate values are limited to the range -32768 to 32767,
see quality center #11639.
I also use "export snapshot" with LC 6-8 after setting top or left of objects 20000 pixels off the main screen (5000 is today not enough for a large multiple monitor arrangement), also for *hidden* objects, also "with effects".
But one should have one thing in mind when going "offset":
Coordinate values are limited to the range -32768 to 32767,
see quality center #11639.
shiftLock happens
Re: Snap-shotting around
The window id is an integer, so you are telling LC to take a snapshot of a stack located by its layer order. Try using the stack name instead.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 10102
- Joined: Fri Feb 19, 2010 10:17 am
Re: Snap-shotting around
Possibly that attempt had something to do with a remark posted on the Use-List:
"I wonder if it would be possible to pass the window ID of a hidden stack?"
And, unless I'm much mistaken . . .
If I do this:
on mouseUp
put the windowID of this stack into WINDAE
export snapshot from stack WINDAE to file "splatCARDoffScreenWID.png" as PNG
end mouseUp
when the stack is NOT off screen I get a "perfectly respectable" screen shot of the stack!
"I wonder if it would be possible to pass the window ID of a hidden stack?"
And, unless I'm much mistaken . . .
If I do this:
on mouseUp
put the windowID of this stack into WINDAE
export snapshot from stack WINDAE to file "splatCARDoffScreenWID.png" as PNG
end mouseUp
when the stack is NOT off screen I get a "perfectly respectable" screen shot of the stack!
- Attachments
-
- splat.zip
- Here's the stack to play with.
- (182.47 KiB) Downloaded 193 times
Re: Snap-shotting around
Right, that remark was in response to the OP on the list who said he was using an external that required a window ID, so I suggested passing the ID to a hidden stack rather than the one that was visible.
I wasn't at my computer when I answered your post here, so I sidestepped and said "try it".
It looks like the engine is translating your command to use the window rect, which would match what you're seeing.
I wasn't at my computer when I answered your post here, so I sidestepped and said "try it".

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com