Creating multiple versions of an image is a bit much on the overhead. Plus, you don't have the capability of doing a white wash, or dark wash, or custom color overlay for the crop.

In my applications I've written a an 'overlay' class. It's is a filled rectangle drawn in clockwise fashion, with an inner rectangle drawn in reverse order (matching the crop box transformation).

This is pretty easy to do. Just write a new function that will draw a rectangle in reverse order (counter-clockwise) and do something like the following:

overlay.beginFill()
overlay.drawRect( image rectangle, false); // where false means draw normal, or clockwise overlay.drawRect( crop rectangle, true) // draw it reverse making a hole
overlay.endFill()

So, in short, don't use another image because you'll overcomplicate things, imho.

Use reverse fills as holes since it's faster and gives you more flexibility on the look.

Anz --- any possibility we can take a look at your version of the picnic-style crop tool?

cheers,

jon


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.

Please let me know if there is any solution

Thanks and best Regards
Anz

Reply via email to