C#中简单的绘图
来源:互联网 发布:跑跑卡丁车淘宝好便宜 编辑:程序博客网 时间:2024/05/22 09:05
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace picture2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = this.CreateGraphics();
Pen Mypen = new Pen(Color.Blue);
g.DrawLine(Mypen, 1, 50, 100, 50);
Point p1=new Point (50,1);
Point p2=new Point (50,100);
g.DrawLine (Mypen ,p1,p2 );
g.DrawEllipse(Mypen ,30,5,150,150);
Rectangle rect = new Rectangle(5,20,220,30);
g.DrawEllipse(Mypen ,rect);
Rectangle recte = new Rectangle(85, 1, 165, 40);
g.DrawArc(Mypen ,recte ,0,90);
Rectangle recta = new Rectangle(85, 1, 165, 40);
g.DrawPie(Mypen ,recta ,0,90);
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace picture2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = this.CreateGraphics();
Pen Mypen = new Pen(Color.Blue);
g.DrawLine(Mypen, 1, 50, 100, 50);
Point p1=new Point (50,1);
Point p2=new Point (50,100);
g.DrawLine (Mypen ,p1,p2 );
g.DrawEllipse(Mypen ,30,5,150,150);
Rectangle rect = new Rectangle(5,20,220,30);
g.DrawEllipse(Mypen ,rect);
Rectangle recte = new Rectangle(85, 1, 165, 40);
g.DrawArc(Mypen ,recte ,0,90);
Rectangle recta = new Rectangle(85, 1, 165, 40);
g.DrawPie(Mypen ,recta ,0,90);
}
}
}
0 0
- C#中简单的绘图
- c# GDI+简单绘图
- c# GDI+简单绘图
- c# GDI+简单绘图
- c# GDI+简单绘图
- c# GDI+简单绘图
- C# GDI+ 简单绘图
- c# GDI+简单绘图
- C# GDI+简单绘图
- C# GDI+ 简单绘图
- C# GDI+ 简单绘图
- C# GDI+ 简单绘图
- C# GDI+ 简单绘图
- C# GDI+简单绘图
- c#简单绘图
- c# GDI+简单绘图
- Android FrameBuffer 中绘图的简单例子
- C# WinForm简单绘图(绘图知识)
- ARM常用汇编指令
- poj 3253
- GAE上部署micolog
- MySQL 存储过程的基本用法
- OpenGL使用混合来实现半透明效果 .
- C#中简单的绘图
- 英语宾语从句 引导词的选择
- 一步步学习微软InfoPath2010和SP2010--第三章节--表单设计基础:处理InfoPath布局、控件和视图(5)--理解数据绑定的基础
- Thrift python服务端出错 解决方法
- Apache Hadoop 2.3.0 Released!
- poj 2739
- 第四周作业
- gcc的__attribute__编译属性
- POJ 2531