C# Class SharpMap.Rendering.Thematics.ColorBlend

Defines arrays of colors and positions used for interpolating color blending in a multicolor gradient.
Afficher le fichier Open project: jumpinjackie/fdotoolbox Class Usage Examples

Méthodes publiques

Méthode Description
ColorBlend ( System colors, float positions ) : System

Initializes a new instance of the ColorBlend class.

GetColor ( float pos ) : Color

Gets the color from the scale at position 'pos'.

If the position is outside the scale [0..1] only the fractional part is used (in other words the scale restarts for each integer-part).

ThreeColors ( System fromColor, System middleColor, System toColor ) : ColorBlend

Creates a linear gradient scale from three colors

ToBrush ( Rectangle rectangle, float angle ) : LinearGradientBrush

Converts the color blend to a gradient brush

TwoColors ( System fromColor, System toColor ) : ColorBlend

Creates a linear gradient scale from two colors

Private Methods

Méthode Description
ColorBlend ( ) : System

Method Details

ColorBlend() public méthode

Initializes a new instance of the ColorBlend class.
public ColorBlend ( System colors, float positions ) : System
colors System An array of Color structures that represents the colors to use at corresponding positions along a gradient.
positions float An array of values that specify percentages of distance along the gradient line.
Résultat System

GetColor() public méthode

Gets the color from the scale at position 'pos'.
If the position is outside the scale [0..1] only the fractional part is used (in other words the scale restarts for each integer-part).
public GetColor ( float pos ) : Color
pos float Position on scale between 0.0f and 1.0f
Résultat System.Drawing.Color

ThreeColors() public static méthode

Creates a linear gradient scale from three colors
public static ThreeColors ( System fromColor, System middleColor, System toColor ) : ColorBlend
fromColor System
middleColor System
toColor System
Résultat ColorBlend

ToBrush() public méthode

Converts the color blend to a gradient brush
public ToBrush ( Rectangle rectangle, float angle ) : LinearGradientBrush
rectangle Rectangle
angle float
Résultat System.Drawing.Drawing2D.LinearGradientBrush

TwoColors() public static méthode

Creates a linear gradient scale from two colors
public static TwoColors ( System fromColor, System toColor ) : ColorBlend
fromColor System
toColor System
Résultat ColorBlend