質問です。
static int deg = 90;
const double rad = 0.0174532925;
const int r = 200;
private void button1_Click(object sender, EventArgs e)
{
int r = 200;
int x, y;
Graphics g = pictureBox1.CreateGraphics();
g.FillEllipse(fillbrush, 250, 20, 400, 400);
x = (int)(r * Math.Cos(deg * rad) + 450);
y = (int)(-r * Math.Sin(deg * rad) + 220);
g.DrawLine(mypen, 450, 220, x, y);
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
Graphics g = pictureBox1.CreateGraphics();
deg = deg - 12;
if (deg >= -270){
int x1 = (int)(r * Math.Cos(deg * rad) + 450);
int y1 = (int)(-r * Math.Sin(deg * rad) + 220);
g.DrawLine(mypen, 450, 220, x1, y1);
}
if (deg == -270)
timer1.Enabled = false;
}
のような感じで30秒で一周するタイマーを作ったのですが、
コレを線でなく扇型でぬりつぶしていく良い方法は無いでしょうか?