From 157688a435dfd501ae4c833027e15a4766e947e5 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Fri, 30 Oct 2026 16:10:18 +0900 Subject: [PATCH] =?UTF-8?q?feat(D=20=EC=98=88=EC=A0=95=EB=85=B8=EC=84=A0):?= =?UTF-8?q?=20=EC=A7=80=EB=8F=84=20=EB=85=B8=EC=84=A0=20=EC=84=A0=EC=97=90?= =?UTF-8?q?=20=EA=B2=80=EC=9D=80=20=ED=85=8C=20(PLAN=20600-1=20=C2=B7=20?= =?UTF-8?q?=EC=9A=94=EA=B5=AC=20463-24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - paintNetwork 선 그리기 = strokeCased(검은 테 + 차례 색 선) · 고름(active) · 흐림(dim) · 갈래 굵기 그대로 - 지킴 시험 551_2 에 paintNetwork 가 strokeCased · routeColor 를 쓰는지 한 줄 추가 Co-Authored-By: Claude Sonnet 5.5 --- D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts | 6 +++--- resources/tester/test_551_2_draw_tokens.py | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts b/D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts index b1890160e..10cb635cc 100644 --- a/D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts +++ b/D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts @@ -129,8 +129,8 @@ export function paintNetwork( context.lineJoin = "round"; network.lines.forEach((line, index) => { if (line.vertices.length < 2) return; - context.strokeStyle = index === active ? colors.active : routeColor(index); - context.lineWidth = line.branch ? 2.5 : 3; + const color = index === active ? colors.active : routeColor(index); + const width = line.branch ? 2.5 : 3; const path = (vertices: ReadonlyArray): void => { context.beginPath(); vertices.forEach((v, i) => { @@ -138,7 +138,7 @@ export function paintNetwork( if (i) context.lineTo(sx, sy); else context.moveTo(sx, sy); }); - context.stroke(); + strokeCased(context, color, width); // 밝은 바탕 대비 = 검은 테(600-1 · 463-24) }; if (dim?.line === index) { path(line.vertices.slice(0, dim.from + 1)); diff --git a/resources/tester/test_551_2_draw_tokens.py b/resources/tester/test_551_2_draw_tokens.py index 04accf07d..2be72965d 100644 --- a/resources/tester/test_551_2_draw_tokens.py +++ b/resources/tester/test_551_2_draw_tokens.py @@ -183,3 +183,10 @@ def test_map_drawing_colors_fixed_and_readable_on_dark_map(): lum = _lum(blocks["light"][name]) assert (lum + 0.05) / (ground + 0.05) >= 3, name assert (lum + 0.05) / 0.05 >= 3, name + + +def test_paint_network_uses_cased_route_lines(): + src = (ROOT / "D03_PlanAnalysis/D03_PlanAnalysis_UI_DrawPaint.ts").read_text(encoding="utf-8") + body = src[src.index("export function paintNetwork") : src.index("export function pointLayer")] + assert "strokeCased(context, color, width)" in body + assert "routeColor(index)" in body