I’ve used the graphics package before, but not sure if this can be done. I’m trying to create a dog ear effect programmatically with flex. Can it be done? If not possible, what other options or libraries do I have.
I’ve used the graphics package before, but not sure if this can be done.
Share
You can get away with the undocumented drawRoundRectComplex() for a trendy rounded corners version:
It’s the actionscript version of the Rectangle Primitive Tools from the Tools Panel.
Surely you can get your head around the Graphics class, as @Robusto suggested.
Meanwhile, here’s a simple 45 angled version:
Here’s how the rough(45 angled) version should look like:
Update:
Had a few minutes to play with this, here is some code for rounded versions, for documenting:
With a soft drop shadow, looks ok:
You can fill the corner with a nice linear gradient, you can modify the function so you can choose which corners are rounded, and which aren’t, discretely animate it, etc. Have fun!
I understand dog ears now, just wondering what ever happened to folded corner 😛