Class LinearGradientPaint
- Namespace
- Northwoods.Go
- Assembly
- Northwoods.GoDiagram.WinForms.dll
A LinearGradientPaint describes how to draw a linear gradient.
public sealed class LinearGradientPaint : GradientPaint, ICloneable
- Inheritance
-
LinearGradientPaint
- Implements
- Inherited Members
Constructors
LinearGradientPaint(LinearGradientPaint)
Costructs a copy of the given LinearGradientPaint.
public LinearGradientPaint(LinearGradientPaint p)
Parameters
p
LinearGradientPaintthe LinearGradientPaint to copy from
LinearGradientPaint(IDictionary<float, string>)
Constructs a LinearGradientPaint with the given stops.
public LinearGradientPaint(IDictionary<float, string> stops)
Parameters
stops
IDictionary<float, string>a dictionary mapping fractional stops to color strings
LinearGradientPaint(IDictionary<float, string>, Spot, Spot)
Constructs a GradientPaint with the given stops and start and end Spots.
public LinearGradientPaint(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
LinearGradientPaint((float, string)[])
Constructs a GradientPaint with the given stops.
public LinearGradientPaint((float, string)[] stops)
Parameters
LinearGradientPaint((float, string)[], Spot, Spot)
Constructs a GradientPaint with the given stops and start and end Spots.
public LinearGradientPaint((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
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
doublemode
ColorSpace
Returns
- Paint
a new LinearGradientPaint 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
doublemode
ColorSpace
Returns
- Paint
a new LinearGradientPaint 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.