Help with export snapshot

Thomas McGrath III mcgrath3 at mac.com
Fri Apr 8 11:55:32 CDT 2011


I just figured this out and then due to another problem lost the code. For the life of me I can't remember what I just did.

   if exists (graphic "PreviewRect" of group "PreviewGroup" of this card) then
        export snapshot from rect (the rect of graphic "PreviewRect" of group "PreviewGroup" of this card) to tPreviewImage as PNG
        put  tPreviewImage into image "PreviewImage" of group (the short name of this card)
    end if

This code will copy from the relative (window) coordinates as the docs state: "Important!  If a window, stack or object is specified, the rectangle is given in relative (window) coordinates; otherwise, it is given in absolute coordinates." EXCEPT an object is not specified but a rect is!!!


Tried with erro:
export snapshot from the rect of graphic "PreviewRect" of group "PreviewGroup" of this card to tPreviewImage as PNG

This one grabs the rect itself and not what is in front of it like I need:
export snapshot from graphic "PreviewRect" of group "PreviewGroup" of this card to tPreviewImage as PNG
       


Any one feel like showing me what I'm doing wrong here????

Thanks

-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net




More information about the use-livecode mailing list