Graphics DrawString 画出字体怎么不一样大啊?
privatevoidDrawText(){GraphicsobjGraphics;objGraphics=Graphics.FromImage(PicCommon);o...
private void DrawText()
{
Graphics objGraphics;
objGraphics = Graphics.FromImage(PicCommon);
objGraphics.DrawString(_text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics = Graphics.FromImage(PicDown);
objGraphics.DrawString(_text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics = Graphics.FromImage(PicEnter);
objGraphics.DrawString(_text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics.Dispose();
}
private void DrawText(Image image,string text)
{
Graphics objGraphics;
objGraphics = Graphics.FromImage(image);
objGraphics.DrawString(text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics.Dispose();
}
同样的方法复制出来。但是它就是不一样大。很奇怪。 展开
{
Graphics objGraphics;
objGraphics = Graphics.FromImage(PicCommon);
objGraphics.DrawString(_text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics = Graphics.FromImage(PicDown);
objGraphics.DrawString(_text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics = Graphics.FromImage(PicEnter);
objGraphics.DrawString(_text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics.Dispose();
}
private void DrawText(Image image,string text)
{
Graphics objGraphics;
objGraphics = Graphics.FromImage(image);
objGraphics.DrawString(text, new Font("Courier New", 11), new SolidBrush(Color.Black), 30, 11);
objGraphics.Dispose();
}
同样的方法复制出来。但是它就是不一样大。很奇怪。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询