Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("ShapewithGradientFill.vsdx"); // get page by name page = diagram.getPages().getPage("Page-1"); // get shape by ID shape = page.getShapes().getShape(1); // get the gradient fill properties gradientfill = shape.getFill().getGradientFill(); // get the gradient stops stops = gradientfill.getGradientStops(); // get the gradient stop by index stop = stops.get(0); // set gradient stop properties stop.getColor().getUfe().setF(""); stop.getPosition().setValue(0.5); gradientfill.getGradientDir().setValue(aspose.diagram.GradientFillDir.RECTANGLE_FROM_BOTTOM_RIGHT); gradientfill.getGradientAngle().setValue(0.7853981633974501); diagram.save("out-ShapewithGradientFill.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Property Getters/Setters Summary | ||
---|---|---|
method | getGradientAngle() | |
method | setGradientAngle(value) | |
Specifies the orientation of the fill color gradient | ||
method | getGradientDir() | |
method | setGradientDir(value) | |
Specifies the type of the fill color gradient | ||
method | getGradientEnabled() | |
method | setGradientEnabled(value) | |
Specifies whether the fill color gradient is visible. | ||
method | getGradientStops() | |
Represents the gradient stop collection.
|
GradientStopCollection getGradientStops()
IntValue getGradientDir() / setGradientDir(value)
DoubleValue getGradientAngle() / setGradientAngle(value)