Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7557057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:01:42+00:00 2026-05-30T12:01:42+00:00

How to draw circular segment using paper.js I want to draw the circular segments

  • 0

How to draw circular segment using paper.js

I want to draw the circular segments as shown in the image. Each segment is independent and will later be used for interactive purposes.

enter image description here

I tried something like

//Temporary background circle
var keys = new Path.Circle(view.center, 130);
keys.fillColor = '#F1F1F1';

var home = new Path.Circle(view.center, 50);
home.fillColor = '#ee2a33';

var start = new Point(view.center.x, view.center.y-130);
var through = new Point(view.center.x-125, view.center.y-40);
var to = new Point(view.center.x-130, view.center.y);

var path = new Path.Arc(start, through, to);
path.strokeColor = 'black';
path.fillColor = 'green';

And it renders something like below

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:01:44+00:00Added an answer on May 30, 2026 at 12:01 pm

    After several attempts, I came up with this. If anyone needs the same thing for whatever reason, maybe this will help.

    //Creating keys
    var arcOne = createSegment('#f1f1f1');
    var arcTwo = createSegment('#666666');
    var arcThree = createSegment('#333333');
    var arcFour = createSegment('#666666');
    var arcFive = createSegment('#999999');
    var arcSix = createSegment('#000000');
    
    arcTwo.rotate(-60, view.center);
    arcThree.rotate(-120, view.center);
    arcFour.rotate(60, view.center);
    arcFive.rotate(120, view.center);
    arcSix.rotate(180, view.center);
    
    
    //center white
    var center = new Path.Circle(view.center, 50);
    center.fillColor = '#F1F1F1';
    
    //Create Each segment
    function createSegment(fillcolor){
        //Segment One
        var start = new Point(view.center.x, view.center.y-130);
        var through = new Point(view.center.x-90, view.center.y-94);
        var to = new Point(view.center.x-113, view.center.y-64);
        var name = Path.Arc(start, through, to);
    
        name.add(new Point(view.center.x, view.center.y));
        name.add(new Point(view.center.x, view.center.y-130));
        name.fillColor = fillcolor;
        return name;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to draw text onto a window HDC along a circular path using
Here's my problem- I'm trying to draw a circular part of a single image.
I want to draw a solid black rectangle with a circular hole in it,
i can get a central point of the circular,so i want to draw some
I want to draw a circular sector. I saw here how to do a
I'm trying to draw a polygon using c# and directx All I get is
I want to draw DirectX content so that it appears to be floating over
How can I draw something in JPanel that will stay the same and not
I draw an triangle using these piece of code CGPoint center; center = CGPointMake(x1,
I draw a background image in a view with the following code: CGContextRef currentContext

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.