public class GradientFill extends Fill
| Modifier and Type | Method and Description |
|---|---|
float |
getAngle()
The angle of linear fill.
|
int |
getDirectionType()
Gets the gradient direction type.
|
int |
getFillType()
Gets the gradient fill type.
|
Color |
getGradientColor1()
Gets gradient color 1.
|
Color |
getGradientColor2()
Gets gradient color 2.
|
int |
getGradientColorType()
Gets gradient color type.
|
double |
getGradientDegree()
Gets gradient degree.
|
GradientStopCollection |
getGradientStops()
Represents the gradient stop collection.
|
int |
getGradientStyle()
Gets gradient style type.
|
int |
getPresetColor()
Returns the gradient preset color for the specified fill.
|
int |
getVariant()
Gets variant.
|
void |
setAngle(float value)
The angle of linear fill.
|
void |
setGradient(int type,
double angle,
int direction)
Set the gradient fill type and direction.
|
void |
setOneColorGradient(Color color,
double degree,
int style,
int variant)
Sets the specified fill to a one-color gradient.
|
void |
setPresetColor(int value)
Returns the gradient preset color for the specified fill.
|
void |
setPresetColorGradient(int presetColor,
int style,
int variant)
Sets the specified fill to a preset-color gradient.
|
void |
setPresetThemeGradient(int gradientType,
int themeColorType)
Sets preset theme gradient fill.
|
void |
setTwoColorGradient(Color color1,
Color color2,
int style,
int variant)
Sets the specified fill to a two-color gradient.
|
void |
setTwoColorGradient(Color color1,
double transparency1,
Color color2,
double transparency2,
int style,
int variant)
Sets the specified fill to a two-color gradient.
|
public GradientStopCollection getGradientStops()
public void setGradient(int type,
double angle,
int direction)
type - GradientFillType. Gradient fill type.angle - The angle. Only applies for GradientFillType.Linear.direction - GradientDirectionType. The direction type. Only applies for GradientFillType.Radial and GradientFillType.Rectangle.public int getFillType()
See GradientFillType.
public int getDirectionType()
public float getAngle()
public void setAngle(float value)
public Color getGradientColor1()
public Color getGradientColor2()
public double getGradientDegree()
public void setPresetThemeGradient(int gradientType,
int themeColorType)
gradientType - PresetThemeGradientType. The preset gradient type.themeColorType - ThemeColorType. The theme color type.public void setPresetColorGradient(int presetColor,
int style,
int variant)
presetColor - GradientPresetType. Preset color typestyle - GradientStyleType. Gradient shading style.variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.public void setOneColorGradient(Color color, double degree, int style, int variant)
color - One gradient color.degree - The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).style - GradientStyleType. Gradient shading style.variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.public void setTwoColorGradient(Color color1, Color color2, int style, int variant)
color1 - One gradient color.color2 - Two gradient color.style - GradientStyleType. Gradient shading style.variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.public void setTwoColorGradient(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)
color1 - One gradient color.transparency1 - The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).color2 - Two gradient color.transparency2 - The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).style - GradientStyleType. Gradient shading style.variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.public int getGradientColorType()
See GradientColorType.
public int getPresetColor()
See GradientPresetType.
public void setPresetColor(int value)
See GradientPresetType.
public int getVariant()
public int getGradientStyle()
See GradientStyleType.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.