最近在做用TextureBrush纹理画刷去填充斜线,还请高手帮忙解决啊
解决方案 »
- Excel格式比较乱我要用C#导出来该怎么操作
- 菜鸟问题:使用API函数SetParent之后无法显示ToolTip气泡-50分
- 怎么学好 SilverLight???
- 如何实现拖动图片到我设计的图片浏览器程序里,程序就会把这个图片打开?
- 关于c#打印证件问题
- C# 基于HTTP的下载
- C#中如何把struct存入到SqlServer数据库中呀?
- spring如何配置
- 再散100分!终于离开软件行业了,散分给还在里面挣扎的朋友们!
- 关于menuItem的OwnDraw问题!
- 利用socket接收和发送消息,程序有问题,请帮忙解决
- winform Access数据库中的表绑定到datagridview出错
string strShowTip = "xxxxxxxxxx Demo";
Font f = new Font(this.Font.FontFamily, 48F, FontStyle.Bold);
SizeF size = e.Graphics.MeasureString(strShowTip, f);
TextureBrush brush = null;
if (this.BackgroundImage == null)
{
Bitmap bmp = new Bitmap(50, 50, PixelFormat.Format24bppRgb);
// 自绘一幅图片或提取现有图片
this.DrawShadow(Graphics.FromImage(bmp));
brush = new TextureBrush(bmp, WrapMode.Tile);
}
else
{
brush = new TextureBrush(this.BackgroundImage, WrapMode.Clamp);
}
e.Graphics.DrawString(strShowTip, f, Brushes.Gold, this.m_MdiClient.Width - size.Width - 21, this.m_MdiClient.Height - size.Height - 21);
if (this.BackgroundImage == null)
{
e.Graphics.DrawString(strShowTip, f, Brushes.SaddleBrown, this.m_MdiClient.Width - size.Width - 19, this.m_MdiClient.Height - size.Height - 19);
}
e.Graphics.DrawString(strShowTip, f, brush, this.m_MdiClient.Width - size.Width - 20, this.m_MdiClient.Height - size.Height - 20);