User Tools

Site Tools


thinkgeo.mapsuite.windowsphonecore.geocolor

ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

<!– Structure –> This structure represents a color for drawing on a GeoCanvas.

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodGeoColor Int32, Int32, Int32 This constructor creates a new color.
Public MethodGeoColor Int32, Int32, Int32, Int32 This constructor creates a new color.
Public MethodGeoColor Int32, GeoColor This constructor creates a new color.

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodEquals Object Object(overriden) This method is an override of the Equals functionality.
Public MethodStatic MemberFromAhsl Int32, Single, Single, Single This parameter specifies the red component of the color. This method returns a GeoColor based on the Alpha, Hue, Saturation, and Luminosity components.
Public MethodStatic MemberFromArgb Int32, GeoColor This method returns a GeoColor based on the Alpha, Red, Green, and Blue components.
Public MethodStatic MemberFromArgb Int32, Int32, Int32, Int32 This method returns a GeoColor based on the Alpha, Red, Green, and Blue components.
Public MethodStatic MemberFromHtml String This method returns a GeoColor from an HTML color (either in hexadecimal or a named color).
Public MethodStatic MemberFromOle Int32 This method returns a GeoColor from an OLE color.
Public MethodStatic MemberFromWin32 Int32 This method returns a GeoColor from a Win32 color.
Public MethodStatic MemberGetColorsInHueFamily GeoColor, Int32 This method returns a collection of GeoColors based on the same hue that is passed in.
Public MethodStatic MemberGetColorsInQualityFamily GeoColor, Int32 This method returns a collection of GeoColors based on the same quality (luminosity and saturation) that is passed in.
Public MethodGetHashCode Object(overriden) This method is an override of the GetHashCode functionality.
Public MethodStatic MemberGetRandomGeoColor RandomColorType Creates a random GeoColor structure based on the specific ColorType
Public MethodStatic MemberGetRandomGeoColor Int32, RandomColorType Creates a random GeoColor structure
Public MethodGetType Object
Public MethodStatic MemberToHtml GeoColor This method returns an HTML color from a GeoColor.
Public MethodStatic MemberToOle GeoColor This method returns an OLE color from a GeoColor.
Public MethodToString Object(overriden)
Public MethodStatic MemberToWin32 GeoColor This method returns a Win32 color from a GeoColor.

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodFinalize Object
Protected MethodMemberwiseClone Object

Public Properties

Name Return DeclaringType Summary
Public PropertyAlphaComponent Byte This property returns the alpha component of the GeoColor.
Public PropertyBlueComponent Byte This property returns the blue component of the GeoColor.
Public PropertyStatic MemberGeographicColors GeographicColors This method returns a list of commonly-used predefined geographic colors.
Public PropertyGreenComponent Byte This property returns the green component of the GeoColor.
Public PropertyHue Single This property returns the hue component of the GeoColor.
Public PropertyIsTransparent Boolean Verify if the GeoColor is transparent, it is considered to be transparent if the Alpha Value is 0.
Public PropertyLuminance Single This property returns the luminance component of the GeoColor.
Public PropertyRedComponent Byte This property returns the red component of the GeoColor.
Public PropertySaturation Single This property returns the saturation component of the GeoColor.
Public PropertyStatic MemberSimpleColors SimpleColors This method returns a list of simple predefined colors.
Public PropertyStatic MemberStandardColors StandardColors This method returns a list of commonly-used predefined colors.

Protected Properties

Name Return DeclaringType Summary

Public Events

Name Event Arguments DeclaringType Summary

Public Constructors

GeoColor(Int32, Int32, Int32)

This constructor creates a new color.

Overloads

This constructor allows you to specify the red, green, and blue component.

Parameters

Name Type Description
red Int32<!– System.Int32 –> This parameter specifies the red component of the color.
green Int32<!– System.Int32 –> This parameter specifies the green component of the color.
blue Int32<!– System.Int32 –> This parameter specifies the blue component of the color.

Go Back

GeoColor(Int32, Int32, Int32, Int32)

This constructor creates a new color.

Overloads

This constructor allows you to specify the red, green, blue, and alpha component.

Parameters

Name Type Description
alpha Int32<!– System.Int32 –> This parameter specifies the alpha, or transparent, component of the color.
red Int32<!– System.Int32 –> This parameter specifies the red component of the color.
green Int32<!– System.Int32 –> This parameter specifies the green component of the color.
blue Int32<!– System.Int32 –> This parameter specifies the blue component of the color.

