Class GradientPaint
- Namespace
- Northwoods.Go
- Assembly
- Northwoods.GoDiagram.WinForms.dll
A GradientPaint holds information describing how to draw a linear or radial gradient. GradientPaints are immutable.
public abstract class GradientPaint : Paint, ICloneable
- Inheritance
-
GradientPaint
- Implements
- Derived
- Inherited Members
Constructors
GradientPaint(GradientPaint)
Costructs a copy of the given GradientPaint.
public GradientPaint(GradientPaint p)
Parameters
p
GradientPaintthe GradientPaint to copy from
GradientPaint(IDictionary<float, string>)
Constructs a GradientPaint with the given stops.
public GradientPaint(IDictionary<float, string> stops)
Parameters
stops
IDictionary<float, string>a dictionary mapping fractional stops to color strings
GradientPaint(IDictionary<float, string>, Spot, Spot)
Constructs a GradientPaint with the given stops and start and end Spots.
public GradientPaint(IDictionary<float, string> stops, Spot start, Spot end)
Parameters
stops
IDictionary<float, string>a dictionary mapping fractional stops to color strings
start
Spotthe starting spot for the gradient
end
Spotthe ending spot for the gradient
GradientPaint((float, string)[])
Constructs a GradientPaint with the given stops.
public GradientPaint((float, string)[] stops)
Parameters
GradientPaint((float, string)[], Spot, Spot)
Constructs a GradientPaint with the given stops and start and end Spots.
public GradientPaint((float, string)[] stops, Spot start, Spot end)
Parameters
stops
(float, string)[]an array of tuples mapping fractional stops to color strings
start
Spotthe starting spot for the gradient
end
Spotthe ending spot for the gradient
Properties
ColorStops
This read-only property returns an immutable dictionary holding all of the color stops used in this gradient, where the key is a number, the fractional distance between 0 and 1 (inclusive), and where the corresponding value is a color string.
public ImmutableDictionary<float, string> ColorStops { get; }
Property Value
Remarks
If you need to add a color stop, you should construct a new gradient.
End
This read-only property returns the ending location for a linear or radial gradient.
public Spot End { get; }
Property Value
Remarks
A Spot value specifies a relative point in the object's NaturalBounds. The default value is Bottom for linear gradients and Center for radial gradients.
This field is ignored in WinForms.
Start
This read-only property returns the starting location for a gradient.
public Spot Start { get; }
Property Value
Remarks
A Spot value specifies a relative point in the object's NaturalBounds. The default value is Top for linear gradients and Center for radial gradients.