Add other corner triangles & enable in C side
This commit is contained in:
parent
10e5fcc375
commit
d1cf771c14
@ -556,10 +556,14 @@ START_ALLOW_CASE_RANGE
|
||||
return BLANK_FONT;
|
||||
case 0x2500 ... 0x2570:
|
||||
case 0x2574 ... 0x259f:
|
||||
case 0xe0b0:
|
||||
case 0xe0b2:
|
||||
case 0xe0b4:
|
||||
case 0xe0b6:
|
||||
case 0xe0b0: //
|
||||
case 0xe0b2: //
|
||||
case 0xe0b4: //
|
||||
case 0xe0b6: //
|
||||
case 0xe0b8: //
|
||||
case 0xe0ba: //
|
||||
case 0xe0bc: //
|
||||
case 0xe0be: //
|
||||
return BOX_FONT;
|
||||
default:
|
||||
ans = in_symbol_maps(fg, cpu_cell->ch);
|
||||
|
||||
@ -173,12 +173,19 @@ def triangle(buf, width, height, left=True):
|
||||
|
||||
|
||||
def corner_triangle(buf, width, height, corner):
|
||||
diagonal_y = line_equation(0, 0, width - 1, height - 1)
|
||||
|
||||
if corner == 'top-right':
|
||||
xlimits = [(0, diagonal_y(x)) for x in range(width)]
|
||||
elif corner == 'bottom-left':
|
||||
xlimits = [(diagonal_y(x), height - 1) for x in range(width)]
|
||||
print(f"corner_triangle: corner is '{corner}'")
|
||||
if corner == 'top-right' or corner == 'bottom-left':
|
||||
diagonal_y = line_equation(0, 0, width - 1, height - 1)
|
||||
if corner == 'top-right':
|
||||
xlimits = [(0, diagonal_y(x)) for x in range(width)]
|
||||
elif corner == 'bottom-left':
|
||||
xlimits = [(diagonal_y(x), height - 1) for x in range(width)]
|
||||
else:
|
||||
diagonal_y = line_equation(width - 1, 0, 0, height - 1)
|
||||
if corner == 'top-left':
|
||||
xlimits = [(0, diagonal_y(x)) for x in range(width)]
|
||||
elif corner == 'bottom-right':
|
||||
xlimits = [(diagonal_y(x), height - 1) for x in range(width)]
|
||||
fill_region(buf, width, height, xlimits)
|
||||
|
||||
|
||||
@ -469,8 +476,10 @@ box_chars = {
|
||||
'': [p(triangle, left=False)],
|
||||
'': [D],
|
||||
'': [p(D, left=False)],
|
||||
'': [p(corner_triangle, corner='top-right')],
|
||||
'': [p(corner_triangle, corner='bottom-left')],
|
||||
'': [p(corner_triangle, corner='bottom-right')],
|
||||
'': [p(corner_triangle, corner='top-left')],
|
||||
'': [p(corner_triangle, corner='top-right')],
|
||||
'═': [dhline],
|
||||
'║': [dvline],
|
||||
'╞': [vline, p(half_dhline, which='right')],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user