Rectangle rec=new Rectangle(imgLeft1,imgTop1,(int)imgWidth1,(int)imgHeight1);
里面的参数 只能是int
里面的参数 只能是int
解决方案 »
- dataGridView多选删除
- C#自定义泛型类是不是引用类型?
- C# 将MessageBox显示为英文版的
- 菜鸟请教内存分配情况,不知道我理解的对不对?
- 发布在几个常用的正则表达式~~ 大家来接着发
- 如何在ListView里面实现内容部分变红
- 我定义了一个DataTable类型,并添加了些数据,但不知怎么修改,望指教!
- 關於CONTINUE問題
- OpenXml 多列折叠与展开
- 比QQ 远程协助快N倍的远程控制软件
- 关于System.EnterpriseServices.ServicedComponent的问题
- 我想把给datagrid的数据源datatable(从数据库取来)添加的列放到第一列怎么做?
(imgLeft,imgTop,imgWidth,imgHeight);
这4个参数应该没有问题了啊
(imgLeft,imgTop,imgWidth,imgHeight);
这4个参数应该没有问题了啊这样不行 这只能画水平放置的矩形 而我需要任意角度的
double angle_1 = RectAllStru.Alpha[0,i];
double angle_2 = Math.Acos((2*onacross*onacross-RectAllStru.la[i]*RectAllStru.la[i])/(2*onacross*onacross));
double angle_3 = Math.Acos((2*onacross*onacross-RectAllStru.sa[i]*RectAllStru.sa[i])/(2*onacross*onacross)); Point point1 = new Point((int)CorChange(1,RectAllStru.rbase[i],RectAllStru.cx[0,i]+onacross*Math.Cos(angle_1)),(int)CorChange(2,RectAllStru.rbase[i],RectAllStru.cy[0,i]+onacross*Math.Sin(angle_1)));
Point point2 = new Point((int)CorChange(1,RectAllStru.rbase[i],RectAllStru.cx[0,i]+onacross*Math.Cos(angle_1+angle_2)),(int)CorChange(2,RectAllStru.rbase[i],RectAllStru.cy[0,i]+onacross*Math.Sin(angle_1+angle_2)));
Point point3 = new Point((int)CorChange(1,RectAllStru.rbase[i],RectAllStru.cx[0,i]+onacross*Math.Cos(angle_1+angle_2+angle_3)),(int)CorChange(2,RectAllStru.rbase[i],RectAllStru.cy[0,i]+onacross*Math.Sin(angle_1+angle_2+angle_3)));
Point point4 = new Point((int)CorChange(1,RectAllStru.rbase[i],RectAllStru.cx[0,i]+onacross*Math.Cos(angle_1+2*angle_2+angle_3)),(int)CorChange(2,RectAllStru.rbase[i],RectAllStru.cy[0,i]+onacross*Math.Sin(angle_1+2*angle_2+angle_3))); Point[] curvePoints = {point1,point2,point3,point4}; dc.DrawPolygon(BlackPen,curvePoints);注:其实int的影响并不大,我试过了,可以忽略