private static char GetChar(LineChar charCenter, [NotNull] char[] map) { Debug.Assert(map.Length == 4); if (!charCenter.IsHorizontalWide() && !charCenter.IsVerticalWide()) { return(map[0]); } if (charCenter.IsHorizontalWide() && !charCenter.IsVerticalWide()) { return(map[1]); } if (!charCenter.IsHorizontalWide() && charCenter.IsVerticalWide()) { return(map[2]); } if (charCenter.IsHorizontalWide() && charCenter.IsVerticalWide()) { return(map[3]); } throw new ArgumentOutOfRangeException(nameof(charCenter)); }
public override char GetChar(LineChar charCenter, LineChar charLeft, LineChar charTop, LineChar charRight, LineChar charBottom) { if (charCenter.IsEmpty()) { return('\0'); } if (charCenter.IsHorizontal() && charCenter.IsVertical()) { return('+'); } if (charCenter.IsHorizontal()) { return(charCenter.IsHorizontalWide() ? '=' : '-'); } if (charCenter.IsVertical()) { return('|'); } throw GetCharException(charCenter, charLeft, charTop, charRight, charBottom); }