Working with Gradient | C++
Contents
[
Hide
]
Add Gradient in XPS Document
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.
- Create an object of XpsDocument class
- Specify the XpsGradientStop and XpsPath parameters for the XPS document
- Set the rendering information
- 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.