creativescala / doodle

Compositional vector graphics in Scala / Scala.JS
https://creativescala.org/doodle/
Apache License 2.0
329 stars 76 forks source link

fill color lives on as stroke color #38

Closed tpolecat closed 7 years ago

tpolecat commented 7 years ago

Shared mutable state strikes again. The fill color for the wee circle reappears as the stroke color for the large circle. Maria from ScalaBridge just found this.

circle(5).fillColor(Color.red) on circle(10) above circle(20)

image

I didn't look very closely but deleting this line fixes it.

Not submitting as a PR because I'm not convinced I understand what's going on.

noelwelsh commented 7 years ago

Thanks! I've fixed in latest release (0.7.0). Not sure what's going on either; presumably I don't understand the state within Java2D. It might be a bug in Java2D but either way this is the fix.