public static XamlShapes.Path RenderRaster(IRaster raster, IStyle style, IViewport viewport) { XamlShapes.Path path = CreateRasterPath(style, raster.Data); path.Data = ConvertRaster(raster.GetBoundingBox(), viewport); MapRenderer.Animate(path, "Opacity", 0, 1, 600, (s, e) => { }); return(path); }
public static void DrawRaster(Graphics graphics, IRaster raster, IViewport viewport) { var imageAttributes = new ImageAttributes(); var bitmap = new Bitmap(raster.Data); Point min = viewport.WorldToScreen(new Point(raster.GetBoundingBox().MinX, raster.GetBoundingBox().MinY)); Point max = viewport.WorldToScreen(new Point(raster.GetBoundingBox().MaxX, raster.GetBoundingBox().MaxY)); Rectangle destination = RoundToPixel(new RectangleF((float)min.X, (float)max.Y, (float)(max.X - min.X), (float)(min.Y - max.Y))); graphics.DrawImage(bitmap, destination, 0, 0, bitmap.Width, bitmap.Height, GraphicsUnit.Pixel, imageAttributes); }
public static XamlShapes.Path RenderRaster(IRaster raster, IStyle style, IViewport viewport) { var path = CreateRasterPath(style, raster.Data); path.Data = new XamlMedia.RectangleGeometry(); PositionRaster(path, raster.GetBoundingBox(), viewport); return(path); }
public static UIImage RenderRaster(IRaster raster, IStyle style, IViewport viewport) { var data = NSData.FromArray(raster.Data.ToArray()); var image = UIImage.LoadFromData(data); var drawRectangle = ConvertBoundingBox(raster.GetBoundingBox(), viewport); image.Draw(drawRectangle); return(image); }
public static UIImageView RenderRasterOnView(IRaster raster, IStyle style, IViewport viewport) { var tile = new UIImageView(); var data = NSData.FromArray(raster.Data.ToArray()); var image = UIImage.LoadFromData(data); var drawRectangle = ConvertBoundingBox(raster.GetBoundingBox(), viewport); tile.Image = image; tile.Frame = drawRectangle; return(tile); }
public static XamlShapes.Path RenderRaster(IRaster raster, IStyle style, IViewport viewport) { var path = CreateRasterPath(style, raster.Data); path.Data = new XamlMedia.RectangleGeometry(); PositionRaster(path, raster.GetBoundingBox(), viewport); // path.Stroke = new XamlMedia.SolidColorBrush(XamlColors.Red); // path.StrokeThickness = 6; return(path); }
public static CALayer RenderRasterOnLayer(IRaster raster, IStyle style, IViewport viewport) { var tile = new CALayer(); var data = NSData.FromArray(raster.Data.ToArray()); var image = UIImage.LoadFromData(data); var frame = ConvertBoundingBox(raster.GetBoundingBox(), viewport); tile.Frame = frame; tile.Contents = image.CGImage; var aOpacity = new CABasicAnimation { KeyPath = @"opacity", From = new NSNumber(0.1), To = new NSNumber(1.0), Duration = 0.6 }; tile.AddAnimation(aOpacity, "opacity"); return(tile); }
public static CALayer RenderRasterOnLayer(IRaster raster, IStyle style, IViewport viewport) { var tile = new CALayer(); var data = NSData.FromArray(raster.Data.ToArray()); var image = UIImage.LoadFromData(data); var frame = ConvertBoundingBox(raster.GetBoundingBox(), viewport); tile.Frame = frame; tile.Contents = image.CGImage; var aOpacity = new CABasicAnimation { KeyPath = @"opacity", From = new NSNumber(0.1), To = new NSNumber(1.0), Duration = 0.6 }; tile.AddAnimation(aOpacity, "opacity"); return tile; }
public static UIImageView RenderRasterOnView(IRaster raster, IStyle style, IViewport viewport) { var tile = new UIImageView(); var data = NSData.FromArray(raster.Data.ToArray()); var image = UIImage.LoadFromData(data); var drawRectangle = ConvertBoundingBox(raster.GetBoundingBox(), viewport); tile.Image = image; tile.Frame = drawRectangle; return tile; }
public static UIImage RenderRaster(IRaster raster, IStyle style, IViewport viewport) { var data = NSData.FromArray(raster.Data.ToArray()); var image = UIImage.LoadFromData(data); var drawRectangle = ConvertBoundingBox(raster.GetBoundingBox(), viewport); image.Draw((CGRect)drawRectangle); return image; }
public static XamlShapes.Path RenderRaster(IRaster raster, IStyle style, IViewport viewport) { XamlShapes.Path path = CreateRasterPath(style, raster.Data); path.Data = ConvertRaster(raster.GetBoundingBox(), viewport); MapRenderer.Animate(path, "Opacity", 0, 1, 600, (s, e) => { }); return path; }
public static XamlShapes.Path RenderRaster(IRaster raster, IStyle style, IViewport viewport) { var path = CreateRasterPath(style, raster.Data); path.Data = new XamlMedia.RectangleGeometry(); PositionRaster(path, raster.GetBoundingBox(), viewport); return path; }
public static XamlShapes.Path RenderRaster(IRaster raster, IStyle style, IViewport viewport) { var path = CreateRasterPath(style, raster.Data); path.Data = new XamlMedia.RectangleGeometry(); PositionRaster(path, raster.GetBoundingBox(), viewport); // path.Stroke = new XamlMedia.SolidColorBrush(XamlColors.Red); // path.StrokeThickness = 6; return path; }