Fork me on GitHub
#membrane
<
2024-02-14
>
zimablue12:02:33

getting weird behavior from with-line-size in webgl/canvas, my assumption was that it would only apply to drawing lines inside that lexical scope, but it's modifying them globally. Also, when two are specified differently in different places, redraws sometimes end up drawing eg. component_A with the line size specified for B. I'm thinking maybe line size isn't stored on the context by push-state (??), that's my first guess to why thie behaviour would happen

zimablue12:02:02

sorry *with-stroke-width

phronmophobic20:02:30

with-stroked-width doesn't create a scope. it just returns a new view where its children will be drawn with the specified width.

phronmophobic20:02:58

do you have some example code?

zimablue21:02:07

Sorry maybe scope is the wrong word but it's not respecting only-apply-to-children in my code, for sure. I don't have a simple reproducible example I'm snowed but can try to make one soon

zimablue21:02:42

For now I'll workaround by using rects

phronmophobic21:02:12

Yea, it should only apply to children. If not, that's a bug.