Exemple #1
0
        private void calculateSize()
        {
            estimatedSize = 0;

            var exportSettings = new ExportSettings();

            using (var stream = new ByteCounterStream())
            {
                using (var writer = new StreamWriter(stream, Encoding.UTF8))
                    foreach (var sbo in storyboardObjects)
                    {
                        sbo.WriteOsb(writer, exportSettings, osbLayer);
                    }

                estimatedSize = (int)stream.Length;
            }
        }
Exemple #2
0
        private void calculateSize()
        {
            EstimatedSize = 0;

            var exportSettings = new ExportSettings
            {
                OptimiseSprites = false, // reduce update time for a minor inaccuracy in estimatedSize
            };

            using (var stream = new ByteCounterStream())
            {
                using (var writer = new StreamWriter(stream, Project.Encoding))
                    foreach (var sbo in storyboardObjects)
                    {
                        sbo.WriteOsb(writer, exportSettings, osbLayer);
                    }

                EstimatedSize = (int)stream.Length;
            }
        }