Object is not an image when Crop command

JosepM jmyepes at mac.com
Tue May 11 04:34:25 EDT 2010


Hi Scott,

Thanks for the stack. Very cool the effect.
But I need to move the masked object, and your idea of use the
BackgroundPattern inspired me and I found one solution that at first step
solve my problem.

I have a image and some graphics "polygons" over.
The user select one of them and extract the image inside the edges of the
graphic.
And then the user can move if they want or duplicate.

"the selectedobject" is the polygon

on mouseUp
   lock screen
   put the rect of the selectedobject into tRect
   import snapshot from rect tRect of image "picture"
   put the id of last image into tSnapshotId
   set the backgroundpattern of the selectedobject to tSnapshotId
   delete img id tSnapshotId

   set the layer of the selectedobject to top
   set the ink of the selectedobject to srcCopy
   unlock screen
end mouseUp


What you think about? Can I have any problem of memory if I use more
graphics with backgroundpattern?

And other question to explore :)
How can empty the area of the image that is inside the graphic? Modifying
the imagedata? 
Or select a range of pixels and asign a new color? 


Salut,
Josep
-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Object-is-not-an-image-when-Crop-command-tp2171784p2173518.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the Use-livecode mailing list