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 8143825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:12:57+00:00 2026-06-06T13:12:57+00:00

So I have a rotating canvas element which has an arc drawn inside it

  • 0

So I have a rotating canvas element which has an arc drawn inside it (the smaller planet):
http://jsfiddle.net/neuroflux/9L689/4/ (updated)

But I can’t seem to get the anti-aliasing on the edges of the smaller planet smoother – any ideas?

Cheers!

edit: is there a way to increase the number of iterations used within an arc?

  • 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-06-06T13:12:58+00:00Added an answer on June 6, 2026 at 1:12 pm

    Your problem is not that the arc doesn’t have enough points, but that in Chrome the .clip() operation doesn’t use anti-aliasing to produce the clipping path.

    See Chromium Issues 7508 and 132442

    To see this in action, look at http://jsfiddle.net/alnitak/YMtdZ/ in Chrome.

    markup:

    <canvas id="c" width="600" height="300" />
    

    ​
    code:

    var canvas = document.getElementById('c');
    var ctx = canvas.getContext('2d');
    
    ctx.fillStyle = 'black';
    
    ctx.save();
    ctx.beginPath();
    ctx.arc(150, 150, 140, 0, 2 * Math.PI);
    ctx.clip();
    ctx.fillRect(0, 0, 600, 300);
    ctx.restore();
    
    ctx.beginPath();
    ctx.arc(450, 150, 140, 0, 2 * Math.PI);
    ctx.closePath();
    ctx.fill();
    

    ​The left-hand circle is drawn with clipping, and is aliased. The right-hand circle is drawn “normally”, and is anti-aliased.

    FWIW, in Firefox and Safari both images look the same. I can’t test it on IE.

    The only work around I can imagine (until Chrome gets fixed) would be to render the image off-screen into a canvas 3 or 4 times larger, and then copy that with down-sampling into the displayed canvas.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a problem with rotating a rectangle and place it on a canvas
http://www.html5canvastutorials.com/webgl/html5-canvas-webgl-plane-with-three-js/ In this example its just a rotating plane. I'm an html 5 beginner
I am writing a drawing program, Whyteboard -- http://code.google.com/p/whyteboard/ I have implemented image rotating
I have an animated rotating ImageButton. <?xml version=1.0 encoding=utf-8?> <set xmlns:android=http://schemas.android.com/apk/res/android > <rotate android:fromDegrees=0
I want to have a element rotating 360 degrees infinitely. Here is my code:
I have two arrows drawn on my canvas using the canvas.DrawPath(). I'm using canvas.rotate()
I have an image which is rotating and what I want is that a
I have a Graphics2D object which I use to draw on my Canvas .
Using ASP.Net MVC3 with C# I have a rotating ad setup on my layout
I have followed this tutorial ( http://stuffthathappens.com/blog/2008/11/13/android-animation-101/ ) and have a beautiful rotating text

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.