import snapshot

prothero at earthednet.org prothero at earthednet.org
Sun Mar 23 14:31:08 EDT 2014


John:
Looks like we are working on similar project. I haven't had any trouble with my snapshot routine in LC 6.6. It's below. I'm on Mac OSX, regular (not retina) display.

on copyMapToSnap
   put the name of me into thisImage
   wait for 0 seconds with messages
   set the visible of thisImage to FALSE
   put the rect of this stack into stackRect
   put rectLeft(stackRect)&","&rectTop(stackRect) into theOffset  --this is the point at the topleft of the stack window
   put the rect of graphic "MapBox" into theRect  --This is relative to the stack
   put offsetRect(theRect,theOffset) into snapRect--offset the capture rect to absolute screen coordinates
   put adjustSizeOfRect(snapRect,1,1,-1,-1) into snapRect  --remove border of grahics box
   wait for 0.1 seconds with messages
   export snapshot from rect  snapRect to image "mapSnap"
   put adjustSizeOfRect(theRect,1,1,-1,-1) into snapRect  --theRect is relative to the stack
   set the rect of image "mapSnap" to snapRect  --now set the captured rect to the mapbox rect
   wait for 0 seconds with messages
   set the visible of image thisImage to TRUE
end copyMapToSnap

Good luck,
Bill

prothero at earthednet.org
http://es.earthednet.org

On Mar 22, 2014, at 6:20 PM, John Dixon wrote:

> I have been using the following in LC 6.5.2 to take a snapshot of an area of a map, hiding the map and replacing it with the snapshot...
> 
> set the margins of the templateImage to 0
> import snapshot from rect (0,40, the width of card "map", the height of card "map" -40 )
> set the name of the last image of card "map" to "mapic"   
> 
> LC 6.6 does not like this at all !... it makes the snapshot about a quarter of the size in width but it seems to squash it a little in the vertical too...
> 
> I have tried the new snapshot syntax with at size, but can't get it to play...
> 
> Anyone found out how to take a snapshot in LC 6.6 yet ?
> 		 	   		  
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list