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

add shadow to Text in drawString #644

Open
nikhil-viewzen opened this issue Apr 22, 2024 · 1 comment
Open

add shadow to Text in drawString #644

nikhil-viewzen opened this issue Apr 22, 2024 · 1 comment

Comments

@nikhil-viewzen
Copy link

Is it possible to add shadow to text in drawString

@brendan-duncan
Copy link
Owner

There is a dropShadow filter, but to use on text that's drawn on another image, you'll need to draw the text into it's own image, add the shadow to it, and then composite the result onto the other image.

https://github.com/brendan-duncan/image/blob/main/test/filter/drop_shadow_test.dart
https://github.com/brendan-duncan/image/blob/main/doc/images/filter/dropShadow.png

Alternatively if you just want a hard shadow you could draw the text twice.

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

No branches or pull requests

2 participants