Skip to content
Snippets Groups Projects
Commit db147d15 authored by dos's avatar dos Committed by pippin
Browse files

st3m: ViewTransitionSwipe*: Clip the drawn views

Otherwise views that draw outside of the screen can leak their
contents onto the other view.
parent 8b0c838b
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,8 @@ class ViewTransitionSwipeLeft(ViewTransition):
ctx.save()
ctx.translate(240 + transition * -240, 0)
ctx.rectangle(-120, -120, 240, 240)
ctx.clip()
incoming.draw(ctx)
ctx.restore()
......@@ -129,6 +131,8 @@ class ViewTransitionSwipeRight(ViewTransition):
ctx.save()
ctx.translate(-240 + transition * 240, 0)
ctx.rectangle(-120, -120, 240, 240)
ctx.clip()
incoming.draw(ctx)
ctx.restore()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment