Exemple #1
0
        public static Bitmap GetBitmapLayer(FieldItemLayer layer)
        {
            var items  = layer.Tiles;
            var height = layer.MapHeight;
            var width  = items.Length / height;

            var bmpData = new int[width * height];

            LoadBitmapLayer(items, bmpData, width, height);

            return(ImageUtil.GetBitmap(bmpData, width, height));
        }
Exemple #2
0
        // unused -- allocates!
        public static Bitmap GetBitmapLayerAcre(FieldItemLayer layer, int x0, int y0, int scale)
        {
            var map  = GetBitmapLayerAcre(layer, x0, y0, out int mh, out int mw);
            var data = ImageUtil.ScalePixelImage(map, scale, mw, mh, out var w, out var h);

            // draw symbols over special items now?
            DrawDirectionals(data, layer, w, x0, y0, scale);

            // Slap on a grid
            DrawGrid(data, w, h, scale);

            // Return final data
            return(ImageUtil.GetBitmap(data, w, h));
        }