Public Member Functions | Properties
GridColorScheme Class Reference

A grid color scheme defines how a grid will be colored. More...

List of all members.

Public Member Functions

void ApplyColoringType (ColoringType ColoringType)
 A shortcut to apply new coloring type for each of the breaks of the colors scheme.
bool ApplyColors (tkColorSchemeType schemeType, ColorScheme scheme, bool gradientWithinCategories)
 Applies specified colors to the exiting breaks of GridColorScheme.
void ApplyGradientModel (GradientModel GradientModel)
 A shortcut to apply gradient model for each of the breaks of the colors scheme.
void Clear ()
 Clears all color breaks in the color scheme.
void DeleteBreak (int Index)
 Deletes the specified color break from the color scheme.
void Deserialize (string newVal)
 Restores the setings of the grid from the string generated by Grid.Serialize() method.
GridColorBreak get_Break (int Index)
 Gets a break from the color scheme using the specified index.
string get_ErrorMsg (int ErrorCode)
 Retrieves the error message associated with the specified error code.
Vector GetLightSource ()
 Gets the direction the light source is pointing for the color scheme in the form of a vector which originates from the light source. This only applies to hillshaded breaks.
void InsertAt (int Position, GridColorBreak Break)
 Inserts a break at the specified position of the color scheme.
void InsertBreak (GridColorBreak BrkInfo)
 Adds a break to the color scheme.
bool ReadFromFile (string mwlegFilename, string nodeName)
 Reads color scheme from .mwleg XML file.
string Serialize ()
 Serializes the setting of the grid to the string.
void SetLightSource (double Azimuth, double Elevation)
 Sets the direction of the light source.
void UsePredefined (double LowValue, double HighValue, PredefinedColorScheme Preset)
 Loads the values into the color scheme from pre-defined color scheme.
bool WriteToFile (string mwlegFilename, string gridName="", int bandIndex=1)
 Writes color scheme to the specified file.

Properties

double AmbientIntensity [get, set]
 Gets or sets the intensity of the ambient lighting for the color scheme. Only applies when creating hillshaded breaks.
ICallback GlobalCallback [get, set]
 The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.
string Key [get, set]
 The key may be used by the programmer to store any string data associated with the object.
int LastErrorCode [get]
 Retrieves the last error generated in the object.
double LightSourceAzimuth [get]
 Gets the azimuth, or compass heading of the light source. Only applies to hillshaded breaks.
double LightSourceElevation [get]
 Gets the elevation of the light source. Only applies to hillshaded breaks.
double LightSourceIntensity [get, set]
 Gets or sets the intensity of the light source for the color scheme. Only applies to hillshaded breaks.
uint NoDataColor [get, set]
 The color to use for the color scheme when drawing grid cells with a no-data value.
int NumBreaks [get]
 Gets the number of color breaks in the color scheme.

Detailed Description

A grid color scheme defines how a grid will be colored.

A grid color scheme may either contain grid color breaks created by the user, or may use a predefined color scheme.


Member Function Documentation

A shortcut to apply new coloring type for each of the breaks of the colors scheme.

Parameters:
ColoringTypeNew coloring type.
New API 4.9.1:
Added in version 4.9.1
bool GridColorScheme.ApplyColors ( tkColorSchemeType  schemeType,
ColorScheme  scheme,
bool  gradientWithinCategories 
)

Applies specified colors to the exiting breaks of GridColorScheme.

Parameters:
schemeTypeType of the scheme.
schemeColors to apply.
gradientWithinCategoriesIf true gradient within each category will be set.
Returns:
True on suceess.
New API 4.9.4:
Added in version 4.9.4

A shortcut to apply gradient model for each of the breaks of the colors scheme.

Parameters:
GradientModelNew gradient model.
New API 4.9.1:
Added in version 4.9.1

Clears all color breaks in the color scheme.

void GridColorScheme.DeleteBreak ( int  Index)

Deletes the specified color break from the color scheme.

Parameters:
IndexThe index of the color break to be removed.
void GridColorScheme.Deserialize ( string  newVal)

Restores the setings of the grid from the string generated by Grid.Serialize() method.

Parameters:
newValThe string with grid settings.

Gets a break from the color scheme using the specified index.

Parameters:
IndexThe index of the color break to be returned.
Returns:
The color break specified by the index.
string GridColorScheme.get_ErrorMsg ( int  ErrorCode)

Retrieves the error message associated with the specified error code.

Parameters:
ErrorCodeThe error code for which the error message is required.
Returns:
The error message description for the specified error code.

Gets the direction the light source is pointing for the color scheme in the form of a vector which originates from the light source. This only applies to hillshaded breaks.

Returns:
The direction the light source is pointing represented by a vector.
void GridColorScheme.InsertAt ( int  Position,
GridColorBreak  Break 
)

Inserts a break at the specified position of the color scheme.

Parameters:
PositionThe position to insert the break at.
BreakThe grid color break.

Adds a break to the color scheme.

Parameters:
BrkInfoThe grid color break.
bool GridColorScheme.ReadFromFile ( string  mwlegFilename,
string  nodeName 
)

Reads color scheme from .mwleg XML file.

Parameters:
mwlegFilenameFilename to read color scheme from.
nodeNameThe name of node to read from (usually GridColoringScheme).
Returns:
True on success.
New API 4.9.1:
Added in version 4.9.1

Serializes the setting of the grid to the string.

Returns:
The string with serialized setting of empty string on failure.
void GridColorScheme.SetLightSource ( double  Azimuth,
double  Elevation 
)

Sets the direction of the light source.

Parameters:
AzimuthThe azimuth heading of the light source. Also known as the compass heading.
ElevationThe elevation of the light source.
void GridColorScheme.UsePredefined ( double  LowValue,
double  HighValue,
PredefinedColorScheme  Preset 
)

Loads the values into the color scheme from pre-defined color scheme.

Parameters:
LowValueThe lowest value in the grid.
HighValueThe highes value in the grid.
PresetOptional. The pre-defined color scheme to be used. The default is MapWinGIS.PredefinedColorScheme.SummerMountains.
bool GridColorScheme.WriteToFile ( string  mwlegFilename,
string  gridName = "",
int  bandIndex = 1 
)

Writes color scheme to the specified file.

Parameters:
mwlegFilenameFilename to write color scheme into.
gridNameThe name of the source grid without path (should be located in the same folder). Default value is empty string.
bandIndexBand index the color scheme was created for. Default value is 1.
Returns:
True on success.
New API 4.9.1:
Added in version 4.9.1

Property Documentation

Gets or sets the intensity of the ambient lighting for the color scheme. Only applies when creating hillshaded breaks.

The global callback is the interface used by MapWinGIS to pass progress and error events to interested applications.

Deprecated:
v4.9.3 Use GlobalSettings.ApplicationCallback instead.
string GridColorScheme.Key [get, set]

The key may be used by the programmer to store any string data associated with the object.

Retrieves the last error generated in the object.

Gets the azimuth, or compass heading of the light source. Only applies to hillshaded breaks.

Gets the elevation of the light source. Only applies to hillshaded breaks.

Gets or sets the intensity of the light source for the color scheme. Only applies to hillshaded breaks.

uint GridColorScheme.NoDataColor [get, set]

The color to use for the color scheme when drawing grid cells with a no-data value.

Gets the number of color breaks in the color scheme.

 All Classes Files Functions Enumerations Properties Events