Drawing shapes in Flex / Actionscript -
i want develop image editing application in flex 4. initial requirement draw various shapes line, rectablge, triangle, circle, star etc in appication. want facilitate user draw shapes using rubber banding professional applications do.
all shapes vector , should smooth in size. so, can't use bitmap , scale them.
what better methods achieve this?
make shape editor control points. control points draggable sprites (circles or squares like). when control point moved, editor must updated - may resize or move action. on resize, draw vector shape according new size. easiest way make sprite draggable startdrag() function - can set limits there (to stay in editor area or disable negative sizes).
i have done such editors based on sprites, added flex application rawchildren.addchild, can try use canvases instead of sprites if wish.
Comments
Post a Comment