Snapshot within a circle

Richard Gaskin ambassador at fourthworld.com
Fri Jan 3 17:43:53 EST 2014


Jim Hurley wrote:
> Thanks Richard. I appreciate the details. I can see now how that would be more useful. I had to go to a lot of trouble to hide all the objects close to my oval graphic so that they would not be caught up in the Rect of the oval.
>
> But I can’t seem to make this method work for me. It isn’t just the grc “oval” that I want to export to Preview, but the grc “oval”  (which is just a black circle) but the kaleidoscopic the image “my image” that is painted on it.
>
> I tried grouping the img and the grc as in the following script:
>
> on mouseUp
>    ask "Please name this image." with "Kaleidoscope"
>    --hide group "showhidegroup"
>    if it is "" then exit mouseUP
>    put "/" & it & ".png" into tName
>    put specialFolderPath ( "desktop") & tName Into tPathAndName
>    --         put specialFolderPath("desktop") & "/Kaleidoscope.png" into tPathAndName3
>    --         put specialFolderPath("desktop") &  tImageName  into tPathAndName2
>    if there is a group "exportGroup" then delete group "exportGroup"
>    group img "myImage" and grc "oval"
>    set the name of last group to "exportgroup"
>    export snapshot from group "exportGrouP" to file tParthANdName as PNG
>    --            export snapshot from graphic "CC" to file "Circle.png" as PNG
>
>    --         export snapshot from rect (rect of  graphic "oval") of this card  to file tPathAndName as PNG
>    launch document tPathANDNAME
>    ungroup group "exportGroup"
> end mouseUp
>
> But nothing at all shows up in Preview. Is there some other way to put the img that rests atop the grc so that they may be exported together?

I know that the newer form of "export" works, so the key now is to pin 
down why it doesn't work in your script.

If you manually group the elements and run the export command by itself 
in the Message Box, does that work?

--
  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