CNCMaps.Engine.Map.Map.GetLocalSizePixels C# (CSharp) Method

GetLocalSizePixels() public method

public GetLocalSizePixels ( ) : Rectangle
return Rectangle
        public Rectangle GetLocalSizePixels()
        {
            int left = Math.Max(LocalSize.Left * TileWidth, 0),
                top = Math.Max(LocalSize.Top - 3, 0) * TileHeight + TileHeight / 2;
            int right = (LocalSize.Left + LocalSize.Width) * TileWidth;

            int bottom1 = 2 * (LocalSize.Top - 3 + LocalSize.Height + 5);
            int cutoff = FindCutoffHeight() * 2;
            int bottom2 = (cutoff + 1 + (cutoff % 2));
            int bottom = Math.Min(bottom1, bottom2) * (TileHeight / 2);
            return Rectangle.FromLTRB(left, top, right, bottom);
        }