C# 通过Graphics.DrawString在图片上写文字为什么会有阴影呢?
代码如下:privateBitmapTest(stringtext){Bitmapimg=newBitmap(100,50);Graphicsgraphics=Graph...
代码如下:
private Bitmap Test(string text) { Bitmap img = new Bitmap(100, 50); Graphics graphics = Graphics.FromImage(img); SizeF font_size = graphics.MeasureString(text, viewFont);
graphics.FillRectangle(Brushes.White, new Rectangle(0, 0, 100, 50)); graphics.DrawString(text, viewFont, Brushes.Black, new PointF(0, 0));
graphics.Dispose();
return img; }
显示效果如下:
求问如何去掉文字的阴影部分,多谢! 展开
private Bitmap Test(string text) { Bitmap img = new Bitmap(100, 50); Graphics graphics = Graphics.FromImage(img); SizeF font_size = graphics.MeasureString(text, viewFont);
graphics.FillRectangle(Brushes.White, new Rectangle(0, 0, 100, 50)); graphics.DrawString(text, viewFont, Brushes.Black, new PointF(0, 0));
graphics.Dispose();
return img; }
显示效果如下:
求问如何去掉文字的阴影部分,多谢! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询