Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support InnerShadowFilter. #323

Merged
merged 4 commits into from
Nov 8, 2024
Merged

Support InnerShadowFilter. #323

merged 4 commits into from
Nov 8, 2024

Conversation

Hparty
Copy link
Collaborator

@Hparty Hparty commented Nov 8, 2024

支持内阴影滤镜
innerShadow

@Hparty
Copy link
Collaborator Author

Hparty commented Nov 8, 2024

innerShadow

std::shared_ptr<ImageFilter> ImageFilter::InnerShadow(float dx, float dy, float blurrinessX,
float blurrinessY, const Color& color) {

auto dropShadowFilter = DropShadowOnly(dx, dy, blurrinessX, blurrinessY, Color::Black());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是用BlurImageFilter去实现,DropShadow也是调用了BlurImageFilter。

Comment on lines 98 to 105
* Create a filter that renders an inner shadow, in exactly the same manner as the InnerShadow(),
* except that the resulting image does not include the input content.
* @param dx The X offset of the shadow.
* @param dy The Y offset of the shadow.
* @param blurrinessX The blur radius for the shadow, along the X axis.
* @param blurrinessY The blur radius for the shadow, along the Y axis.
* @param color The color of the inner shadow.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释对齐


auto colorProcessor = ConstColorProcessor::Make(color, InputMode::Ignore);

// get inverted drop shadow mask and fill it with color
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释更新,还有drop shadow

@domchen domchen merged commit d5f31fe into main Nov 8, 2024
8 checks passed
@domchen domchen deleted the feature/partyhuang_innershadow branch November 8, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants