We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Drawing multiple graphics with homogeneous transparency

Hello!

I need to produce the following specific output through the Graphics of my PdfPage, is that possible?


I have:

  • Multiple PdfPath's of which each has their own:
    • Transform (set via Graphics and then reset after draw)
    • Custom PdfPen and PdfBrush

I need:

  • A way to batch draw these PdfPath's with a set transparency, however, the transparency of each path should not overlap with the other. Imagine it like this:
    • A layer on which I draw all PdfPath's with full transparency and in the end where I set the transparency on the whole layer to some value.
How it currently looks:


How I need it to look:


Thank you for your quick support and help!

Best regards,
Boskan


4 Replies

IJ Irfana Jaffer Sadhik Syncfusion Team March 27, 2023 11:55 AM UTC

We request you try the ColorDodge mode in PdfBlendMode. This will help you to draw multiple graphics paths without overlapping each other. we have created a simple sample for your reference. Please try this on your end and let us know the result.


Sample:https://www.syncfusion.com/downloads/support/directtrac/general/ze/UWPSample420642249


Follow the below links for more information,

https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Graphics.PdfBlendMode.html



DI Dilan March 27, 2023 07:10 PM UTC

Hello Irfana!

Thank you very much for your answer and sample. May I ask why you set the transparency to 1.5? Aren't transparencies limited from 0 to 1?

Unfortunately, the sample does not produce the output I require. The colors do not display any type of transparency. In the pictures I posted in the original question, you can see that the drawn paths let through the grid that was drawn  (also through graphics) behind them.

Is there any way you could help me further?

I sincerely appreciate the quick response and efforts by you and your team.

Thank you and best regards,
Boskan



IJ Irfana Jaffer Sadhik Syncfusion Team March 28, 2023 01:30 PM UTC

Thank you for sharing the details. We have checked to achieve your requirement by referring to the PDF specification, but this cannot be achieved. So we could not proceed further with your requirement. 



DI Dilan March 28, 2023 09:30 PM UTC

Very unfortunate.

Thank you for your help Irfana!


Loader.
Live Chat Icon For mobile
Up arrow icon