110,549
社区成员
发帖
与我相关
我的任务
分享
private SizeF GetTextBounds(Font font,string txt)
{
Bitmap bmp = new Bitmap(1,1);
using(Graphics g = Graphics.FromImage(bmp))
{
SizeF size = g.MeasureString(font,txt);
return size;
}
}
手敲的,可能有些错误,自己修正下。