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

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

asp+ 制作圖形

[摘要]/*豆腐制作 都是精品http://www.asp888.net 豆腐技術站如轉載 請保留版權信息*/這個程序經過修改 現在作計數器的話 只能做黑白的 計數器,誰有辦法 能夠做出 復雜的 圖形計數器...
/*
豆腐制作 都是精品
http://www.asp888.net 豆腐技術站
如轉載 請保留版權信息
*/
這個程序經過修改 現在作計數器的話 只能做黑白的 計數器,誰有辦法 能夠做出 復雜的 圖形計數器?
<% @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();
}
%>

作者:豆腐





主站蜘蛛池模板: 倩女还魂在线观看完整版免费 | 亚洲四虎 | 日韩国产在线播放 | 色偷偷亚洲男人天堂 | 最近最新中文字幕1页 | 夜夜爽一区二区三区精品 | 三级理论手机在线观看视频 | 日本高清免费在线 | 中文字幕在线有码高清视频 | 青草伊人网 | 亚洲欧美韩日 | 青草青青在线视频 | 婷婷狠狠干 | 屁屁影院在线播放 | 欧美亚洲国产专区在线app | 综合激情文学 | 天天做日日爱 | 日本黄色免费在线 | 片免费观看网站视频 | 中国女人一级做受免费视频 | 色综合天天综合给合国产 | 日韩欧美成人乱码一在线 | 天天操天天干天天爱 | 青草网在线观看 | 四色婷婷婷婷色婷婷开心网 | 四虎在线免费播放 | 涩涩涩丁香色婷五月网视色 | 日韩女人毛片在线播放 | 婷婷午夜| 婷婷夜夜躁天天躁人人躁 | 亚洲国产成人久久笫一页 | 日本一在线中文字幕天堂 | 青青青免费高清视频在线 | 日韩经典第一页 | 四虎永久免费地址在线网站 | 日韩a在线看免费观看视频 日韩a在线观看免费观看 | 亚洲午夜久久影院 | 午夜精品视频在线 | 天堂最新在线资源 | 色噜噜狠狠色综合免费视频 | 日本黄色片网址 |