Add shadow effect to `libopenshot`
Currently there are no drop shadow effect implemented in libopenshot. To achieve that, people usually do this trick:
- Duplicate the clip that requires shadow dropping
- Use Brightness effect to make the duplicated clip pitch black
- Use Blur effect to make the black clip under looked like a spread out shadow
- Place the Clip below and a bit offset of the original clip
This approach has two disadvantages:
- Cannot change the color of the shadow: User might want to change the shadow color to a shift the color and no Hue could shift the the color of black
- Inconvenient to use: User has to duplicate the clip, rearrange and modify effects on it. This is not an easy task to do if user has more than one Clip to drop shadow (even when managing them programmatically)
My implementation of Shadow effect could solves those disadvantages by two features:
- No extra Clip required.
- Shadow color could be keyframed. User could change the color freely
Please check this out! All contributions are appreciated!
This effect uses code from #998, please also check it out @jonoomph!
Codecov Report
:x: Patch coverage is 25.17986% with 104 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 57.04%. Comparing base (7b4e999) to head (b8238bb).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/effects/Shadow.cpp | 0.00% | 95 Missing :warning: |
| src/Frame.cpp | 80.00% | 5 Missing :warning: |
| src/EffectInfo.cpp | 0.00% | 3 Missing :warning: |
| src/effects/Shadow.h | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #999 +/- ##
===========================================
- Coverage 57.31% 57.04% -0.28%
===========================================
Files 198 200 +2
Lines 18166 18288 +122
===========================================
+ Hits 10412 10432 +20
- Misses 7754 7856 +102
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi, this PR is related to #998. Please check it out first. I also included test cases for that pull request!