A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: drawing irruglar shape with rounded corners

  1. #1
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707

    drawing irruglar shape with rounded corners

    hi, i have been tasked to create a rollover state that has dynamic irregular shapes that surround the movieclip target. The target is always a rectangle (thank god) and the shapes will look roughly like:


    I think i will have to draw this old school without using the easy predfined shape classes. I first thought about doing two rounded rectangles to fake it, but the line cross over (pointing green arrow) will overlap. Anyone have ideas on how to approach this? If i go with the drawing api, is there a formula to working out the rounded curveTo angles on the corners to always be the same radius?

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Supposing you want 10pt curves on everything, you stop your lineTo 10px short and then use curveTo around the actual corner, landing 10px into the next line. Then the actual "corner" where the two straightaways would converge is your anchor point in the curve.
    Attached Images Attached Images
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    will i ever get it?
    Join Date
    Feb 2004
    Posts
    707
    that graph just answered all my questions! Thanks for the direction

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center