C#绘图
来源:互联网 发布:cocos2d x游戏源码 编辑:程序博客网 时间:2024/05/16 08:25
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 WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } Pen pen = null; //定义一个画笔pen Graphics g = null; //定义一个画布 Point p0, p1; //定义两个坐标点 private void Form1_Load(object sender, EventArgs e) { pen = new Pen(Color.Black); g = this.CreateGraphics(); } private void button1_Click(object sender, EventArgs e) { colorDialog1.ShowDialog(); pen.Color = colorDialog1.Color; } private void Form1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) p1 = e.Location; } private void Form1_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { p0 = p1; p1 = e.Location; g.DrawLine(pen, p0, p1);//实现画线 } } }}
0 0
- c#绘图
- C#绘图
- C#绘图
- c#绘图
- C#绘图
- C#绘图
- C# 绘图
- C#文字绘图源码
- 浅谈C#中的绘图!
- C#打印绘图
- c# GDI+简单绘图
- C# WinForm绘图相关
- C#的绘图
- c# GDI+简单绘图
- C#中的绘图
- c# GDI+简单绘图
- C# 鼠标绘图
- C# 双缓冲绘图
- [Perforce]password (P4PASSWD) invalid or unset. 的错误解决
- BZOJ 3212 Pku3468 A Simple Problem with Integers
- 微信连WiFi已OUT?
- ios数据持久化之数据库(SQLite)
- Cocos2d-x --Action (动作)
- C#绘图
- 在Android中使用WindowManager实现悬浮窗口
- 1-6q环视之采集,模拟摄像头,模拟电视
- ORACLE中的锁(oracle lock mode)
- 安装zookeeper集群
- jquery $.post ie获取不到返回值的解决方法
- 2-6q环视之采集,6q的pcie控制器
- UVa 156 - Ananagrams
- Cocos2d-x3.3RC0 Cpp-test分析之ActionManagerTest