Beispiel #1
0
        public static Bitmap CreateMap(TerrainManager mgr, int scale, int x, int y)
        {
            var img = CreateMap(mgr);
            var map = ImageUtil.ResizeImage(img, img.Width * scale, img.Height * scale);

            return(DrawReticle(map, x, y, scale));
        }
Beispiel #2
0
        public static Bitmap GetBitmapLayer(FieldItemLayer layer, int x, int y, int scale = 1)
        {
            var map = GetBitmapLayer(layer);

            if (scale > 1)
            {
                map = ImageUtil.ResizeImage(map, map.Width, map.Height);
            }

            return(DrawViewReticle(map, layer, x, y, scale));
        }
Beispiel #3
0
        public static Bitmap CreateMap(TerrainManager mgr, int scale, int acreIndex = -1)
        {
            var img = CreateMap(mgr);
            var map = ImageUtil.ResizeImage(img, img.Width * scale, img.Height * scale);

            if (acreIndex < 0)
            {
                return(map);
            }

            var acre = MapGrid.Acres[acreIndex];
            var x    = acre.X * MapGrid.GridWidth;
            var y    = acre.Y * MapGrid.GridHeight;

            return(DrawReticle(map, x, y, scale));
        }
Beispiel #4
0
        public static Image CreateMap(TerrainManager mgr, int scale, int acreIndex = -1)
        {
            var img = CreateMap(mgr);
            var map = ImageUtil.ResizeImage(img, img.Width * scale, img.Height * scale);

            if (acreIndex < 0)
            {
                return(img);
            }

            using var gfx = Graphics.FromImage(map);
            using var pen = new Pen(Color.Red);

            var acre = mgr.Acres[acreIndex];
            var x    = acre.X * TerrainManager.GridWidth * scale;
            var y    = acre.Y * TerrainManager.GridHeight * scale;
            int w    = TerrainManager.GridWidth * scale;
            int h    = TerrainManager.GridHeight * scale;

            gfx.DrawRectangle(pen, x, y, w, h);
            return(map);
        }