下面的样子就得到刻度了啊,就是刻度丑陋点
for (int j = 0; j <=60; j++)//60个针
{
len = (j % 5 == 0) ? 2 : 1;
double x1 = r * Math.Sin(2.0 * PI * j/ 60.0) + r ;
double y1 = r - r * Math.Cos(2.0 * PI * j / 60.0);
double x2 = r * Math.Sin(2.0 * PI * j / 60.0) + r + len ;
double y2 = r - r * Math.Cos(2.0 * PI * j / 60.0) + len;
Pen kedu = new Pen(Color.Black, (j % 5 == 0) ? 4 : 2);
formGraphics.DrawLine(kedu,(float)x1, (float)y1, (float)x2, (float)y2);
}
for (int j = 0; j <=60; j++)//60个针
{
len = (j % 5 == 0) ? 2 : 1;
double x1 = r * Math.Sin(2.0 * PI * j/ 60.0) + r ;
double y1 = r - r * Math.Cos(2.0 * PI * j / 60.0);
double x2 = r * Math.Sin(2.0 * PI * j / 60.0) + r + len ;
double y2 = r - r * Math.Cos(2.0 * PI * j / 60.0) + len;
Pen kedu = new Pen(Color.Black, (j % 5 == 0) ? 4 : 2);
formGraphics.DrawLine(kedu,(float)x1, (float)y1, (float)x2, (float)y2);
}
海鸽 is My Lover!!