Working with Transparency | .NET

Set Opacity Mask

Set Opacity Mask Object

Aspose.Page for .NET offers OpacityMask property, with which you can set opacity mask on XPS document. You need to specify PathGeometry and add it to XpsPath. An image can be used as an opacity mask and Alpha component of each pixel is used to apply over underlying fill. Generated XPS document will show slanting gradient stripes as a present over source image file. Following code snippet shows complete functionality to set opacity mask:

Add Transparent Object inside XPS Document

Add Transparent Object

The solution offers XpsPath Class, with which you can add transparent object on XPS document. You need to specify PathGeometry and add it to XpsPath. Following code snippet shows complete functionality to add transparent object on an XPS document: