Jump to content


Chapter 7 Arc Issue

  • Please log in to reply
No replies to this topic

#1 Friffer


    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 June 2012 - 09:42 AM

Really enjoying the book so far and learning a lot. I have been testing my code on Chrome and Firefox, but when I started drawing the circles in chapter 7, Chrome had issues. Testing the code in the book on Chrome updates the background color and squares appear correctly, but circles do not show up.

After tinkering for a while, it seems Chrome doesn't like when the starting point and ending point of an arc are the same. I changed my code to:

context.arc(x, y, radius, 0.001, degreesToRadians(360), false);

and this seems to fix the problem. I think this is more a bug in Chrome rather than an error in the book because the book's code works in the other browsers I tested.

Edited by Friffer, 03 June 2012 - 09:46 AM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users