The arc graph?

I am a beginner and need help. How do I draw an arc graph? The function must be similar to clock hands, but I do not know how to keep rendered all the steps. Someone help me? How do I edit this?function drawArc(dc, angle, length, width)
{
var coords = [[-width, -(length)*8/10], [-width, -(length)],[width, -length],[width, -(length)*8/10]];
var result = new [coords.size()];

var centerX = dc.getWidth()*3/10;
var centerY = 130;

var cos = Math.cos(angle);
var sin = Math.sin(angle);


for (var i = 0; i < coords.size(); i +=1 )
{
var x = (coords[0] * cos) - (coords[1] * sin);
var y = (coords[0] * sin) + (coords[1] * cos);
result= [ centerX+x, centerY+y];
}

dc.fillPolygon(result);

}[/CODE]
  • Thanks for your time. Your function is elegant, but there are little things that do not make sense to me. I'm not a programmer and do not know any. Perhaps someone will help your instructions. I'll hope that programmers from Garmin will create sample for people like me :-)
  • Former Member
    Former Member over 10 years ago
    Thanks for your time. Your function is elegant, but there are little things that do not make sense to me. I'm not a programmer and do not know any. Perhaps someone will help your instructions. I'll hope that programmers from Garmin will create sample for people like me :-)


    I know you're not a programmer, but you really keep surprising me with beautifully designed watch faces!
  • Thanks for this piece of code Travis