From 8490457cab446dc74d250fa34e5d57a0d23d0117 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 Sep 2017 21:01:50 +0530 Subject: [PATCH] ... --- kitty/fonts/render.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/fonts/render.py b/kitty/fonts/render.py index 84e66dea0..ba03837d6 100644 --- a/kitty/fonts/render.py +++ b/kitty/fonts/render.py @@ -3,6 +3,7 @@ # License: GPL v3 Copyright: 2016, Kovid Goyal import ctypes +from math import sin, pi, ceil, floor from kitty.constants import isosx from .box_drawing import render_box_char, is_renderable_box_char @@ -23,12 +24,11 @@ def add_line(buf, cell_width, position, thickness, cell_height): def add_curl(buf, cell_width, position, thickness, cell_height): - from math import sin, pi, ceil, floor xfactor = 2.0 * pi / cell_width yfactor = thickness def clamp_y(y): - return max(0, min(int(y), cell_height)) + return max(0, min(int(y), cell_height - 1)) for x in range(cell_width): y_exact = yfactor * sin(x * xfactor) + position