CSReportPaint.cReportPrint.evaluateTextHeight C# (CSharp) Метод

evaluateTextHeight() приватный Метод

private evaluateTextHeight ( string text, Font font, float width, int flags, float scaleY, float scaleX ) : float
text string
font System.Drawing.Font
width float
flags int
scaleY float
scaleX float
Результат float
        private float evaluateTextHeight(string text, Font font, float width, int flags, float scaleY, float scaleX)
        {
            Bitmap bmp = new Bitmap(1, 1);
            Graphics graph = Graphics.FromImage(bmp);
            SizeF stringSize = graph.MeasureString(text, font, Convert.ToInt32(width * scaleX));
            graph.Dispose();
            bmp.Dispose();
            return stringSize.Height * scaleY;
        }