六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺!

asp+ 制作圖形

[摘要]/*豆腐制作 都是精品http://www.asp888.net 豆腐技術(shù)站如轉(zhuǎn)載 請保留版權(quán)信息*/這個(gè)程序經(jīng)過修改 現(xiàn)在作計(jì)數(shù)器的話 只能做黑白的 計(jì)數(shù)器,誰有辦法 能夠做出 復(fù)雜的 圖形計(jì)數(shù)器...
/*
豆腐制作 都是精品
http://www.asp888.net 豆腐技術(shù)站
如轉(zhuǎn)載 請保留版權(quán)信息
*/
這個(gè)程序經(jīng)過修改 現(xiàn)在作計(jì)數(shù)器的話 只能做黑白的 計(jì)數(shù)器,誰有辦法 能夠做出 復(fù)雜的 圖形計(jì)數(shù)器?
<% @Page Language="C#" %>
<% @Import Namespace="System.Drawing" %>
<% @Import Namespace="System.IO" %>
<% @Import Namespace="System.Drawing.Imaging" %>
<%
Response.Expires = 0;
Bitmap newBitmap = null;
Graphics g = null ;
string str2Render = Request.QueryString.Get("HitCount");
if (null == str2Render) str2Render = "12345";
string strFont = Request.QueryString.Get("HitFontName");
if (null == strFont) strFont = "楷體_GB2312";
int nFontSize = 12;
try
{
nFontSize = Request.QueryString.Get("HitFontSize").ToInt32();
}
catch
{
// do nothing, just ignore
}

string strBackgroundColorname = Request.QueryString.Get("HitBackgroundColor");
Color clrBackground = Color.White;
try
{
if (null != strBackgroundColorname)
clrBackground = ColorTranslator.FromHTML(strBackgroundColorname);
}
catch
{
}

string strFontColorName = Request.QueryString.Get("HitFontColor");
Color clrFont = Color.Black;
try
{
// Format in the URL: %23xxXXxx
if (null != strFontColorName)
clrFont = ColorTranslator.FromHTML(strFontColorName);
}
catch
{
}

try
{
Font fontCounter = new Font(strFont, nFontSize);
newBitmap = new Bitmap(1,1,PixelFormat.Format32bppARGB);
g = Graphics.FromImage(newBitmap);
SizeF stringSize = g.MeasureString(str2Render, fontCounter);
int nWidth = (int)stringSize.Width;
int nHeight = (int)stringSize.Height;
g.Dispose();
newBitmap.Dispose();
newBitmap = new Bitmap(nWidth,nHeight,PixelFormat.Format32bppARGB);
g = Graphics.FromImage(newBitmap);
g.FillRectangle(new SolidBrush(clrBackground), new Rectangle(0,0,nWidth,nHeight));
g.DrawString(str2Render, fontCounter, new SolidBrush(clrFont), 0, 0);
MemoryStream tempStream = new MemoryStream();
newBitmap.Save(tempStream,ImageFormat.GIF);
Response.ClearContent();
Response.ContentType = "image/GIF";
Response.BinaryWrite(tempStream.ToArray());
Response.End();
}
catch (Exception e)
{
Response.Write(e.ToString());
}
finally
{
if (null != g) g.Dispose();
if (null != newBitmap) newBitmap.Dispose();
}
%>

作者:豆腐





標(biāo)簽:asp+ 制作圖形 
主站蜘蛛池模板: 首页国产精品萌社区 | 日韩欧美成人乱码一在线 | 亚洲精品国产精品乱码不卞 | 在线资源站 | 丝袜美女啪啪 | 日日干影院 | 伊人蕉| 天天操天天爽天天射 | 日韩精品魔镜号系列在线观看 | 色精品一区二区三区 | 欧美视频免费 | 色吊丝性永久免费看码 | 亚洲福利一区二区三区 | 四虎sihu新版影院亚洲精品 | 中文字幕在线观看日本 | 亚洲天堂2014 | 日本高清视频一区二区 | 亚洲看看| 天天搞天天色 | 又大又爽又粗免费视频 | 日本中文在线视频 | 日韩视频在线免费观看 | 亚洲欧美日韩一区成人 | 色悠久久久久综合欧美99 | 日本亚洲一区二区三区 | 综合激情文学 | 亚洲欧美一区二区三区麻豆 | 午夜三级理论在线观看视频 | 欧美视频一区二区三区 | 四虎最新永久在线精品免费 | 亚洲激情视频在线播放 | 伊人影院视频 | 四虎hu| 日韩成人黄色片 | 四虎在线免费观看视频 | 日本一区二区三区在线 视频观看免费 | 秋霞在线播放 | 日本视频在线免费 | 香蕉久久夜色精品国产小优 | 色偷偷91综合久久噜噜 | 天天欲色 |