CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.11k stars 1.97k forks source link

Shadow "Stroke" appears on top of shape when using fill and strokestyle. #1066

Open jerwolff opened 2 years ago

jerwolff commented 2 years ago

Issue Details

If you add a Shadow to a shape with Strokestyle and Fill, a " Shadow Stroke" appears on top of the shape.

shadowissue

Fiddle

Windows 11 Pro Insider Chrome 97.0.4692.99

If you remove the strokestyle, the shadow works as expected. So my current workaround is to draw a second shape for just the border.

dijitaletkinlikler commented 2 years ago

Zimjs createjs üzerine kurulu bir kütüphane. Bence zimjs'i kullanma. zimjs.com

danzen commented 2 years ago

Yes - agreed - that has been a long standing issue - I think it is CreateJS based, not ZIM based, but it does happen in ZIM too. @dijitaletkinlikler - sorry, what did you mean to say in your response?

dijitaletkinlikler commented 2 years ago

I am sad. I don't know English so I use google translate. Sometimes it mistranslates. zimjs is a library built on createjs. I meant use zimjs instead of createjs.

danzen commented 2 years ago

lol - thanks @dijitaletkinlikler - we were wondering! This issue with the shadow of the border being above the shape has been around for a while, we have just put up with it. To this day, I make two shapes, one without the border that I put behind and add the shadow and then a shape with the border on top that I do not add the shadow. I think we built that in to ZIM Buttons but never solved the core issue. Maybe one day, I can dig into the CreateJS code and see what is causing it... or if anyone here has a solution, please let us know and we can update the code.