how can i calculate width and height of a string when i draw that in a bitmap???
String s="how are you?";
Sraphic boxgraphic;
Bitmap box;
boxgrpahic=Graphic.fromimage(box);
boxgraphic.DrawString(s, new Font("Arial", 10pt), new SolidBrush(Color.black), new Point(0,0));
i have a table from conversions of pt to pixel but that not a Formula……
in the an other question,answered to this question but that’s do’t work currectly..
Points = Pixels * 72 / 96
how can find width of drew string by pixel(Formula)?
Use
graphic.MeasureString(s, new Font("Arial", 10pt)).You can also add a
StringFormat.GenericTypographicparameter to be more accurate.