C#里面的画圆和画其他几何图形的函数

学习 时间:2026-08-24 19:35:05 阅读:8968
C#里面的画圆和画其他几何图形的函数还有怎么画直线比如在VB里面是LINE(0,0)-(0,5)就是连接(0,0)和(0,5)两点的直线

最佳回答

强健的金鱼

纯情的树叶

2026-08-24 19:35:05

全部都由System。Drawing。Graphics 的实例来完成,具体请参考MSDN举例如下,画直线:public void DrawLinePoint(PaintEventArgs e){// Create pen。Pen blackPen = new Pen(Color。Black,3);// Create points that define line。Point point1 = new Point(100,100);Point point2 = new Point(500,100);// Draw line to screen。e。Graphics。DrawLine(blackPen,point1,point2);}

最新回答共有2条回答

  • 曾经的烤鸡
    回复
    2026-08-24 19:35:05

    全部都由System。Drawing。Graphics 的实例来完成,具体请参考MSDN举例如下,画直线:public void DrawLinePoint(PaintEventArgs e){// Create pen。Pen blackPen = new Pen(Color。Black,3);// Create points that define line。Point point1 = new Point(100,100);Point point2 = new Point(500,100);// Draw line to screen。e。Graphics。DrawLine(blackPen,point1,point2);}

上一篇 马克思哲学的错误的推论与正确的推论与现实互相映射形成的唯物和唯心的不同诠释,谁能告诉我这个答案?

下一篇 鱼肠剑 是什么剑?