Skip to content

Commit 7a194a4

Browse files
leifericfclaude
andcommitted
Fix pattern fill rendering bug
Two issues prevented pattern fills from rendering: 1. In ir/lower.clj resolve-fill: the case matched :fill/pattern but scene fills arrive as :pattern. Add :pattern as an alias. Make resolve-fill public so effect.clj can reuse it. 2. In ir/effect.clj item->base-op: fill resolution only handled color vectors and {:r :g :b} maps, silently dropping pattern, gradient, and other semantic fills. Delegate to resolve-fill for any fill with :fill/type. This was a pre-existing bug (present since pattern fills were added), not caused by the namespace restructuring. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2767739 commit 7a194a4

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/eido/ir/effect.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@
7575
"Converts a draw item to a concrete op (simplified — for shadow/glow copies).
7676
Handles basic geometry types with fill, stroke, opacity."
7777
[geom fill stroke opacity]
78-
(let [resolved-fill (when fill
78+
(let [resolve-fn (requiring-resolve 'eido.ir.lower/resolve-fill)
79+
resolved-fill (when fill
7980
(cond
8081
(vector? fill) (color/resolve-color fill)
82+
(:fill/type fill) (resolve-fn fill)
8183
(:color fill) (color/resolve-color (:color fill))
8284
(and (:r fill) (:g fill) (:b fill)) fill
8385
:else nil))

src/eido/ir/lower.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
;; --- fill resolution ---
1717

18-
(defn- resolve-fill
18+
(defn resolve-fill
1919
"Resolves a semantic fill descriptor to the format concrete ops expect."
2020
[f]
2121
(when f
@@ -34,7 +34,7 @@
3434
(:gradient/radius f) (assoc :gradient/radius (:gradient/radius f)))
3535

3636
;; Pattern fill — compile tile nodes to ops
37-
:fill/pattern
37+
(:fill/pattern :pattern)
3838
(when-let [tile-nodes (:pattern/nodes f)]
3939
(let [[tw th] (:pattern/size f)]
4040
{:fill/type :pattern

0 commit comments

Comments
 (0)