Go Back

GeoColor(Int32, GeoColor)

This constructor creates a new color.

Overloads

This overload creates a transparent version of another color.

Remarks

You can use this overload to create a transparent version of another color.

Parameters

Name Type Description
alpha Int32<!– System.Int32 –> This parameter specifies the alpha component. An alpha of 0 is totally transparent.
color GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter specifies the base color.

Go Back

Protected Constructors

Public Methods

Equals(Object)

This method is an override of the Equals functionality.

Return Value

Return Type Description
Boolean<!– System.Boolean –> This method returns the Equals functionality.

Parameters

Name Type Description
obj Object<!– System.Object –> This parameter is the object you want to check to see if it is equal to the current instance.

<!– System.Object(overriden) –> Go Back

FromAhsl(Int32, Single, Single, Single)

<!– static –> This parameter specifies the red component of the color. This method returns a GeoColor based on the Alpha, Hue, Saturation, and Luminosity components.

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –>

Parameters

Name Type Description
alpha Int32<!– System.Int32 –> This parameter specifies the alpha, or transparent, component of the color.
hue Single<!– System.Single –> This parameter specifies the hue component of the color.
saturation Single<!– System.Single –> This parameter specifies the saturation component of the color.
luminance Single<!– System.Single –> This parameter specifies the luminance component of the color.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

FromArgb(Int32, GeoColor)

<!– static –> This method returns a GeoColor based on the Alpha, Red, Green, and Blue components.

Overloads

This method creates a transparent version of another color.

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> You can use this overload to create a transparent version of another color.

Parameters

Name Type Description
alpha Int32<!– System.Int32 –> This parameter determines how transparent the color is. An alpha of 0 means it is totally transparent.
baseColor GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter is the color you want to apply the transparency to.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

FromArgb(Int32, Int32, Int32, Int32)

<!– static –> This method returns a GeoColor based on the Alpha, Red, Green, and Blue components.

Overloads

This overload lets you specify each component.

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This method returns a GeoColor based on the Alpha, Red, Green, and Blue components.

Parameters

Name Type Description
alpha Int32<!– System.Int32 –> This parameter specifies the alpha, or transparent, component of the color.
red Int32<!– System.Int32 –> This parameter specifies the red component of the color.
green Int32<!– System.Int32 –> This parameter specifies the green component of the color.
blue Int32<!– System.Int32 –> This parameter specifies the blue component of the color.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

FromHtml(String)

<!– static –> This method returns a GeoColor from an HTML color (either in hexadecimal or a named color).

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This method returns a GeoColor from an HTML color (either in hexadecimal or a named color).

Parameters

Name Type Description
htmlColor String<!– System.String –> This parameter represents the HTML color that you want to convert.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

FromOle(Int32)

<!– static –> This method returns a GeoColor from an OLE color.

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This method returns a GeoColor from an OLE color.

Parameters

Name Type Description
oleColor Int32<!– System.Int32 –> This parameter represents the OLE color you want to convert.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

FromWin32(Int32)

<!– static –> This method returns a GeoColor from a Win32 color.

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This method returns a GeoColor from a Win32 color.

Parameters

Name Type Description
win32Color Int32<!– System.Int32 –> This parameter represents the Win32 color you want to convert.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GetColorsInHueFamily(GeoColor, Int32)

<!– static –> This method returns a collection of GeoColors based on the same hue that is passed in.

Remarks

This method is useful when you want to get a number of colors that have the same hue. For example, you can use this in maps that represent class breaks. If you passed in a red hue, then the method would return variations such as light red, dark red, pastel red, etc.

Return Value

Return Type Description
Collection<GeoColor><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor} –> This method returns a collection of GeoColors based on the same hue that is passed in.

Parameters

Name Type Description
baseColor GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter is the color on which you want to base the color collection.
numbersOfColors Int32<!– System.Int32 –> This parameter represents the number of colors you want returned from the method.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GetColorsInQualityFamily(GeoColor, Int32)

<!– static –> This method returns a collection of GeoColors based on the same quality (luminosity and saturation) that is passed in.

Remarks

This method is useful when you want to get a number of different colors that have the same quality. For example, you can use this in maps that represent countries or connected places. If you passed in bright red, then the method would return variants such as bright blue, bright green, etc. If you passed in dark red, you would get dark blue, dark green, etc.

