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

commitf1826a62ab2dadccdbaa483ad1bfe788f2deb334
parent4a22a8138f
authorLucas Galante <[email protected]>
date2026-06-26 14:58
feat: render extra circles in recursive draw passes

 src/render.rs | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/render.rs b/src/render.rs
index 5163b3a..f61830d 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -188,6 +188,12 @@ impl State {
                 push_extra_quad_vertices_clipped(w.as_ref(), qx, qy, qw, qh, sw, sh, qc, clip, active_clip_circle, verts);
             }
 
+            for (cx, cy, cr, cc) in w.extra_circles() {
+                if cx >= clip.0 && cx <= clip.2 && cy >= clip.1 && cy <= clip.3 {
+                    push_circle_vertices(cx, cy, cr, sw, sh, cc, 16, active_clip_circle, verts);
+                }
+            }
+
             if show_cursor {
                 let px = self.positions[CONTENT_IDX].0;
                 let py = self.positions[CONTENT_IDX].1;
@@ -237,6 +243,9 @@ impl State {
             for (qx, qy, qw, qh, qc) in w.extra_quads() {
                 push_extra_quad_vertices(w.as_ref(), qx, qy, qw, qh, sw, sh, qc, active_clip_circle, verts);
             }
+            for (cx, cy, cr, cc) in w.extra_circles() {
+                push_circle_vertices(cx, cy, cr, sw, sh, cc, 16, active_clip_circle, verts);
+            }
             for (acx, acy, ar, ath, a_start, a_end, acolor) in w.extra_arcs() {
                 push_arc_background_vertices(
                     acx, acy, ar,
@@ -255,6 +264,9 @@ impl State {
             for (qx, qy, qw, qh, qc) in w.extra_quads() {
                 push_extra_quad_vertices(w.as_ref(), qx, qy, qw, qh, sw, sh, qc, active_clip_circle, verts);
             }
+            for (cx, cy, cr, cc) in w.extra_circles() {
+                push_circle_vertices(cx, cy, cr, sw, sh, cc, 16, active_clip_circle, verts);
+            }
         }
 
         // Draw child elements recursively
@@ -332,6 +344,9 @@ impl State {
         for (qx, qy, qw, qh, qc) in element.extra_quads() {
             push_extra_quad_vertices(element, qx, qy, qw, qh, sw, sh, qc, active_clip_circle, verts);
         }
+        for (cx, cy, cr, cc) in element.extra_circles() {
+            push_circle_vertices(cx, cy, cr, sw, sh, cc, 16, active_clip_circle, verts);
+        }
 
         for child_ptr in element.children(&self.ui_context) {
             unsafe {