Exemplo n.º 1
0
 public Bitmap VectorsToBitmap(IRasterDataProvider prd, CodeCell.AgileMap.Core.Feature[] features, string shpPrimaryField, out Dictionary <string, Color> nameColors)
 {
     using (IVector2BitmapConverter c = new Vector2BitmapConverter())
     {
         Dictionary <ShapePolygon, Color> vectors = GetVectorColors(features, shpPrimaryField, out nameColors);
         Bitmap   bmp     = new Bitmap(prd.Width, prd.Height, PixelFormat.Format24bppRgb);
         Envelope envelop = GetEnvelop(prd);
         c.ToBitmap(vectors, Color.Black, envelop, new Size(prd.Width, prd.Height), ref bmp);
         return(bmp);
     }
 }
Exemplo n.º 2
0
 private Bitmap GetBitmap(PointF[] points, byte[] types, Envelope dstEnvelope, Size size)
 {
     if (dstEnvelope == null || size.IsEmpty)
     {
         return(null);
     }
     using (IVector2BitmapConverter c = new Vector2BitmapConverter())
     {
         Bitmap buffer = new Bitmap(size.Width, size.Height, PixelFormat.Format24bppRgb);
         c.ToBitmap(points, types, Color.Red, Color.Black, dstEnvelope, size, ref buffer);
         return(buffer);
     }
 }
Exemplo n.º 3
0
 private Bitmap GetBitmap(ShapePolygon[] geometrys, Envelope dstEnvelope, Size size)
 {
     if (dstEnvelope == null || size.IsEmpty)
     {
         return(null);
     }
     using (IVector2BitmapConverter c = new Vector2BitmapConverter())
     {
         Bitmap buffer = new Bitmap(size.Width, size.Height, PixelFormat.Format24bppRgb);
         Dictionary <ShapePolygon, Color> vectors = new Dictionary <ShapePolygon, Color>();
         foreach (ShapePolygon geo in geometrys)
         {
             vectors.Add(geo, Color.Red);
         }
         c.ToBitmap(vectors, Color.Black, dstEnvelope, size, ref buffer);
         return(buffer);
     }
 }