All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
PHP多文件上传类_[PHP教程]
解决方案:用户sa登录失败_[SQL,Server教程]
IIS6的PHP最佳配置方法_[PHP教程]
Silverlight,2(beta1)数据操作(1)——使用ASP.NET,Web,Service_[Asp.Net教程]
SQL中的DDL,DML,DCL语言_mssql学习_编程技术
数据库的备份与还原_[SQL,Server教程]
C#中Panel控件应用实例
打开delphi对话框组件(TOpenDialog)实例
用.NET,2.0压缩解压功能处理大型数据
ASP.NET实现页面间值传递的几种方法_[Asp.Net教程]
Reading number is top 10 pictures
The real super beauty10
中国的十元人民币的秘密
寒流来了
Steal to eat bacon bird
迷人的靓女
Earthquake hedge common sense
原子弹轰炸长崎的珍贵照片
The real super beauty14
职场回春术
我国房地产真相
Download software ranking
Unix video tutorial6
WebService在.NET中的实战应用教学视频 → 第2集
Sora aoi‘s film--Lust fan wall
都市狐狸姑娘传
jBuilder2006
matrix3
Boxer's Top ten classic battle1
美女写真3
The Bermuda triangle1
打鸟视频
delv published in(发表于) 2014/1/23 3:11:55 Edit(编辑)
ASP.NET开发经验(2):ASP.NET中的一些图形处理_[Asp.Net教程]

ASP.NET开发经验(2):ASP.NET中的一些图形处理_[Asp.Net教程]

ASP.NET开发经验(2) --- ASP.NET中的一些图形处理_[Asp.Net教程]

如果大家用过 SharePoint Portal Server 2001,一定会记得增加型文件夹中的一些很不错的特性,如文档检出/检入、发布、审批流程等,其中最吸引我的就是它通过在文档的图标上加一个特别的标记,来表示文档的状态,如下图所示:




自己在做文档管理系统时,也借鉴了这种做法,其实和给图片加水印的作法类似,主要代码如下:


//取源图像
Image imgPhoto = Image.FromFile(sSourceFile);
Bitmap bmPhoto = new Bitmap(imgPhoto.Width, imgPhoto.Height, PixelFormat.Format24bppRgb);
bmPhoto.MakeTransparent();
//设置绘图面属性,呈现质量等
Graphics grPhoto = Graphics.FromImage(bmPhoto);
grPhoto.SmoothingMode = SmoothingMode.AntiAlias;
grPhoto.DrawImage( imgPhoto, new Rectangle(0, 0, imgPhoto.Width, imgPhoto.Height), 0, 0, imgPhoto.Width, mgPhoto.Height, GraphicsUnit.Pixel);



//打开要附加的水印图片
Image imgWatermark = new Bitmap(sWatermarkFile);
Bitmap bmWatermark = new Bitmap(bmPhoto);
bmWatermark.SetResolution(imgPhoto.HorizontalResolution, imgPhoto.VerticalResolution);
Graphics grWatermark = Graphics.FromImage(bmWatermark);


int xPosOfWm = imgPhoto.Width - imgWatermark.Width;
int yPosOfWm = imgPhoto.Height - imgWatermark.Height;


//画
grWatermark.DrawImage(imgWatermark,
new Rectangle(xPosOfWm,yPosOfWm,imgWatermark.Width,imgWatermark.Height),
0,
0,
imgWatermark.Width,
imgWatermark.Height,
GraphicsUnit.Pixel);


//保存最终图片
imgPhoto = bmWatermark;
imgPhoto.Save(sIconFileName,ImageFormat.Png);


如果文档有审阅流程,那文档的流转图就非常受欢迎了,这样用户可以方便地查看文档正处于那个阶段。
其实与工作流有关软件可能都有这样要求,我目前没有找到更好的办法,利用

,将各个阶段
用线条和图形表示出来,办法虽有点笨,但好象显示效果还不错。




曾经试过 VML ,发现要动态地画这种图,就得很精确地控制屏幕上位置,比较麻烦,后来放弃了这种作法。


还曾经想用 Visio Automation 来试一下,发现 Visio 的对象模型和 VBA 比 Word 和 Excel 的难多了,工作量更大。


来源:moslem的blog








添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.