@@ -241,7 +241,7 @@ def __init__(
241
241
242
242
def arc_paths (
243
243
rad1 : float , rad2 : float , r : float
244
- ) -> list [tuple [Path . code_type , tuple [float , float ]]]:
244
+ ) -> list [tuple [np . uint8 , tuple [float , float ]]]:
245
245
# If rad1 == rad2, return blank list
246
246
arc_paths = []
247
247
step = config .ARC_RADIAN_STEP if rad1 <= rad2 else - config .ARC_RADIAN_STEP
@@ -251,7 +251,7 @@ def arc_paths(
251
251
252
252
def arrow_paths (
253
253
rad1 : float , rad2 : float , r_side : float , r_top : float
254
- ) -> list [tuple [Path . code_type , tuple [float , float ]]]:
254
+ ) -> list [tuple [np . uint8 , tuple [float , float ]]]:
255
255
return [
256
256
(Path .LINETO , (rad1 , r_side )),
257
257
(Path .LINETO , ((rad1 + rad2 ) / 2 , r_top )),
@@ -260,7 +260,7 @@ def arrow_paths(
260
260
261
261
def bezier_paths (
262
262
rad1 : float , rad2 : float , r1 : float , r2 : float , height_ratio : float = 0.5
263
- ) -> list [tuple [Path . code_type , tuple [float , float ]]]:
263
+ ) -> list [tuple [np . uint8 , tuple [float , float ]]]:
264
264
if height_ratio >= 0.5 :
265
265
# Example1: height_ratio: 0.50 => r_ctl_pos: 0
266
266
# Example2: height_ratio: 0.75 => r_ctl_pos: 25
@@ -389,7 +389,7 @@ def bezier_paths(
389
389
r1 : float ,
390
390
r2 : float ,
391
391
height_ratio : float = 0.5 ,
392
- ) -> list [tuple [Path . code_type , tuple [float , float ]]]:
392
+ ) -> list [tuple [np . uint8 , tuple [float , float ]]]:
393
393
if height_ratio >= 0.5 :
394
394
# Example1: height_ratio: 0.50 => r_ctl_pos: 0
395
395
# Example2: height_ratio: 0.75 => r_ctl_pos: 25
@@ -412,7 +412,7 @@ def arrow_line_paths(
412
412
r_pos : float ,
413
413
arrow_rad_width : float ,
414
414
arrow_r_height : float ,
415
- ) -> list [tuple [Path . code_type , tuple [float , float ]]]:
415
+ ) -> list [tuple [np . uint8 , tuple [float , float ]]]:
416
416
arrow_r_pos = r_pos - arrow_r_height
417
417
return [
418
418
(Path .MOVETO , (rad_pos + (arrow_rad_width / 2 ), arrow_r_pos )),
@@ -421,7 +421,7 @@ def arrow_line_paths(
421
421
]
422
422
423
423
arrow_rad_width = np .radians (arrow_width )
424
- path_data : list [tuple [Path . code_type , tuple [float , float ]]] = []
424
+ path_data : list [tuple [np . uint8 , tuple [float , float ]]] = []
425
425
if direction in (config .Direction .REVERSE , config .Direction .BIDIRECTIONAL ):
426
426
path_data .extend (arrow_line_paths (rad1 , r1 , arrow_rad_width , arrow_height ))
427
427
path_data .append ((Path .MOVETO , (rad1 , r1 )))
0 commit comments