Beispiel #1
0
 private void RemoveFromCanvas(object sender, EventArgs e)
 {
     if (sender != null && sender is WebMapTileImage)
     {
         WebMapTileImage tile = sender as WebMapTileImage;
         tile.Image.Remove();
     }
 }
Beispiel #2
0
 private void DrawOnCanvas(object sender, EventArgs e)
 {
     if (sender != null && sender is WebMapTileImage)
     {
         WebMapTileImage tile = sender as WebMapTileImage;
         ctx.Save();
         ctx.GlobalAlpha = 1f;
         ctx.FillStyle   = "gray";
         ctx.FillRect(tile.PixelPosition.x, tile.PixelPosition.y, tile.PixelRenderSize.x, tile.PixelRenderSize.y);
         if (tile.Visible && tile.Image.Complete)
         {
             ctx.DrawImage(tile.Image, tile.PixelPosition.x, tile.PixelPosition.y, tile.PixelRenderSize.x, tile.PixelRenderSize.y);
         }
         ctx.Restore();
     }
 }