Table of Contents

Class RadialGradientPaint

Namespace
Northwoods.Go
Assembly
Northwoods.GoDiagram.WinForms.dll

A RadialGradientPaint describes how to draw a radial gradient.

public class RadialGradientPaint : GradientPaint, ICloneable
Inheritance
RadialGradientPaint
Implements
Inherited Members

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.

public RadialGradientPaint(RadialGradientPaint p)

Parameters

p RadialGradientPaint

the RadialGradientPaint to copy from

RadialGradientPaint(IDictionary<float, string>)

Constructs a RadialGradientPaint with the given stops.

public RadialGradientPaint(IDictionary<float, string> stops)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

RadialGradientPaint(IDictionary<float, string>, Spot)

Constructs a RadialGradientPaint with the given stops and start Spot.

public RadialGradientPaint(IDictionary<float, string> stops, Spot start)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

start Spot

the starting spot for the gradient

RadialGradientPaint(IDictionary<float, string>, Spot, Spot)

Constructs a RadialGradientPaint with the given stops and start and end Spots.

public RadialGradientPaint(IDictionary<float, string> stops, Spot start, Spot end)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

start Spot

the starting spot for the gradient

end Spot

the ending spot for the gradient

RadialGradientPaint(IDictionary<float, string>, Spot, Spot, double, double)

Constructs a RadialGradientPaint with the given stops, start and end Spots, and start and end radius.

public RadialGradientPaint(IDictionary<float, string> stops, Spot start, Spot end, double startRadius, double endRadius)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

start Spot

the starting spot for the gradient

end Spot

the ending spot for the gradient

startRadius double

the starting radius for the gradient

endRadius double

the ending radius for the gradient

RadialGradientPaint(IDictionary<float, string>, Spot, double)

Constructs a RadialGradientPaint with the given stops and start Spot and start radius.

public RadialGradientPaint(IDictionary<float, string> stops, Spot start, double startRadius)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

start Spot

the starting spot for the gradient

startRadius double

the starting radius for the gradient

RadialGradientPaint(IDictionary<float, string>, double)

Constructs a RadialGradientPaint with the given stops and start radius.

public RadialGradientPaint(IDictionary<float, string> stops, double startRadius)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

startRadius double

the starting radius for the gradient

RadialGradientPaint(IDictionary<float, string>, double, double)

Constructs a RadialGradientPaint with the given stops and start and end radius.

public RadialGradientPaint(IDictionary<float, string> stops, double startRadius, double endRadius)

Parameters

stops IDictionary<float, string>

a dictionary mapping fractional stops to color strings

startRadius double

the starting radius for the gradient

endRadius double

the ending radius for the gradient

RadialGradientPaint((float, string)[])

Constructs a RadialGradientPaint with the given stops.

public RadialGradientPaint((float, string)[] stops)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

RadialGradientPaint((float, string)[], Spot)

Constructs a RadialGradientPaint with the given stops and start Spot.

public RadialGradientPaint((float, string)[] stops, Spot start)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

start Spot

the starting spot for the gradient

RadialGradientPaint((float, string)[], Spot, Spot)

Constructs a RadialGradientPaint with the given stops and start and end Spots.

public RadialGradientPaint((float, string)[] stops, Spot start, Spot end)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

start Spot

the starting spot for the gradient

end Spot

the ending spot for the gradient

RadialGradientPaint((float, string)[], Spot, Spot, double, double)

Constructs a RadialGradientPaint with the given stops, start and end Spots, and start and end radius.

public RadialGradientPaint((float, string)[] stops, Spot start, Spot end, double startRadius, double endRadius)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

start Spot

the starting spot for the gradient

end Spot

the ending spot for the gradient

startRadius double

the starting radius for the gradient

endRadius double

the ending radius for the gradient

RadialGradientPaint((float, string)[], Spot, double)

Constructs a RadialGradientPaint with the given stops and start Spot and start radius.

public RadialGradientPaint((float, string)[] stops, Spot start, double startRadius)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

start Spot

the starting spot for the gradient

startRadius double

the starting radius for the gradient

RadialGradientPaint((float, string)[], double)

Constructs a RadialGradientPaint with the given stops and start radius.

public RadialGradientPaint((float, string)[] stops, double startRadius)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

startRadius double

the starting radius for the gradient

RadialGradientPaint((float, string)[], double, double)

Constructs a RadialGradientPaint with the given stops and start and end radius.

public RadialGradientPaint((float, string)[] stops, double startRadius, double endRadius)

Parameters

stops (float, string)[]

an array of tuples mapping fractional stops to color strings

startRadius double

the starting radius for the gradient

endRadius double

the ending radius for the gradient

Properties

EndRadius

This read-only property returns the radius of a radial gradient at the end location. The default value is NaN.

public double EndRadius { get; }

Property Value

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.

public double StartRadius { get; }

Property Value

double

Remarks

Represents the total radius for the gradient in WinForms.

Methods

Darken(double, ColorSpace)

Darkens each color stop, called by Darken(double, ColorSpace).

public override Paint Darken(double fraction = 0.2, ColorSpace mode = ColorSpace.Lab)

Parameters

fraction double
mode ColorSpace

Returns

Paint

a new RadialGradientPaint with darkened colors

Lighten(double, ColorSpace)

Lightens each color stop, called by Lighten(double, ColorSpace).

public override Paint Lighten(double fraction = 0.2, ColorSpace mode = ColorSpace.Lab)

Parameters

fraction double
mode ColorSpace

Returns

Paint

a new RadialGradientPaint with lightened colors

ToString()

Returns a string that represents the current Paint.

public override string ToString()

Returns

string

A string that represents the current Paint.