大家帮忙看段代码。。。

juenice 2010-11-30 11:11:00
private Image GetImage(string menuItemText)
{
Bitmap image = new Bitmap(menuItemText.Length, 22);
string strConst = menuItemText.Substring(0, menuItemText.IndexOf("/[") + 1);
string strAvailablePool = menuItemText.Substring(menuItemText.IndexOf("/[") + 1);
//strConst 在图片上显示黑色
//strAvailablePool在图片上显示红色
//图片背景颜色Color.AliceBlue
return image;
}

大家帮忙,完成代码里面三句注释的实现。。。
...全文
86 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
边城的刀声 2010-11-30
  • 打赏
  • 举报
回复
//图片背景颜色Color.AliceBlue
Graphics graphics = Graphics.FromImage(image);
graphics.Clear(Color.AliceBlue); //设置背景色
whycom 2010-11-30
  • 打赏
  • 举报
回复
Graphics g = Graphics.FromImage(img);
g.FillRectangle(Brushes.AliceBlue,new Rectangle(0,0,img.Width,img.Height);

g.DrawString(str1, Font, Brushes.Red.point);
g.DrawString(str2,Font,Brushes.Black,poing1)
Teng_s2000 2010-11-30
  • 打赏
  • 举报
回复
a785126172 2010-11-30
  • 打赏
  • 举报
回复
都回答完了··学习下

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