Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How do I 'move' the clipping rectangle on a SkiaSharp SKCanvas?

$
0
0

I think I am missing a trick with SkiaSharp. It's difficult to explain without diagrams but here goes...

Imagine I have a single canvas that I conceptually want to divide into three columns. Now imagine I want to draw different shapes into each of the three columns but I want the shapes to clip at the column boundaries. And finally I want to draw a shape that extends over the whole canvas.

I can change the clipping rectangle to draw in the first column. When it comes to drawing in the second, how do I do this? If I call ClipRect() again, the second rectangle is combined with the first (either subtracted or intersected). What I want to do is clear the first clip rectangle I set, or somehow reset the clipping rectangle to be the whole canvas.

And when it comes to drawing my final shapes that fill the whole canvas, I definitely need to put the clipping rectangle back to being the whole canvas.

How would I do this?

Kind wishes - Patrick


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>