Acknowledged
CIQQA-3315

Bug: dc.drawArc() when trying to draw arc less than 1 deg starting from 0 draws whole circle

Doing:

dc.drawArc(
          _centerX,
          _centerY,
          _radius,
          Graphics.ARC_CLOCKWISE,
          0.0, // degreeStart 
          0.5 // degreeEnd
        );

This ends up with the whole 360deg arc being drawn instead.
I'd assume that the arguments are Math.floored and that causes the issue, but I don't see any info that only integers are accepted, Numeric sounds like floats should be also good
This limitation also prevents from  drawing thin, evenly placed markings around the circle since the least narrow can only be 1deg and infact for that I'd need to draw 0.0 - 0.5deg and then 359.5 - 360.0deg for the mark to be precisely at the 3 o'clock point.

So I think the docs or the function should be adjusted here.

https://developer.garmin.com/connect-iq/api-docs/Toybox/Graphics/Dc.html#drawArc-instance_function
  • But it doesn't solve the problem here.
    If I wanted 1 degree length arc to be centered at 0/360  and give it a width of 1 degree it is not possible with this function
    I'd need to give it half degree on the one side and half degree on the other while the smallest value possible seems to be 1 degree - so I'd get 1+1 = 2 degrees arc length here which is quite wide

  • I'm not saying there isn't a bug, but even if there is then the obvious workaround I'd try is to switch the direction