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 | ||
---|---|---|
function | getGradientAngle() | |
function | setGradientAngle(value) | |
Specifies the orientation of the fill color gradient | ||
function | getGradientDir() | |
function | setGradientDir(value) | |
Specifies the type of the fill color gradient | ||
function | getGradientEnabled() | |
function | setGradientEnabled(value) | |
Specifies whether the fill color gradient is visible. | ||
function | getGradientStops() | |
Represents the gradient stop collection. |
Property Getters/Setters Detail |
---|
getGradientStops : GradientStopCollection | |
function getGradientStops() |
getGradientDir/setGradientDir : IntValue | |
function getGradientDir() / function setGradientDir(value) |
getGradientAngle/setGradientAngle : DoubleValue | |
function getGradientAngle() / function setGradientAngle(value) |
getGradientEnabled/setGradientEnabled : BoolValue | |
function getGradientEnabled() / function setGradientEnabled(value) |