Return Value

Return Type Description
Collection<GeoColor><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor} –> This method returns a collection of GeoColors based on the same quality (luminosity and saturation) that is passed in.

Parameters

Name Type Description
baseColor GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter is the color on which you want to base the color collection.
numberOfColors Int32<!– System.Int32 –> This parameter represents the number of colors you want returned from the method.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GetHashCode()

This method is an override of the GetHashCode functionality.

Return Value

Return Type Description
Int32<!– System.Int32 –> This method returns the hash code.

Parameters

Name Type Description

<!– System.Object(overriden) –> Go Back

GetRandomGeoColor(RandomColorType)

<!– static –> Creates a random GeoColor structure based on the specific ColorType

Overloads

Creates a GeoColor structure with random color

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> A GeoColor structure the method created.

Parameters

Name Type Description
colorType RandomColorType<!– ThinkGeo.MapSuite.WindowsPhoneCore.RandomColorType –> A ColorType defines types of color.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GetRandomGeoColor(Int32, RandomColorType)

<!– static –> Creates a random GeoColor structure

Overloads

Creates a GeoColor structure with random color

Return Value

Return Type Description
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> A GeoColor structure the method created.

Parameters

Name Type Description
alpha Int32<!– System.Int32 –> The alpha component. Valid values are 0 through 255.
colorType RandomColorType<!– ThinkGeo.MapSuite.WindowsPhoneCore.RandomColorType –> A ColorType defines types of color.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GetType()

Return Value

Return Type Description
Type<!– System.Type –>

Parameters

Name Type Description

<!– System.Object –> Go Back

ToHtml(GeoColor)

<!– static –> This method returns an HTML color from a GeoColor.

Return Value

Return Type Description
String<!– System.String –> This method returns an HTML color from a GeoColor.

Parameters

Name Type Description
color GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter represents the GeoColor you want to convert.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

ToOle(GeoColor)

<!– static –> This method returns an OLE color from a GeoColor.

Return Value

Return Type Description
Int32<!– System.Int32 –> This method returns an OLE color from a GeoColor.

Parameters

Name Type Description
color GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter represents the GeoColor you want to convert.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

ToString()

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description

<!– System.Object(overriden) –> Go Back

ToWin32(GeoColor)

<!– static –> This method returns a Win32 color from a GeoColor.

Return Value

Return Type Description
Int32<!– System.Int32 –> This method returns a Win32 color from a GeoColor.

Parameters

Name Type Description
color GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter represents the GeoColor you want to convert.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

Protected Methods

Finalize()

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– System.Object –> Go Back

MemberwiseClone()

Return Value

Return Type Description
Object<!– System.Object –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Public Properties

AlphaComponent

This property returns the alpha component of the GeoColor.

Return Value

Return Type
Byte<!– System.Byte –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

BlueComponent

This property returns the blue component of the GeoColor.

Return Value

Return Type
Byte<!– System.Byte –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GeographicColors

<!– static –> This method returns a list of commonly-used predefined geographic colors.

Remarks

You can use these as colors to represent many different types of geographic features.

Return Value

Return Type
GeographicColors<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeographicColors –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

GreenComponent

This property returns the green component of the GeoColor.

Return Value

Return Type
Byte<!– System.Byte –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

Hue

This property returns the hue component of the GeoColor.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

IsTransparent

Verify if the GeoColor is transparent, it is considered to be transparent if the Alpha Value is 0.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

Luminance

This property returns the luminance component of the GeoColor.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

RedComponent

This property returns the red component of the GeoColor.

Return Value

Return Type
Byte<!– System.Byte –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

Saturation

This property returns the saturation component of the GeoColor.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

SimpleColors

<!– static –> This method returns a list of simple predefined colors.

Return Value

Return Type
SimpleColors<!– ThinkGeo.MapSuite.WindowsPhoneCore.SimpleColors –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

StandardColors

<!– static –> This method returns a list of commonly-used predefined colors.

Return Value

Return Type
StandardColors<!– ThinkGeo.MapSuite.WindowsPhoneCore.StandardColors –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> Go Back

Protected Properties

Public Events

thinkgeo.mapsuite.windowsphonecore.geocolor.txt · Last modified: 2017/03/16 21:59 (external edit)