samccone
samccone

Reputation: 10926

Canvas Circle Equation not perfect

I am drawing two nested circles and connecting points on their radius together.

I am running into an issue where the points seem to be not perfect .. causing the inner circle outline to look ragged...

ideas... thoughts?

here is the code and example

http://jsfiddle.net/JGWBF/1/

here is the issue ...

enter image description here

see how some points are actually sticking out ^^^

odd right i think it is due to some subpixel rendering bs

Upvotes: 1

Views: 237

Answers (1)

Louis Ricci
Louis Ricci

Reputation: 21106

The image is anti-aliased. There are plenty of canvas questions on SO about it; in short...

For the basic drawing functions you can't control the anti-aliasing it's browser dependent and seems to be on by default. However, you can circumvent the anti-aliasing with the canvas context pushImageData function.

Upvotes: 1

Related Questions