internal double Update() { Bitmap png = new Bitmap((int)(Digit.Size * Digit.BackgroundMultiplier), (int)(Digit.Size * Digit.BackgroundMultiplier)); Graphics graphics = Graphics.FromImage(png); string numberStr = number.ToString(); Digit.NumberOfDigits = numberStr.Length; for (int i = 1; i <= Digit.NumberOfDigits; i++) { Digit d = new Digit(Int32.Parse(numberStr.Substring(numberStr.Length - i, 1)), i); d.Draw(graphics); } if (File.Exists(outFilePath)) { File.Delete(outFilePath); } try { png.Save(outFilePath, System.Drawing.Imaging.ImageFormat.Png); } catch (Exception e) { } graphics.Dispose(); png.Dispose(); return(0.0); }