aspose.diagram
Class GradientFill

Represents the gradient fill.

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
functiongetGradientAngle()
functionsetGradientAngle(value)
           Specifies the orientation of the fill color gradient
functiongetGradientDir()
functionsetGradientDir(value)
           Specifies the type of the fill color gradient
functiongetGradientEnabled()
functionsetGradientEnabled(value)
           Specifies whether the fill color gradient is visible.
functiongetGradientStops()
           Represents the gradient stop collection.
 

Property Getters/Setters Detail

getGradientStops : GradientStopCollection 

function getGradientStops()
Represents the gradient stop collection.

getGradientDir/setGradientDir : IntValue 

function getGradientDir() / function setGradientDir(value)
Specifies the type of the fill color gradient

getGradientAngle/setGradientAngle : DoubleValue 

function getGradientAngle() / function setGradientAngle(value)
Specifies the orientation of the fill color gradient

getGradientEnabled/setGradientEnabled : BoolValue 

function getGradientEnabled() / function setGradientEnabled(value)
Specifies whether the fill color gradient is visible.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.