Ejemplo n.º 1
0
        /// <summary>Create a empty bitmap with the size of the output tileset.</summary>
        /// <returns>Bitmap with the size of output tileset.</returns>
        protected Bitmap GetOutputBitmap()
        {
            Bitmap bmp = new Bitmap(outputTileset.SizeWidth(), outputTileset.SizeHeight());

            bmp.SetPixel(0, 0, Color.White);
            return(bmp);
        }
Ejemplo n.º 2
0
 /// <summary>if the image is convertible to MV tileset.</summary>
 /// <param name="img">Image to be checked.</param>
 /// <returns>Return true if the image is convertible and false if not.</returns>
 protected virtual bool IsConvertible(Image img)
 {
     if (inputTileset.GetType() != typeof(Maker.XP_Tile))
     {
         if (img.Width != inputTileset.SizeWidth() || img.Height != inputTileset.SizeHeight())
         {
             System.Windows.Forms.MessageBox.Show(Vocab.GetText("sizeErrorMsg"));
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 3
0
 /// <summary>if the image is convertible to MV tileset.</summary>
 /// <param name="img">Image to be checked.</param>
 /// <returns>Return true if the image is convertible and false if not.</returns>
 protected virtual bool IsConvertible(Image img)
 {
     if (inputTileset.TilesetName() != Tileset.XP_Tile.Name)
     {
         if (img.Width != inputTileset.SizeWidth() || img.Height != inputTileset.SizeHeight())
         {
             System.Console.WriteLine($"{img.Width}x{img.Height} != {inputTileset.SizeWidth()}x{inputTileset.SizeHeight()} | input tileset: {inputTileset}");
             System.Windows.Forms.MessageBox.Show(Vocab.GetText("sizeNotMatchErrorMsg"));
             return(false);
         }
     }
     return(true);
 }