资源简介
C#GDI绘图_BitMapDemo.rar

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;
namespace BitMapDemo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private bool flag = true;
private void button1_Click(object sender EventArgs e)
{
timer1.Enabled = true;
}
private void button2_Click(object sender EventArgs e)
{
timer1.Enabled = false;
}
private void timer1_Tick(object sender EventArgs e)
{
DateTime t1 = DateTime.Now;
Graphics g = this.CreateGraphics();
LinearGradientBrush brush;
if (flag)
{
brush = new LinearGradientBrush(new PointF(0.0f 0.0f)
new PointF(700.0f 300.0f) Color.Red Color.Blue);
flag = false;
}
else
{
brush = new LinearGradientBrush(new PointF(0.0f 0.0f)
new PointF(700.0f 300.0f) Color.Blue Color.Red);
flag = true;
}
for (int j = 0; j < 60; j++)
{
for (int i = 0; i < 60; i++)
{
g.FillEllipse(brush i * 10 j * 10 10 10);
}
}
DateTime t2 = DateTime.Now;
TimeSpan sp = t2 - t1;
float per = 1000 / sp.Milliseconds;
this.label1.Text = “速度:“ + per.ToString() + “帧/秒“;
}
private void button3_Click(object sender EventArgs e)
{
timer2.Enabled = true;
}
private void timer2_Tick(object sender EventArgs e)
{
DateTime t1 = DateTime.Now;
//双缓冲内存中建图--从程序到内存,从内存到显存,显存到屏幕
Bitmap bt = new Bitmap(600 600);
Graphics g = Graphics.FromImage(bt);
LinearGradientBrush brush;
if (flag)
{
brush = new LinearGradientBrush(new PointF(0.0f 0.0f)
new PointF(700.0f 300.0f) Color.Red Color.Blue);
flag = false;
}
else
{
brush = new LinearGradientBrush(new PointF(0.0f 0.0f)
new PointF(700.0f 300.0f) Color.Blue Color.Red);
flag = true;
}
for (int j = 0; j < 60; j++)
{
for (int i = 0; i < 60; i++)
{
g.FillEllipse(brush i * 10 j * 10 10 10);
}
}
this.CreateGraphics().DrawImage(bt 0 0);
DateTime t2 = DateTime.Now;
TimeSpan sp = t2 - t1;
float
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3227 2009-02-17 14:41 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\BitMapDemo.csproj
文件 3277 2009-02-19 16:42 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Form1.cs
文件 5088 2009-02-17 15:13 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Form1.Designer.cs
文件 6203 2009-02-17 15:13 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Form1.resx
文件 469 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Program.cs
文件 1192 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Properties\AssemblyInfo.cs
文件 2874 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Properties\Resources.Designer.cs
文件 5612 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Properties\Resources.resx
文件 1093 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Properties\Settings.Designer.cs
文件 249 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo\Properties\Settings.settings
文件 919 2009-02-17 14:38 C#GDI绘图_BitMapDemo\Backup\BitMapDemo.sln
..A..H. 16384 2009-07-28 23:09 C#GDI绘图_BitMapDemo\Backup\BitMapDemo.v12.suo
文件 10752 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\bin\Debug\BitMapDemo.exe
文件 30208 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\bin\Debug\BitMapDemo.pdb
文件 22704 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\bin\Debug\BitMapDemo.vshost.exe
文件 490 2013-03-18 17:00 C#GDI绘图_BitMapDemo\BitMapDemo\bin\Debug\BitMapDemo.vshost.exe.manifest
文件 3535 2019-11-12 13:45 C#GDI绘图_BitMapDemo\BitMapDemo\BitMapDemo.csproj
文件 3277 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\Form1.cs
文件 5668 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\Form1.Designer.cs
文件 6203 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\Form1.resx
文件 289 2009-07-28 23:08 C#GDI绘图_BitMapDemo\BitMapDemo\obj\BitMapDemo.csproj.FileList.txt
文件 1842 2009-02-19 16:06 C#GDI绘图_BitMapDemo\BitMapDemo\obj\BitMapDemo.csproj.FileListAbsolute.txt
文件 938 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.csproj.FileListAbsolute.txt
文件 847 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.csproj.GenerateResource.Cache
文件 1341 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.csprojResolveAssemblyReference.cache
文件 10752 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.exe
文件 180 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.Form1.resources
文件 30208 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.pdb
文件 180 2019-11-12 13:46 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\BitMapDemo.Properties.Resources.resources
文件 791 2019-11-12 13:45 C#GDI绘图_BitMapDemo\BitMapDemo\obj\Debug\DesignTimeResolveAssemblyReferences.cache
............此处省略27个文件信息
- 上一篇:C#GDI绘图_绘制图形.rar
- 下一篇:C#GDI绘图_设置笔刷.rar
相关资源
- 020ASP.NET车辆综合管理系统.zip
- C# TcpListener 例程(源码)
- C# 内嵌其他exe窗体的完美封装
- PDF文件 阅读控件 (VeryPDF PDFView OCX)
- C#自定义控件案例--美化GroupBox.rar
- BouncyCastle C#源码
- C#高级编程(第10版) 百度网盘资源
- Unity5实战:使用C#和Unity开发多平台游
- zw_ASP.NET通用权限管理系统源代码含文
- 24652561RevitWPFAddin.zip
- ASP.NET网站建设实战--人民邮电出版社
- 传智播客ASP.NET[特供第三季].txt
- Winform通用经典快速开发CS框架-outloo
- C#爬取音乐源码.zip
- Rudin著第一册—阅读密码www.zasp.net_仅
- PracticalWPFChartsandGraphics.rar
- cb-9X-C#winform实现PDF阅读功能.rar
- sU-WV-C#比赛记时软件.rar
- u5-TW-C#打印操作--使用GDI绘图打印学生
- z1_C#打印操作--使用GDI绘图打印学生信
- C#打印操作--使用GDI绘图打印学生信息
- asp.net网上教学系统全站程序.zip
- C#管理学生考勤及作业登记系统
- 2321363LearnWPFMVVM-XAMLCandtheMVVMpattern.pdf
- 商品销售管理系统C#源码
- 松下PLC与C#上位机通讯库含程序.rar
- C#图书管理系统.rar
- C#基于BouncyCastle.Crypto的SM2_3实现导入即
- zw_WPF_开发教程(_中文版).zip
- asp.net进销存系统源码.rar
评论
共有 条评论