ApiExamples.CustomBarcodeGenerator.ConvertSymbolHeight C# (CSharp) Метод

ConvertSymbolHeight() приватный статический Метод

Converts barcode image height from Word units to Aspose.BarCode units.
private static ConvertSymbolHeight ( string heightInTwipsString ) : float
heightInTwipsString string
Результат float
        private static float ConvertSymbolHeight(string heightInTwipsString)
        {
            // Input value is in 1/1440 inches (twips)
            int heightInTwips = TryParseInt(heightInTwipsString);
            if (heightInTwips == int.MinValue)
                throw new Exception("Error! Incorrect height - " + heightInTwipsString + ".");

            // Convert to mm
            return (float)(heightInTwips * 25.4 / 1440);
        }