(C#) GDI+简单绘图画直线
来源:互联网 发布:算法入门经典 刘汝佳 编辑:程序博客网 时间:2024/04/29 11:33
GDI+:Graphics Device InterfacePlus也就是图形设备接口,提供了各种丰富的图形图像处理功能;在C#.NET中,使用GDI+处理二维(2D)的图形和图像,使用DirectX处理三维(3D)的图形图像,图形图像处理用到的主要命名空间是System.Drawing:提供了对GDI+基本图形功能的访问,主要有Graphics类、Bitmap类、从Brush类继承的类、Font类、Icon类、Image类、Pen类、Color类等.
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 _10._2._1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { //DrawOne(e.Graphics); } private void DrawOne(Graphics g) { //Graphics g = e.Graphics; g = this.CreateGraphics(); Pen pen1 = new Pen(Color.Green, 5); Point[] points = { new Point(100,20), new Point(100,80), new Point(140,20), new Point(200,200) }; g.DrawLines(pen1, points); } private void button1_Click(object sender, EventArgs e) { Graphics g = this.CreateGraphics(); DrawOne(g); } }}
- (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+简单绘图(1)
- c# GDI+简单绘图(2)
- C# GDI+ 简单绘图(3)
- c# GDI+简单绘图(4)
- c# GDI+简单绘图(一)
- c# GDI+简单绘图(二)
- postgresql拼凑时间戳
- PHP之cURL实例详解
- 使用compiler.jar压缩代码
- rfkill - RF kill switch support (翻译)
- trolltech
- (C#) GDI+简单绘图画直线
- MyEclipse Profile 结合visualvm 监控内存泄露
- dede编辑文章不更新时间的方法
- BlockingQueue详解
- 【贪心】活动安排问题
- Android camera libcamera动态库实现流程总结
- java中UDP编程
- PHP给字符串变量特定位置加特定的字符串
- Android 4.0 Camera架构分析之preview和takePicture