Additionally, you can take a look at Sprite.blendMode. Specifically "blendMode = BlendMode.ERASE" will cut a hole in anything.
- Dan Freiman On 10/24/07, mailtoanzer <[EMAIL PROTECTED]> wrote: > > Hi Jon & Ian, > Thanks alot for your valuable suggestions. > I made it workable using the first solution (2 images). I am gonna try > the second solution tomorrow. I will let you know the resluts. > > And Jon its not a fully functional image editing app, its a simple > media uploader with scaling and cropping functionalities to plug into > a big project management application. I will send you the link once I > upload it to live. > > Thanks again > Anz > > > --- In [email protected] <flexcoders%40yahoogroups.com>, Jon > Bradley <[EMAIL PROTECTED]> wrote: > > > > > > On Oct 24, 2007, at 8:15 AM, mailtoanzer wrote: > > > > > Hi Ian, > > > Thank you for the reply. > > > I tried your solution but I couldnt make the crop area draggable. I am > > > trying to do something similar to the crop tool in > > > http://www.picnik.com/. My crop area is not resizable but the whole > > > image can be scaled by dragging the corners. > > > I have completed the scaling of image and cropping, the only thing > > > remaining is the alpha for image area except croping area. > > > > Didn't read the 'crop area draggable part' first time around. > > > > For the draggable crop area, use a transparent proxy that you drag > > around the screen. You won't see it but it's clickable and draggable. > > If you don't have to rotate or scale it, that's easy - just use > > normal drag methods. You can automatically have it be limited to the > > boundary of the canvas it's in very easily if you want. > > > > For drawing the overlay that white washes the image: > > > > 1. Get window size (container of the image and crop area) > > 2. start fill on a new sprite that's on top of everything > > 3. draw the window rectangle in the sprite at the full size of the > > window > > 4. draw the crop rectangle in the sprite, in reverse order using the > > sizing of the crop box > > 5. end the fill > > 6. Run the draw loop as you drag the crop area around. > > > > cheers, > > > > jon > > > > >

