Class RadialGradientBrush
Represents the focal point that defines the beginning of the gradient and a circle that defines the endpoint of the gradient
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class RadialGradientBrush : GradientBrush, IDiagramObject, ICloneable
Examples
Node Node = new Node()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
// Add node
Style = new ShapeStyle()
{
Gradient = new RadialGradientBrush()
{
//Center point of the inner circle
FX = 20,
FY = 20,
//Center point of the outer circle
CX = 50,
CY = 50,
//Radius of a radial gradient
R = 50,
//Set an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
Constructors
RadialGradientBrush()
Creates a new instance of the RadialGradientBrush from the given RadialGradient.
Declaration
public RadialGradientBrush()
RadialGradientBrush(RadialGradientBrush)
Initializes a new instance of the RadialGradientBrush class.
Declaration
public RadialGradientBrush(RadialGradientBrush src)
Parameters
Type | Name | Description |
---|---|---|
RadialGradientBrush | src | RadialGradient. |
Properties
CX
Gets or sets the center point of the outer circle of the radial gradient.
Declaration
public double CX { get; set; }
Property Value
Type |
---|
System.Double |
Examples
Node Node = new Node()
{
Style = new ShapeStyle()
{
Gradient = new RadialGradientBrush()
{
//Center point of the inner circle
FX = 20,
FY = 20,
//Center point of the outer circle
CX = 50,
CY = 50,
//Radius of a radial gradient
R = 50,
//Set an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
CY
Gets or sets the center point of the outer circle of the radial gradient.
Declaration
public double CY { get; set; }
Property Value
Type |
---|
System.Double |
Examples
Node Node = new Node()
{
Style = new ShapeStyle()
{
Gradient = new RadialGradientBrush()
{
//Center point of the inner circle
FX = 20,
FY = 20,
//Center point of the outer circle
CX = 50,
CY = 50,
//Radius of a radial gradient
R = 50,
//Set an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
FX
Gets or sets the center point of the inner circle of the radial gradient.
Declaration
public double FX { get; set; }
Property Value
Type |
---|
System.Double |
Examples
Node Node = new Node()
{
Style = new ShapeStyle()
{
Gradient = new RadialGradientBrush()
{
//Center point of the inner circle
FX = 20,
FY = 20,
//Center point of the outer circle
CX = 50,
CY = 50,
//Radius of a radial gradient
R = 50,
//Set an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
FY
Gets or sets the center point of the inner circle of the radial gradient.
Declaration
public double FY { get; set; }
Property Value
Type |
---|
System.Double |
Examples
Node Node = new Node()
{
Style = new ShapeStyle()
{
Gradient = new RadialGradientBrush()
{
//Center point of the inner circle
FX = 20,
FY = 20,
//Center point of the outer circle
CX = 50,
CY = 50,
//Radius of a radial gradient
R = 50,
//Set an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
R
Gets or sets the radius of a radial gradient
Declaration
public double R { get; set; }
Property Value
Type |
---|
System.Double |
Examples
Node Node = new Node()
{
Style = new ShapeStyle()
{
Gradient = new RadialGradientBrush()
{
//Center point of the inner circle
FX = 20,
FY = 20,
//Center point of the outer circle
CX = 50,
CY = 50,
//Radius of a radial gradient
R = 50,
//Set an array of stop objects
GradientStops = new DiagramObjectCollection<GradientStop>()
{
new GradientStop(){ Color = "white", Offset = 0},
new GradientStop(){ Color = "#6BA5D7", Offset = 100}
},
}
},
};
Methods
Clone()
Creates a new object that is the a copy of the current radial gradient
Declaration
public override object Clone()
Returns
Type |
---|
System.Object |
Overrides
Implements
System.ICloneable