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

Clipping revamp #100

Closed
wants to merge 5 commits into from
Closed

Clipping revamp #100

wants to merge 5 commits into from

Conversation

yuriks
Copy link
Contributor

@yuriks yuriks commented Apr 9, 2012

A lot of changes (almost complete rewrite) to the clipping system. See full commit messages for more info. I tested it on my project and everything seems to work, but I'm not sure if I got all the uses involving width/_width right. Comments appreciated.


This change is Reviewable

Scrollable container's delayed content touch would send a touchEnded
event with the 'inside' flag set to false when you started dragging the
container (cancelling the touch), meaning the element would get
activated anyway.

Fixed by sending the event with inside=false, which makes most controls
ignore the interaction.
Instead of having a single master function to clip everything, added a
virtual function to the base element class, which handles clipping that
element and all children to a screen-space clip rectangle. Override as
needed.
Clipping is now entirely handled with rects, with no special casing done
on the clipping direction. Several display related variables are now
used in a more consistent manner, or have been renamed to follow their
actual usage. In addition to being less code, the new solution is more
flexible, allowing clipping from all sides at once.
Avoid recursing down to children when the sprite's visibility hasn't
changed. This is a safe assumption when the parent object bounds the
children, and makes scrolling with many text objects much smoother.
@yuriks
Copy link
Contributor Author

yuriks commented Nov 4, 2020

Closing stale old PRs

@yuriks yuriks closed this Nov 4, 2020
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

Successfully merging this pull request may close these issues.

None yet

1 participant