我没有多的分呀,遇到了一个问题自己实在不明白,求高手指点
private void Form1_Paint(object sender, PaintEventArgs e){
Graphics gobj = this.CreateGraphics();
float f = 0.0F;
float x1, y1, x2, y2;
Rectangle rec1 = new Rectangle(145, -100, 200, 200);
gobj.DrawArc(Pens.Blue, rec1, 90.0F + f, 90.0F - f);
rec1 = new Rectangle(195, -50, 100, 100);
gobj.DrawArc(Pens.Blue, rec1, 90.0F + f, 90.0F - f);
y1 = 100.0F * (float)Math.Cos(f);
x1 = 100.0F * (1.0F - (float)Math.Sin(f)) + 145.0F;
y2 = 50.0F * (float)Math.Cos(f);
x2 = 50.0F * (1.0F - (float)Math.Sin(f)) + 195.0F;
gobj.DrawLine(Pens.Blue, x1, y1, x2, y2);
}
此时所作图形为圆环实现了封口没问题,可当我将f变为 f=45.0 或30.0或者为其他数时 封口的直线不能实现封口了, 有时跟圆环都不挨着了,实在想不明白,求各位高手大侠指点下呀,多谢啦