本文介绍了Graphics.MeasureString精度问题...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在使用此代码

Hai all,


I am using this code

int x=int w =Convert.ToInt32(Math.Ceiling(g.MeasureString("My string", s).Width));
//f is the object of Font
//g is the object of Graphics



但是我在x中得到的值并非一直都是准确的,它的值交替变化...

我该如何解决这个问题...

请帮助...



but the value I am getting in x is not accurate all time, Its value is changing alternately...

How can I solve this problem...

Please help...

推荐答案


这篇关于Graphics.MeasureString精度问题...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 14:02