Class LinearGradientPaint

GoDiagram®
v10.0.11
by Northwoods Software®

A LinearGradientPaint describes how to draw a linear gradient.

Inheritance
LinearGradientPaint
Implements
Namespace: Northwoods.Go
Assembly: Northwoods.GoDiagram.Avalonia.dll
Syntax
public sealed class LinearGradientPaint : GradientPaint, ICloneable

Constructors

LinearGradientPaint(LinearGradientPaint)

Costructs a copy of the given LinearGradientPaint.

Declaration
public LinearGradientPaint(LinearGradientPaint p)
Parameters
Type Name Description
LinearGradientPaint p

the LinearGradientPaint to copy from

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

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

Declaration
public LinearGradientPaint(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

LinearGradientPaint(IDictionary<float, string>)

Constructs a LinearGradientPaint with the given stops.

Declaration
public LinearGradientPaint(IDictionary<float, string> stops)
Parameters
Type Name Description
IDictionary<float, string> stops

a dictionary mapping fractional stops to color strings

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

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

Declaration
public LinearGradientPaint((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

LinearGradientPaint((float, string)[])

Constructs a GradientPaint with the given stops.

Declaration
public LinearGradientPaint((float, string)[] stops)
Parameters
Type Name Description
(float, string)[] stops

an array of tuples mapping fractional stops to color strings

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 LinearGradientPaint 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 LinearGradientPaint 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.

Overrides

Implements