From 9dd8185f37b5e6c9727ee1ad518267b9ef9d4c3f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Mar 2021 13:17:17 +0530 Subject: [PATCH] rectciricle -> rectircle --- docs/changelog.rst | 2 +- kitty/fonts/box_drawing.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 860777404..13b1a3f6d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -99,7 +99,7 @@ To update |kitty|, :doc:`follow the instructions `. - Fix a crash on systems using musl as libc (:iss:`3395`) -- Improve rendering of rounded corners by using a rectcircle equation rather +- Improve rendering of rounded corners by using a rectircle equation rather than a cubic bezier (:iss:`3409`) diff --git a/kitty/fonts/box_drawing.py b/kitty/fonts/box_drawing.py index 5408e1703..7209fee7d 100644 --- a/kitty/fonts/box_drawing.py +++ b/kitty/fonts/box_drawing.py @@ -437,21 +437,21 @@ def draw_parametrized_curve( buf[pos] = min(255, buf[pos] + 255) -def rectcircle_equations( +def rectircle_equations( cell_width: int, cell_height: int, supersample_factor: int, which: str = '╭' ) -> Tuple[ParameterizedFunc, ParameterizedFunc]: ''' Return two functions, x(t) and y(t) that map the parameter t which must be - in the range [0, 1] to x and y co-ordinates in the cell. The rectcircle equation + in the range [0, 1] to x and y co-ordinates in the cell. The rectircle equation we use is: (|x| / a) ^ (2a / r) + (|y| / a) ^ (2b / r) = 1 where 2a = width, 2b = height and r is radius - The entire rectcircle fits in four cells, each cell being one quadrant - of the full rectcircle and the origin being the center of the rectcircle. + The entire rectircle fits in four cells, each cell being one quadrant + of the full rectircle and the origin being the center of the rectircle. The functions we return do the mapping for the specified cell. ╭╮ ╰╯ @@ -490,7 +490,7 @@ def rectcircle_equations( @supersampled() def rounded_corner(buf: BufType, width: int, height: int, level: int = 1, which: str = '╭') -> None: supersample_factor = getattr(buf, 'supersample_factor') - xfunc, yfunc = rectcircle_equations(width, height, supersample_factor, which) + xfunc, yfunc = rectircle_equations(width, height, supersample_factor, which) draw_parametrized_curve(buf, width, height, level, xfunc, yfunc, supersample_factor)