Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_draw_funcs(self, opensans):
funcs = hb.DrawFuncs()
container = []
def move_to(x,y,c):
c.append(f"M{x},{y}")
def line_to(x,y,c):
c.append(f"L{x},{y}")
def cubic_to(c1x,c1y,c2x,c2y,x,y,c):
c.append(f"C{c1x},{c1y} {c2x},{c2y} {x},{y}")
def quadratic_to(c1x,c1y,x,y,c):
c.append(f"Q{c1x},{c1y} {x},{y}")
def close_path(c):
c.append("Z")
funcs.set_move_to_func(move_to)
funcs.set_line_to_func(line_to)
funcs.set_cubic_to_func(cubic_to)
funcs.set_quadratic_to_func(quadratic_to)