GraphicsPath.AddString vs Graphics.MeasureString
C#
2
Posts
2
Posters
0
Views
1
Watching
-
hi why does this fonction don't retrieve the same result as Graphics.MeasureString ? public RectangleF MeasureString (string str,Font f) { using (GraphicsPath gp = new GraphicsPath()) { gp.AddString(str,f.FontFamily,(int)f.Style,(300 / 72) * f.Size,new Point(0,0),new StringFormat()); // i'm using 300 dpi return gp.GetBounds(); } }
-
hi why does this fonction don't retrieve the same result as Graphics.MeasureString ? public RectangleF MeasureString (string str,Font f) { using (GraphicsPath gp = new GraphicsPath()) { gp.AddString(str,f.FontFamily,(int)f.Style,(300 / 72) * f.Size,new Point(0,0),new StringFormat()); // i'm using 300 dpi return gp.GetBounds(); } }