From 7abae713514a4336841e0ec80d99335505e1db21 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Sun, 30 Apr 2023 22:09:38 +0800 Subject: [PATCH] Prevent hardcode enum --- api/s32_region_util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/s32_region_util.py b/api/s32_region_util.py index cab8ac6..195e9db 100644 --- a/api/s32_region_util.py +++ b/api/s32_region_util.py @@ -200,8 +200,10 @@ def inflate_boundary(name: str, boundary: list[tuple[float, float]], delta: floa c_path[i] = xy[1] i += 1 c_delta = ctypes.c_double(delta) - c_jt = ctypes.c_int(0) - c_et = ctypes.c_int(0) + JoinType_Square, JoinType_Round, JoinType_Miter = 0, 1, 2 + c_jt = ctypes.c_int(JoinType_Square) + EndType_Polygon, EndType_Joined, EndType_Butt, EndType_Square, EndType_Round = 0, 1, 2, 3, 4 + c_et = ctypes.c_int(EndType_Polygon) c_miter_limit = ctypes.c_double(2.0) c_precision = ctypes.c_int(2) c_arc_tolerance = ctypes.c_double(0.0)