lottie-ios icon indicating copy to clipboard operation
lottie-ios copied to clipboard

Gradient Fill Layer: Support strokes.

Open exevil opened this issue 3 years ago • 3 comments

Add support for CA rendering engine to draw a stroke around layers with gradient fills applied.

exevil avatar Nov 25 '22 18:11 exevil

Nice, thanks for adding support for this.

Could you please add a snapshot test case that demonstrates this functionality? You can add an animation json that includes a stroke over a gradient layer as /Tests/Samples/Issues/pr_1818.json. Then you can rerun the snapshot tests with bundle exec rake test:package or by running the test target via Xcode in an iPhone 8 simulator.

I also see some test failures, where some snapshots are now rendering incorrectly. This appears to be because most gradient layers now have an additional black outline. Could you look in to this?

Before After
reference_1_CC0F0FC9-9007-45A9-A3C3-9EBB1E10BDAB failure_2_CC0F0FC9-9007-45A9-A3C3-9EBB1E10BDAB

Before merging, the changes will also need to be formatted according to Airbnb's Swift Style Guide. You can do this automatically by running bundle exec rake format:swift.

calda avatar Nov 28 '22 14:11 calda

@exevil, are you interested in continuing to work on this change? If not, I can finish it up and get it merged.

calda avatar Dec 05 '22 17:12 calda

@calda: Hi! Sorry, don't have much of a time recently. I set the GitHub notification unread in my inbox, so I hope to find some time later to finish it. Don't know when exactly, though.

exevil avatar Dec 06 '22 00:12 exevil

@exevil, I could take care of finishing and landing this fix if you share a copy of the animation json you've been testing with.

calda avatar Dec 20 '22 21:12 calda

@calda: Hey! Sorry again, here it is: test.json.zip

exevil avatar Dec 22 '22 13:12 exevil