The new Import snapshot of object function

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Troy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Sun May 21, 2006 2:21 am

The new Import snapshot of object function

Post by Troy » Thu Jul 27, 2006 7:53 pm

New in 2.7.2 is this command:
The import and export snapshot commands have been extended with the following
new syntax:
import snapshot from [rectangle <rect> of] <object-chunk>
export snapshot from [rectangle <rect> of] <object-chunk> to ...

In both cases <object-chunk> cannot be a stack (the remainder of the export form is the same as the existing export snapshot command). The rectangle is in relative coordinates.
Anyone have an example of this in use? I'm particularly trying to dynamically generate a group, and composite it into an image... without all the flash-bulbs involved in a typical snapshot process. I find that having the screen locked, or trying to do such a composite outside the boundaries of the screen results in a screw-up composite image. I'm looking for a visually clean way to create such composite images.

In my attempts so far, I've been unable to create a syntactically correct version of this command which achieves what I'm try to do.

elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 516
Joined: Fri Feb 24, 2006 9:45 am

Post by elanorb » Wed Aug 02, 2006 1:47 pm

An example of how the import snapshot command could be used to create an image of a group would be

import snapshot from rectangle (the rectangle of group 1) of group 1

This would create a composite image of the group. This command also works if the group is offscreen.

I hope this helps.

Elanor

Elanor Buchanan ~ elanor@runrev.com ~ http://www.runrev.com/
Runtime Revolution - User-Centric Development Tools

Troy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Sun May 21, 2006 2:21 am

Post by Troy » Wed Aug 02, 2006 3:11 pm

Yes, thanks. I actually resolved this earlier. The results are excellent. It is now possible to composite several things into a new image without a lot of screen flashing, etc. I really like this new command.

Post Reply