[]
Adds a gradient stop with the specified color and position.
This overload forwards to Insert(int, double, double, int, double)
with transparency set to 0, index set to -1,
and brightness set to 0.
void Insert(int rgb, double position, double transparency = 0, int index = -1, double brightness = 0)
Sub Insert(rgb As Integer, position As Double, Optional transparency As Double = 0, Optional index As Integer = -1, Optional brightness As Double = 0)
| Type | Name | Description |
|---|---|---|
| int | rgb | The color at the gradient stop, specified as an ARGB color value. |
| double | position | The position of the stop within the gradient, expressed as a percentage. |
| double | transparency | The transparency of the gradient stop, where |
| int | index | The zero-based index at which to insert the gradient stop. Use |
| double | brightness | The brightness adjustment for the gradient stop, from |
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 120, 80);
IFillFormat fill = shape.Fill;
fill.TwoColorGradient(GradientStyle.Horizontal, 1);
IGradientStops stops = fill.GradientStops;
stops.Insert(Color.Blue.ToArgb(), 0.5);