asp.net 在一个图片上画图,然后显示 100

 我来答
shrimp_liao
2011-11-14 · TA获得超过256个赞
知道小有建树答主
回答量:395
采纳率:0%
帮助的人:275万
展开全部
这是一个画 9*9 乘法表的 和你要的类似你看看吧
System.Drawing.Bitmap image = new System.Drawing.Bitmap(600,250);
Graphics g = Graphics.FromImage(image);
try
{
int x = 5;
int y = 50;
//清空图片背景色
g.Clear(Color.White);
Font font = new System.Drawing.Font("Arial", 12, (System.Drawing.FontStyle.Bold));
System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Blue, Color.DarkRed, 1.2f, true);
g.DrawString("九九乘法歌诀", font, brush,200, 5);
g.DrawLine(new Pen(Color.Silver), 0, 30, 600, 30);
for (int i = 1; i <= 9; i++)
{
for (int j = 1; j <= i; j++)
{
string str = j + "×" + i + "=" + j * i + " ";
g.DrawString(str, font, brush,x, y);
x = x + str.Length + 60;
}
y = y + 20;
x = 5;
}
//画图片的边框线
g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/Gif";
Response.BinaryWrite(ms.ToArray());
}
finally
{
g.Dispose();
image.Dispose();
}
btcw03
2011-11-14 · TA获得超过349个赞
知道答主
回答量:376
采纳率:0%
帮助的人:214万
展开全部
z-index属性。
div 里面有,外面套个div
请参考
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
淡聆_
2011-11-14 · 超过10用户采纳过TA的回答
知道答主
回答量:46
采纳率:0%
帮助的人:22.3万
展开全部
问题不够详细
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式