natinusala / borealis

Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx)
Apache License 2.0
260 stars 83 forks source link

Add draw clipping #53

Closed ITotalJustice closed 3 years ago

ITotalJustice commented 4 years ago

Only draw what's visible on screen. It can be toggled by the user for if they use a box container that needs to be drawn which has children which would be visible on screen. An example of this is the ListContentView class (I have updated the class).

I'll mention how the clipping works in the documentation later for the users.

natinusala commented 4 years ago

Thanks for the PR!

You should take width and height into account too, that way you don't have to setClipping(true) the Lists

natinusala commented 3 years ago

Closed as this PR is reimplemented or made irrelevant by the changes on the yoga branch. Clipping is automated by the Box class.