Complete
over 4 years ago

WERETECH-8292

This just has to make it's way into firmware now.

Rending Issue in dc.drawArc() with large arc radius

There is an issue where arcs are rendered incorrectly when using a radius of 256 or greater. There is no mention in the documentation of a maximum supported radius value. This is easily reproduced in the simulator and on physical devices using SDK 3.1.6 and earlier.

The following is an example which should produce 4 similar concentric arcs, but the two larger ones have gaps in them as shown in the screenshot:

function onUpdate(dc) {
	dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_TRANSPARENT);
	dc.setPenWidth(10);
	
	dc.drawArc(350, 200, 220, Graphics.ARC_CLOCKWISE, 190, 150); 		// Renders fine (radius < 256)
    dc.drawArc(350, 200, 250, Graphics.ARC_CLOCKWISE, 190, 150); 		// Renders fine (radius < 256)   		
	dc.drawArc(350, 200, 280, Graphics.ARC_CLOCKWISE, 190, 150); 		// Incorrect display (radius >= 256) 
	dc.drawArc(350, 200, 310, Graphics.ARC_CLOCKWISE, 190, 150); 		// Incorrect display (radius >= 256) 
}

Parents
  • Former Member
    Former Member over 4 years ago

    Thanks for the report. As you might suspect based on what you're seeing here, there is an overflow occurring in the arc rendering code in our graphics engine. There isn't an easy to pin down limit on radius because it also relates to the location of the center point and the actual drawing location of the arc. I've corrected the issue, but I don't know what kind of timeline devices will be on to pull in the fix from the engine and get updates out.

Comment
  • Former Member
    Former Member over 4 years ago

    Thanks for the report. As you might suspect based on what you're seeing here, there is an overflow occurring in the arc rendering code in our graphics engine. There isn't an easy to pin down limit on radius because it also relates to the location of the center point and the actual drawing location of the arc. I've corrected the issue, but I don't know what kind of timeline devices will be on to pull in the fix from the engine and get updates out.

Children