Problem with importing snapshot
Richard Gaskin
ambassador at fourthworld.com
Sun Aug 25 21:23:34 EDT 2013
Charles Szasz wrote:
> Jim,
>
> Thanks for your comments. I did use my variable, myImage but
> I accidentally omitted it. Here is my actual script:
>
> export snapshot from group id 126899 of card "graph" to myImage as PNG
> set the clipBoardData["image"] to myImage
>
> go stack "report"
>
> put myImage into image id 1033 of card "page1" of stack "report"
>
>
> The stack "report" is a substack of my app and is used for printing.
> The code is in my print button of my main stack. The above code works
> but as I mentioned it strips out the text in the image.
Is the backgroundBehavior of the group set to true? If it is, I suspect
the problem is that the text of the field is stored with the card record
rather than the field itself, so when using the "from <obj>" form of
"export" it renders the object records, and unfortunately isn't taking
other objects like the card into account.
I could consider this a bug, and if you have time to submit a simple
example stack to illustrate the problem I'd guess it wouldn't be hard
for them to fix; I believe they've already addressed other bugs related
to the storage of the field contents in background (copy, maybe? I
don't recall which ones).
As a workaround, I wonder if you could copy the group to an offscreen
stack, set the backroundBehavior to false, and then run the export on
that copy?
Please let me know if that works, and if not some other workaround is
likely possible.
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list