-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
RichTextLabel clipping ignores rotation. #23233
Comments
It si weired how the clipping works though... seems strange, that only the bottom left corner is clipped without rotation. Clipping box might be bigger... |
Thanks for taking a look. I tried to fix it myself but only got as far as seeing that the clipping rect is set in https://github.com/godotengine/godot/blob/master/scene/gui/control.cpp#L605 but I'm not familiar enough with the internals to know how to apply the control's rotation to that. Maybe it's because it uses a glScissor in the driver, and that isnt affected by transforms? Not sure. |
Yea i think the glScissors is the issue. As u said, somewhere in the drivers/visual server file (there are two one for gles2 and one for gles3) |
I was researching this last night, but as far as I can see the glScissor test is just a viewport thing that can't have transforms applied to it. One way to solve it would be to check for rotation, and then use a stencil test instead, which can be any arbitrary shape. |
Related: #20671 |
Still valid in a6d4484 |
Duplicate of #20671. |
Godot version:
b77a411 (latest master)
Issue description:
When the text overflows in a rotated RichTextLabel, it gets clipped to an axis-aligned rect instead of a rotated rectangle.
Steps to reproduce:
Create RichTextLabel with enough text that it overflows, and rotate it, or its parent.
The text was updated successfully, but these errors were encountered: