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

API - Style: Implement initial 'overflow: hidden' strategy using glScissorRect #192

Merged
merged 7 commits into from
Jan 7, 2019

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jan 5, 2019

Issue: We need some very basic clipping to support scroll views and scrollable content.

This implements overflow: hidden in a very naive way - if a node has overflow: hidden set, we'll figure out the screen-space bounding box for the node, and then use the glScissorRect API to constrain child rendering inside this rectangle.

This works fine for elements that are not rotated, but will not give proper results when there is a rotation or shearing transform applied. But for now, this is at least reasonable to get us going and implementing elements that have bounded constraints.

In the future, it'd be worth pursuing additional options for overflow: hidden:

Sample I added to test:
overflow

TODO:

@bryphe bryphe changed the title [WIP] API - Style: Implement initial 'overflow: hidden' strategy using glScissorRect API - Style: Implement initial 'overflow: hidden' strategy using glScissorRect Jan 7, 2019
@bryphe bryphe merged commit 2ec9ecb into master Jan 7, 2019
@bryphe bryphe deleted the bryphe/feature/overflow-hidden branch January 7, 2019 21:01
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.

1 participant