Import Snapshot of Stack?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Import Snapshot of Stack?

ScottR
Anyone know if this is possible without referencing a windowID?

This fails with a script error:
import snapshot from stack "xyz"


This defaults to selecting a region to capture and then fails:
import snapshot of stack "xyz"


This works, but clips the snapshot if any portion of the stack appears
outside the screenRect:
import snapshot from window windowID

I'd prefer to avoid capturing the current card of a stack, but may fall
back to that.


Any other options?

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Import Snapshot of Stack?

Richard Gaskin
Scott Rossi wrote:
 > Anyone know if this is possible without referencing a windowID?
 >
 > This fails with a script error:
 > import snapshot from stack "xyz"
 >
 >
 > This defaults to selecting a region to capture and then fails:
 > import snapshot of stack "xyz"
 >
 >
 > This works, but clips the snapshot if any portion of the stack appears
 > outside the screenRect:
 > import snapshot from window windowID
 >
 > I'd prefer to avoid capturing the current card of a stack, but may
 > fall back to that.

Go with card if you can't guarantee placement of the window.

The "from" option renders the object into a new buffer set up just for
the snapshot, while the older "of" syntax grabs the object's rect from
the composite screen buffer.

LiveCode renders only the content region of a window but the window
itself is rendered by the OS, so it has no choice but to obtain that
image from the screen buffer.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Import Snapshot of Stack?

tbodine
Richard,

Thanks for that great tip! I was just grumbling about the poor image quality of my exported snapshots (on Win7, LC 7.0.5). I tried your syntax "from card" instead of a rect or object, and it's a night and day difference.  Gradients, photos and type are much smoother in the image from the card, even when I alter the size of the snapshot.

Thanks again.
Tom Bodine