Also, the default canvas background is white, but ...
# doodle
a
Also, the default canvas background is white, but when I increase the size of a desktop window (so not a problem on web), the new space is rendered with a black background. I can avoid it by filling the canvas with white. Is this intended behavior?
n
i haven’t seen this behavior before. it sounds like a bug. will also investigate.
what platform do you see this on? i can’t repro on Mac.
a
I'm having this issue on windows. It could also be the way I'm interacting with the canvas. I'm not painting the canvas black at all. Could
canvas.clear()
be causing the issue?
n
it might. clear is actually never needed. try removing and let me know.
a
Yup! That fixed it 🤦
👍 1
n
how are you using it? it’s no longer needed b/c the graphics surface implementations do it automatically at the tart of each new render.
a
I had it at the beginning of
render
. I don't remember why I put it there in the first place.
👍 1
n
clear should go to transparent. but this may go to black because Doodle’s Transparent is black with opacity 0. https://github.com/nacular/doodle/blob/999b98b48a4183f82d58e8cac57b93c9327515f3/Desktop/src/jvmMain/kotlin/io/nacular/doodle/drawing/impl/CanvasImpl.kt#L477
👍 1