Esempio n. 1
0
        private static void DrawAcrePlaza(this Graphics gfx, TerrainLayer g, int topX, int topY, ushort px, ushort py, int scale, byte transparency)
        {
            g.GetBuildingRelativeCoordinates(topX, topY, scale, px, py, out var x, out var y);

            var width  = scale * PlazaWidth;
            var height = scale * PlazaHeight;

            var pen = Plaza;

            if (transparency != byte.MaxValue)
            {
                var orig = ((SolidBrush)pen).Color;
                pen = new SolidBrush(Color.FromArgb(transparency, orig));
            }
            gfx.FillRectangle(pen, x, y, width, height);
        }