-
Notifications
You must be signed in to change notification settings - Fork 435
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
Fix text clipping when applying a shadow to it #3226
Conversation
I think the bitmap itself should be bigger (depending on the shadow offset) in order to draw the full text and shadow |
What do you mean? |
Oh wait i think i know hang on |
Actually wait I don't know what you mean. |
Wait it wont work on haxe 4.2.5 :/ |
kinda a shitty way to do it tho. :/
Looking into this now, it's worth mentioning that the intended way to create your desired effect is: text.setBorderStyle(SHADOW, 0xFF000000, 8, 0); That works just fine for me, I didn't even know shadowOffset existed, until now, and I believe it's actually meant to serve a different purpose. I can't find any official docs that recommend using That said, it appears shadowOffset is not meant to be used for the purpose you expected and I recommend using I'll get back to you on this |
I cant seem to find out how im going to fix the issue when using setBorderStyle |
I've started a new PR with a different fix: |
Currently there seems to be an issue where applying a shadow to a FlxText, the text clips off by whatever the shadow offset is.
Here the shadow offset is 8 pixels and the text clips off by 8 pixels without the fix.
With the fix the text appears as it is supposed to be, the text does not clip off
Ive tested this on HashLink and C++ targets, it seems to just work(?) but I am unsure if there are any side effects.
I made a quick little test project here