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

  • Home
  • SEARCH
  • 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 6948739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:51:45+00:00 2026-05-27T13:51:45+00:00

I imagine the solution to this is very simple, and apologize in advance if

  • 0

I imagine the solution to this is very simple, and apologize in advance if this is painfully obvious, but I can’t seem to figure out how to set two different fillStyles for two different arcs …I just wanna be able to draw different color circles. Below I have how I would normally do it with other shapes/drawing methods in canvas, but for some reason with arcs it sets both arcs to the last fillStyle.

ctx.fillStyle = "#c82124"; //red
ctx.arc(15,15,15,0,Math.PI*2,true);
ctx.fill();

ctx.fillStyle = "#3370d4"; //blue
ctx.arc(580,15,15,0,Math.PI*2,true);
ctx.fill();
  • 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-27T13:51:46+00:00Added an answer on May 27, 2026 at 1:51 pm

    I think you’re missing the begin and end path statements. Try the following (it works for me in jsfiddle, see here)

    ctx.fillStyle = "#c82124"; //red
    ctx.beginPath();
    ctx.arc(15,15,15,0,Math.PI*2,true);
    ctx.closePath();
    ctx.fill();
    
    ctx.fillStyle = "#3370d4"; //blue
    ctx.beginPath();
    ctx.arc(580,15,15,0,Math.PI*2,true);
    ctx.closePath();
    ctx.fill();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope my problem has a very simple solution. I just can't find it:
Imagine a very big gwt project of application. This is just a some form
Imagine this simple form for uploading a file: <form action=upload enctype=multipart/form-data> <input type=text name=name/>
I cant imagine this to be very complicated, however my level of Rails is
First, I apologize if this has been answered. I've seen many similar questions but
I was given this question at a job interview recently and couldn't figure out
I imagine a very common scenario is where an entire dynamic page can be
My problem is very simple to explain but I don't success to find the
imagine this html on a page <div id=hpl_content_wrap> <p class=foobar>this is one word and
Imagine I've got a database with lots of data, from which users can search.

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.