public virtual Bitmap RenderRegionBitmap(RectangleF view, int zoomLevel) { if (Coordinates == null || Values == null || Coordinates.Count == 0 || Values.Count == 0) { return(null); } RenderRegion(view, zoomLevel); _bitmapRenderTarget.BeginDraw(); _bitmapRenderTarget.DrawEllipse(new Ellipse(new Vector2(128f, 128f), 32f, 32f), ((MM_Network_Map_DX)_surface).Brushes.GetBrush(Color.White), 3f); _bitmapRenderTarget.EndDraw(); // _bitmapRenderTarget.draw var tileBmp = new Bitmap(_bitmapRenderTarget, new Size2(MM_Repository.OverallDisplay.MapTileSize.Width, MM_Repository.OverallDisplay.MapTileSize.Height), new BitmapProperties(new PixelFormat(Format.R8G8B8A8_UNorm, AlphaMode.Premultiplied), 96, 96)); tileBmp.CopyFromBitmap(_bitmapRenderTarget.Bitmap); return(tileBmp); }