Esempio n. 1
0
 public void loadImage(string path)
 {
     using (FileStream fs = new FileStream(path, FileMode.Open))
     {
         Texture2D texture = Texture2D.FromStream(GraphicsDevice, fs);
         if (NinePatch.isAlreadyNinepatch(texture))
         {
             loadImageExisting(texture);
         }
         else
         {
             loadImageNew(texture);
         }
         computeScale();
     }
 }