Add Gradient in XPS Document

Contents
[ ]

Add Horizontal Gradient

Aspose.Page for C++ lets you add horizontal gradient to an XPS document. The XpsGrandientBrush class is used to specify the XpsGredientStop and XpsPath information to the XpsDocument object which represents the XPS file. The following C++ code shows how to add horizontal gradient information to a document.

  1. Create an object of XpsDocument class
  2. Specify the XpsGradientStop and XpsPath parameters for the XPS document
  3. Set the rendering information
  4. Save the document

Add Vertical Gradient

Just as you can add the Horizontal gradient, you can use Aspose.Page for C++ to add vertical gradient information to the XPS document. The following C++ code sample shows how to add a verticle gradient to an XPS document.

Add Linear Gradient

You can also add linear gradient to an XPS document using Aspose.Page for C++ as shown in the following code sample.