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: