Ejemplo n.º 1
0
 public void SetUp()
 {
     tiler = new FlatTiler();
     tiler.MaxZoomLevel = 15;
     tiler.NumberOfTiles = 4;
     tiler.ImageFetchFunction = Tiler_Test.FetchFunction;
 }
Ejemplo n.º 2
0
 private Image FetchFlatImage(BackgroundWorker progressReporter, Tiler tiler)
 {
     try
     {
         return tiler.ConstructTiledImage(progressReporter);
     }
     catch (Exception ex)
     {
         Console.WriteLine("" + ex);
         if (this.ErrorReplacementImage != null)
         {
             return new Bitmap(ErrorReplacementImage, ErrorReplacementImage.Width * 2, ErrorReplacementImage.Height * 2);
         }
         else
             throw new Exception("Previous image was null.", ex);
     }
 }
Ejemplo n.º 3
0
 public void SetUp()
 {
     tiler = new MipMapTiler();
     tiler.MaxZoomLevel = 15;
     tiler.NumberOfTiles = 4;
     tiler.ImageFetchFunction = Tiler_Test.FetchFunction;
     expectedReports = 1;
     for (int i = 1; i <= tiler.NumberOfTiles; i *= 2)
     {
         expectedReports += i * i + 1;
     }
 }