Class RadialGradientPaint
A RadialGradientPaint describes how to draw a radial gradient.
Implements
Namespace: Northwoods.Go
Assembly: Northwoods.GoDiagram.WinForms.dll
Syntax
public class RadialGradientPaint : GradientPaint, ICloneable
Remarks
In WinForms, only the Start and StartRadius are used to position and size the radial gradient. The End and EndRadius are ignored.
Constructors
RadialGradientPaint(RadialGradientPaint)
Costructs a copy of the given RadialGradientPaint.
Declaration
public RadialGradientPaint(RadialGradientPaint p)
Parameters
Type | Name | Description |
---|---|---|
RadialGradientPaint | p | the RadialGradientPaint to copy from |
RadialGradientPaint(IDictionary<float, string>, Spot, Spot, double, double)
Constructs a RadialGradientPaint with the given stops, start and end Spots, and start and end radius.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops, Spot start, Spot end, double startRadius, double endRadius)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
Spot | end | the ending spot for the gradient |
double | startRadius | the starting radius for the gradient |
double | endRadius | the ending radius for the gradient |
RadialGradientPaint(IDictionary<float, string>, Spot, Spot)
Constructs a RadialGradientPaint with the given stops and start and end Spots.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops, Spot start, Spot end)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
Spot | end | the ending spot for the gradient |
RadialGradientPaint(IDictionary<float, string>, Spot, double)
Constructs a RadialGradientPaint with the given stops and start Spot and start radius.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops, Spot start, double startRadius)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
double | startRadius | the starting radius for the gradient |
RadialGradientPaint(IDictionary<float, string>, Spot)
Constructs a RadialGradientPaint with the given stops and start Spot.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops, Spot start)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
RadialGradientPaint(IDictionary<float, string>, double, double)
Constructs a RadialGradientPaint with the given stops and start and end radius.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops, double startRadius, double endRadius)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
double | startRadius | the starting radius for the gradient |
double | endRadius | the ending radius for the gradient |
RadialGradientPaint(IDictionary<float, string>, double)
Constructs a RadialGradientPaint with the given stops and start radius.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops, double startRadius)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
double | startRadius | the starting radius for the gradient |
RadialGradientPaint(IDictionary<float, string>)
Constructs a RadialGradientPaint with the given stops.
Declaration
public RadialGradientPaint(IDictionary<float, string> stops)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<float, string> | stops | a dictionary mapping fractional stops to color strings |
RadialGradientPaint((float, string)[], Spot, Spot, double, double)
Constructs a RadialGradientPaint with the given stops, start and end Spots, and start and end radius.
Declaration
public RadialGradientPaint((float, string)[] stops, Spot start, Spot end, double startRadius, double endRadius)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
Spot | end | the ending spot for the gradient |
double | startRadius | the starting radius for the gradient |
double | endRadius | the ending radius for the gradient |
RadialGradientPaint((float, string)[], Spot, Spot)
Constructs a RadialGradientPaint with the given stops and start and end Spots.
Declaration
public RadialGradientPaint((float, string)[] stops, Spot start, Spot end)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
Spot | end | the ending spot for the gradient |
RadialGradientPaint((float, string)[], Spot, double)
Constructs a RadialGradientPaint with the given stops and start Spot and start radius.
Declaration
public RadialGradientPaint((float, string)[] stops, Spot start, double startRadius)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
double | startRadius | the starting radius for the gradient |
RadialGradientPaint((float, string)[], Spot)
Constructs a RadialGradientPaint with the given stops and start Spot.
Declaration
public RadialGradientPaint((float, string)[] stops, Spot start)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
Spot | start | the starting spot for the gradient |
RadialGradientPaint((float, string)[], double, double)
Constructs a RadialGradientPaint with the given stops and start and end radius.
Declaration
public RadialGradientPaint((float, string)[] stops, double startRadius, double endRadius)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
double | startRadius | the starting radius for the gradient |
double | endRadius | the ending radius for the gradient |
RadialGradientPaint((float, string)[], double)
Constructs a RadialGradientPaint with the given stops and start radius.
Declaration
public RadialGradientPaint((float, string)[] stops, double startRadius)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
double | startRadius | the starting radius for the gradient |
RadialGradientPaint((float, string)[])
Constructs a RadialGradientPaint with the given stops.
Declaration
public RadialGradientPaint((float, string)[] stops)
Parameters
Type | Name | Description |
---|---|---|
(float, string)[] | stops | an array of tuples mapping fractional stops to color strings |
Properties
EndRadius
This read-only property returns the radius of a radial gradient at the end location. The default value is NaN.
Declaration
public double EndRadius { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
This field is ignored in WinForms.
StartRadius
This read-only property returns the radius of a radial gradient at the start location. The default value is 0.
Declaration
public double StartRadius { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
Represents the total radius for the gradient in WinForms.
Methods
Darken(double, ColorSpace)
Darkens each color stop, called by Darken(double, ColorSpace).
Declaration
public override Paint Darken(double fraction = 0.2, ColorSpace mode = ColorSpace.Lab)
Parameters
Type | Name | Description |
---|---|---|
double | fraction | |
ColorSpace | mode |
Returns
Type | Description |
---|---|
Paint | a new RadialGradientPaint with darkened colors |
Overrides
Lighten(double, ColorSpace)
Lightens each color stop, called by Lighten(double, ColorSpace).
Declaration
public override Paint Lighten(double fraction = 0.2, ColorSpace mode = ColorSpace.Lab)
Parameters
Type | Name | Description |
---|---|---|
double | fraction | |
ColorSpace | mode |
Returns
Type | Description |
---|---|
Paint | a new RadialGradientPaint with lightened colors |
Overrides
ToString()
Returns a string that represents the current Paint.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current Paint. |