Skip to main content

rounded_corner_inset

Function rounded_corner_inset 

Source
pub fn rounded_corner_inset(r: i32, k: i32) -> i32
Expand description

角丸 1 つぶんの、辺から k 行目(0 が一番外の行)で左右から削る幅。 角の円は dx² + dy² ≤ r²(円の中心の画素からの整数距離)の内側を残す。k >= r なら 0。

【2026-11-18】角丸の塗り・枠を「1 行ずつ 1 度だけ塗る」ための基になる計算。