为什么没人帮我解答呀!!小弟刚接触C#,遇到了疑问实在想不明白,求高人指点 本帖最后由 wxz86982782 于 2011-09-20 23:58:37 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我知道了,是你的角度没有换算。 private void Form1_Paint(object sender, PaintEventArgs e) { Graphics gobj = this.CreateGraphics(); float f = 30.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); f = f * (float)Math.PI / 180; // 你少了这句 角度转弧度 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); } TFS签出错误 多窗体切换的小问题 求 红皮《C#入门经典电子书》 急急急急急急!c#发邮件问题 C#里如何分别取得ConnectionString里的属性值 范型的问题 C# 中怎么实现按钮定位 请问C#中如何设置坐标的映射模式?像C++中的SetMapMode一样? 简单问题,我想不通,类实例不调用方法可以使方法执行? 如何得到网络文件大小(未下载文件前),如何断点传续 VS2010在64位系统下运行程序时无法掉用到32位oracle的数据 tableLayoutPanel动态添加行
{
Graphics gobj = this.CreateGraphics();
float f = 30.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); f = f * (float)Math.PI / 180; // 你少了这句 角度转弧度 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);
}