-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
Glow "effect" implementation #2137
Comments
Here's how different blur styles look like when applied to a white circle (blur radius = 10). The images, in order, are: no-blur, normal, solid, outer, and inner: Here's the same picture, but when the original paint is of type "stroke", with the stroke width = 4: We can see that the glow in both cases is pretty weak (especially in the second), and increasing the blur radius won't make it stronger... |
Here I once again have only one glow for each circle. However,
This also creates the effect of stronger glow; the drawback, however, is that this technique can only be applied to shapes which we can easily "inflate": circles, rectangles, rounded rectangles. Possibly polygons. |
Would this be possible to be applied to text? |
In this experiment I'm once again using normal blur with radius 5; plus the text is then rendered a second time on top, using the original paint.
Clearly, using stroke paint as the basis for glows works quite well when rendering fonts (definitely much better than with solid shapes). |
One can also use other techniques to apply a glow to text, which can be seen here: |
Those are still the same techniques: apply a paint with MaskFilter.blur, then render the blurred text at some offset. |
Yeah, but not done manually, in your case you have a separate paint that you handle outside of the text style right? |
Just wanna join the Flame party 🎉 @st-pasha Can you elaborate on how you go about with the implementation and probably add some simple code? I am just joining the Flame party, so I am a bit lost. But I am interested in this discussion 😁 |
This thread is about the glow "effect" and the best strategy for applying it. This follows our discussion from PR #2129, moved here for better visibility (as that PR is now merged).
The
GlowEffect
which is currently in themain
branch is useful in some circumstances, but has a number of deficiencies that need to be addressed. Those are:The term "effect" was misapplied here. The phrase "glow effect" is used in graphic design, so we kinda referred to it by the same name. However, in
Flame
the word "Effect" has a specific meaning: it is an animation that changes over time some property of a component. For example,MoveEffect
,OpacityEffect
. The "glow effect", however, is static: you add it to an object to make the object glow.Decoration
s so far, so perhaps we should consider changingGlowEffect
into aGlowDecoration
. Of course, this affects not only the name but also how the effect is applied.GlowDecorationEffect
or something like that.The glow effect currently modifies an existing paint, which makes its correct application quite tricky. We should consider a glow effect that adds a glow instead.
The glow is kinda weak -- we should investigate the possibility of making it stronger if needed.
This issue is a discussion to collect ideas/observations, and figure out the path forward.
CC: @dipakp2726, @spydon
The text was updated successfully, but these errors were encountered: