Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the clip area of an XGraphics in pdfsharp?

Tags:

clip

pdfsharp

I'm a little confused about setting clipping area of an XGraphics, pdfSharp only provide a method IntersectClip, which means if I want to change the clipping area, the area would become smaller and smaller(intersect with the previous area), does anybody know that is there anyway to set the clipping area freely?

like image 904
Edgar Avatar asked Oct 29 '25 18:10

Edgar


1 Answers

It seems that IntersectClip is the only clipping function available.
I don't see a problem: you can use Save and Restore to return to a previous clipping region. Use Save before the first IntersectClip so you can return to the default region. Then set the region you want with IntersectClip and call Restore when you're done with that region and need another.

like image 154
I liked the old Stack Overflow Avatar answered Nov 03 '25 00:11

I liked the old Stack Overflow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!