A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Draw three quarter circle...

  1. #1
    Senior Member next2heaven's Avatar
    Join Date
    Nov 2000
    Posts
    275

    Question Draw three quarter circle...

    I need to draw a circle like a pie chart. But I need the circle to only go around about 2/3's or whatever I choose. I've tried the 'curveTo' method but that didn't work. It makes the circle more bulged and not round like a circle.

    Any ideas on how to make a perfect circle with a slice taken out?
    Play Intimate Tonight!
    Check it out here

  2. #2
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,136
    The nicest-looking way is to use drawCircle, then create a mask for it.

    Code:
    var circ:Sprite = new Sprite();
    circ.graphics.beginFill(0,1);
    circ.graphics.drawCircle(0,0,50);
    circ.graphics.endFill();
    var cmask:Sprite = new Sprite();
    cmask.graphics.beginFill(0,1);
    cmask.graphics.drawRect(0,-50,50,50);
    cmask.graphics.endFill();
    circ.mask = cmask;
    addChild(circ);
    addChild(cmask);
    circ.x = cmask.x = circ.y = cmask.y = 100;

  3. #3
    Senior Member next2heaven's Avatar
    Join Date
    Nov 2000
    Posts
    275
    Great idea. Thank you, that will work wonderfully!
    Play Intimate Tonight!
    Check it out here

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