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