-
Notifications
You must be signed in to change notification settings - Fork 69
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
Conversation
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该是用BlurImageFilter去实现,DropShadow也是调用了BlurImageFilter。
include/tgfx/core/ImageFilter.h
Outdated
* 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. | ||
*/ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释更新,还有drop shadow
支持内阴影滤镜