-
Notifications
You must be signed in to change notification settings - Fork 779
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
Multiple scissors #652
Comments
If you first set the scissor for the scrollview and then for each textview, you do save the context, then intersect the scrollview scissor with the textview scissor and after drawing you restore the state, wouldn't that work ? |
Hm, seems it does not work. Here is pseudocode how i do it
EDIT: I replaced nvgScissor in TextView with nvgIntersectScissor and it seems to work. Thank you. Btw, I start my "void draw()" function, which is main application drawing loop with void nvgBeginFrame. And between nvgBeginFrame and nvgEndFrame I mix my own drawing functions using standard opengl es 2.0 commands and nanovg commands. I experienced few problems, which I work-arounded somehow. Should I avoid it? Instead, should I split it and use nanovg drawing in multiple local nvgBeginFrame/nvgEndFrame blocks? |
nanovg collects all the draw commands and then at |
Hi people,
I have situation when I need two scissors. I create the list of multiline textviews placed on scrollview.
First scissor cuts text lines of textview to match it's width and height. This works well, I implemented it without issues. Then I place several textviews on scrollview. And textviews should be scissored second time to match width and height of the scrollview. This I still cant get to work.
Can someone help me please? Is it possible?
The text was updated successfully, but these errors were encountered: