Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

reversed graphic.arc bug?


GameDemon
 Share

Recommended Posts

Hello, I'm trying to draw a pie-chart like circle with a wedge missing - it's for an elapsing clock/timer.

 

I want the missing wedge to start at 12 o'clock and move to the right.

 

The following code seems to be what I need:

gfk.arc(0, 0, 128,        game.math.degToRad(270), // starts at 12 o'clock        game.math.degToRad(270-360), // ends at 12 o'clock        true // anti-clockwise);

This should draw a complete circle - but it's a few degrees off:

 

inJyJBr.png

 

Here's a live demo:

https://output.jsbin.com/ruseje

If I turn off the arc reverse-draw argument and draw in opposite direction, it works fine, but I need it in reverse.

 

Why does this happen, and how can I draw the shape I want? Thanks in advance!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...