git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit5d6557bed754e50594723b779cceeeab26a71d1e
parentaf79a9bdec
authorLucas Galante <[email protected]>
date2026-07-24 12:37
feat: node bodies take the DE squircle corner family

The network pane drew node bodies as flat sharp quads through the plain
extra_quads path. Classify node-body quads via is_node_rect and draw them
as rounded rects at graph_node_corner_radius, so they follow the DE-wide
corner_shape superellipse like every other rounded surface. Wires, grid
cells, and geometry toggles stay flat.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/render.rs | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/render.rs b/src/render.rs
index 16b847a..3d618fa 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -187,8 +187,15 @@ impl State {
             }
 
             pc.clip(clip, |pc| {
+                // Node bodies get the DE corner family (squircle when corner_shape > 2);
+                // wires, grid cells, and toggles stay flat quads.
+                let node_r = cce_ui::layout::graph_node_corner_radius();
                 for (qx, qy, qw, qh, qc) in w.extra_quads() {
-                    pc.quad(rect(qx, qy, qw, qh), qc);
+                    if self.graph().is_node_rect(qx, qy, qw, qh) {
+                        pc.rounded_rect(rect(qx, qy, qw, qh), node_r, (true, true, true, true), qc);
+                    } else {
+                        pc.quad(rect(qx, qy, qw, qh), qc);
+                    }
                 }
             });