Ejemplo n.º 1
0
        public static void FinishSheets()
        {
            if (Settings.DeveloperMode)
            {
                for (int i = 0; i < Sheets.Length; i++)
                {
                    var sheet = Sheets[i];
                    if (sheet == null)
                    {
                        break;
                    }

                    BitmapSaver.Save($"{FileExplorer.Logs}spritesheet_{i}.png", TextureManager.GetContent(sheet.TextureID, sheet.Size, sheet.Size), sheet.Bounds);
                }
            }

            SheetBuilder.Clear();

            sheetsLoaded = true;
        }
Ejemplo n.º 2
0
        public void Save_ShouldThrow_WhenIncorrectPath()
        {
            Action act = () => BitmapSaver.Save(new Bitmap(100, 100), "png", "blablapath");

            act.Should().Throw <ArgumentException>();
        }
Ejemplo n.º 3
0
        public void Save_ShouldThrow_WhenIncorrectFormat()
        {
            Action act = () => BitmapSaver.Save(new Bitmap(100, 100), "jpga");

            act.Should().Throw <ArgumentException>();
        }
Ejemplo n.º 4
0
 public void Save_ShouldThrow_WhenIncorrectPath()
 {
     BitmapSaver.Save(new Bitmap(100, 100), "png", "blablapath").IsSuccess.Should().BeFalse();
 }
Ejemplo n.º 5
0
 public void Save_ShouldThrow_WhenIncorrectFormat()
 {
     BitmapSaver.Save(new Bitmap(100, 100), "jpga").IsSuccess.Should().BeFalse();
 }