Rev Crash Again! ... cardImage() function
Dar Scott
dsc at swcp.com
Fri Jan 9 16:02:42 EST 2004
On Friday, January 9, 2004, at 05:10 AM, Wouter wrote:
> #### = changed
> function cardImage theStack ####
> local tCurrentCardImage, tOldBuffer, tID
> put the alwaysBuffer of stack theStack into tOldBuffer
> put the cantmodify of stack theStack into tCMOldBuffer ####
> set the cantmodify of stack theStack to false ####
> set the alwaysBuffer of stack theStack to false
> set the alwaysBuffer of stack theStack to true
> put the windowID of stack theStack into wID
> put the pixMapID of stack theStack into pID
> if not ((pID is wID) or (pID is 0)) then
> create invisible image
> put the imagePixMapID of last image into tID
> set the imagePixMapID of last image to (the pixMapID of stack
> theStack) ####
> export last image to tCurrentCardImage as PNG
> set the imagePixMapID of last image to tID
> set the alwaysBuffer of stack theStack to false
> set the cantmodify of stack theStack to tCMOldBuffer ####
> delete last image
> end if
> return tCurrentCardImage
> end cardImage
I like it! Maybe theStack can be made optional, too. If so, should it
be defaultStack or topStack?
Anybody have ideas on specifying the card?
Dar Scott
More information about the use-livecode
mailing list