Wrong clipping with rotation ?

Started by Nafffen, 16 March 2023, 09:22:30

Nafffen

I use a custom widget to handle a "brace".
I draw the box and states pos of widget with the following in draw method:
target.drawBorders(states, tgui::Borders(1), getSize(), tgui::Color::Red);
target.drawCircle(states, 5, tgui::Color::Green);
displayed.PNG
The origin of widget is the middle (0.5, 0.5). I need to rotate it some times, and when I rotate it to the right with
m_embrace->setRotation(270.f);, we can see the green dot is downward, but when I move a little bit and the green dot goes below screen size Y, the whole widget isnt drawn anymore.
notDisplayed.PNG
I thought that's sort of clipping to preserve draw computation when a widget is off screen, is that actually true ?
How can I handle my issue ?

texus

QuoteI thought that's sort of clipping to preserve draw computation when a widget is off screen, is that actually true ?
TGUI does indeed clip widgets that are outside the screen.

The clipping code was broken when rotation was applied. I've pushed a fixed version to github, so if you download the latest version again then the brace should stay visible.

Nafffen