Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
FreeImageAPI.FI16RGB565 Struct Reference

The FI16RGB565 structure describes a color consisting of relative intensities of red, green, blue and alpha value. Each single color component consumes 5 bits and so, takes values in the range from 0 to 31. More...

Inheritance diagram for FreeImageAPI.FI16RGB565:
IComparable IComparable< FI16RGB565 > IEquatable< FI16RGB565 > IComparable IComparable< FI16RGB565 > IEquatable< FI16RGB565 >

Public Member Functions

 FI16RGB565 (Color color)
 Initializes a new instance based on the specified System.Drawing.Color. More...
 
int CompareTo (object obj)
 Compares this instance with a specified Object. More...
 
int CompareTo (FI16RGB565 other)
 Compares this instance with a specified FI16RGB565 object. More...
 
override bool Equals (object obj)
 Tests whether the specified object is a FI16RGB565 structure and is equivalent to this FI16RGB565 structure. More...
 
bool Equals (FI16RGB565 other)
 Tests whether the specified FI16RGB565 structure is equivalent to this FI16RGB565 structure. More...
 
override int GetHashCode ()
 Returns a hash code for this FI16RGB565 structure. More...
 
override string ToString ()
 Converts the numeric value of the FI16RGB565 object to its equivalent string representation. More...
 
 FI16RGB565 (Color color)
 Initializes a new instance based on the specified System.Drawing.Color. More...
 
int CompareTo (object obj)
 Compares this instance with a specified Object. More...
 
int CompareTo (FI16RGB565 other)
 Compares this instance with a specified FI16RGB565 object. More...
 
override bool Equals (object obj)
 Tests whether the specified object is a FI16RGB565 structure and is equivalent to this FI16RGB565 structure. More...
 
bool Equals (FI16RGB565 other)
 Tests whether the specified FI16RGB565 structure is equivalent to this FI16RGB565 structure. More...
 
override int GetHashCode ()
 Returns a hash code for this FI16RGB565 structure. More...
 
override string ToString ()
 Converts the numeric value of the FI16RGB565 object to its equivalent string representation. More...
 

Static Public Member Functions

static bool operator== (FI16RGB565 left, FI16RGB565 right)
 Tests whether two specified FI16RGB565 structures are equivalent. More...
 
static bool operator!= (FI16RGB565 left, FI16RGB565 right)
 Tests whether two specified FI16RGB565 structures are different. More...
 
static implicit operator FI16RGB565 (Color value)
 Converts the value of a System.Drawing.Color structure to a FI16RGB565 structure. More...
 
static implicit operator Color (FI16RGB565 value)
 Converts the value of a FI16RGB565 structure to a System.Drawing.Color structure. More...
 
static bool operator== (FI16RGB565 left, FI16RGB565 right)
 Tests whether two specified FI16RGB565 structures are equivalent. More...
 
static bool operator!= (FI16RGB565 left, FI16RGB565 right)
 Tests whether two specified FI16RGB565 structures are different. More...
 
static implicit operator FI16RGB565 (Color value)
 Converts the value of a System.Drawing.Color structure to a FI16RGB565 structure. More...
 
static implicit operator Color (FI16RGB565 value)
 Converts the value of a FI16RGB565 structure to a System.Drawing.Color structure. More...
 

Properties

Color Color [get, set]
 Gets or sets the System.Drawing.Color of the structure. More...
 
byte Red [get, set]
 Gets or sets the red color component. More...
 
byte Green [get, set]
 Gets or sets the green color component. More...
 
byte Blue [get, set]
 Gets or sets the blue color component. More...
 

Detailed Description

The FI16RGB565 structure describes a color consisting of relative intensities of red, green, blue and alpha value. Each single color component consumes 5 bits and so, takes values in the range from 0 to 31.

For easy integration of the underlying structure into the .NET framework, the FI16RGB565 structure implements implicit conversion operators to convert the represented color to and from the System.Drawing.Color type. This makes the System.Drawing.Color type a real replacement for the FI16RGB565 structure and my be used in all situations which require an FI16RGB565 type.

The following code example demonstrates the various conversions between the FI16RGB565 structure and the System.Drawing.Color structure.

FI16RGB565 fi16rgb;
// Initialize the structure using a native .NET Color structure.
fi16rgb = new FI16RGB565(Color.Indigo);
// Initialize the structure using the implicit operator.
fi16rgb = Color.DarkSeaGreen;
// Convert the FI16RGB565 instance into a native .NET Color
// using its implicit operator.
Color color = fi16rgb;
// Using the structure's Color property for converting it
// into a native .NET Color.
Color another = fi16rgb.Color;

Definition at line 74 of file FI16RGB565.cs.

Constructor & Destructor Documentation

FreeImageAPI.FI16RGB565.FI16RGB565 ( Color  color)

Initializes a new instance based on the specified System.Drawing.Color.

Parameters
colorSystem.Drawing.Color to initialize with.

Definition at line 85 of file FI16RGB565.cs.

Referenced by FreeImageAPI.FI16RGB565.operator FI16RGB565().

FreeImageAPI.FI16RGB565.FI16RGB565 ( Color  color)

Initializes a new instance based on the specified System.Drawing.Color.

Parameters
colorSystem.Drawing.Color to initialize with.

Definition at line 85 of file FI16RGB565.cs.

Member Function Documentation

int FreeImageAPI.FI16RGB565.CompareTo ( object  obj)

Compares this instance with a specified Object.

Parameters
objAn object to compare with this instance.
Returns
A 32-bit signed integer indicating the lexical relationship between the two comparands.
Exceptions
ArgumentExceptionobj is not a FI16RGB565.

Definition at line 211 of file FI16RGB565.cs.

Referenced by FreeImageAPI.FI16RGB565.CompareTo().

int FreeImageAPI.FI16RGB565.CompareTo ( object  obj)

Compares this instance with a specified Object.

Parameters
objAn object to compare with this instance.
Returns
A 32-bit signed integer indicating the lexical relationship between the two comparands.
Exceptions
ArgumentExceptionobj is not a FI16RGB565.

Definition at line 211 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.CompareTo().

int FreeImageAPI.FI16RGB565.CompareTo ( FI16RGB565  other)

Compares this instance with a specified FI16RGB565 object.

Parameters
otherA FI16RGB565 to compare.
Returns
A signed number indicating the relative values of this instance and other .

Definition at line 230 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.CompareTo().

int FreeImageAPI.FI16RGB565.CompareTo ( FI16RGB565  other)

Compares this instance with a specified FI16RGB565 object.

Parameters
otherA FI16RGB565 to compare.
Returns
A signed number indicating the relative values of this instance and other .

Definition at line 230 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.Color, and FreeImageAPI.FI16RGB565.CompareTo().

override bool FreeImageAPI.FI16RGB565.Equals ( object  obj)

Tests whether the specified object is a FI16RGB565 structure and is equivalent to this FI16RGB565 structure.

Parameters
objThe object to test.
Returns
true if obj is a FI16RGB565 structure equivalent to this FI16RGB565 structure; otherwise, false.

Definition at line 242 of file FI16RGB565.cs.

override bool FreeImageAPI.FI16RGB565.Equals ( object  obj)

Tests whether the specified object is a FI16RGB565 structure and is equivalent to this FI16RGB565 structure.

Parameters
objThe object to test.
Returns
true if obj is a FI16RGB565 structure equivalent to this FI16RGB565 structure; otherwise, false.

Definition at line 242 of file FI16RGB565.cs.

bool FreeImageAPI.FI16RGB565.Equals ( FI16RGB565  other)

Tests whether the specified FI16RGB565 structure is equivalent to this FI16RGB565 structure.

Parameters
otherA FI16RGB565 structure to compare to this instance.

Definition at line 251 of file FI16RGB565.cs.

bool FreeImageAPI.FI16RGB565.Equals ( FI16RGB565  other)

Tests whether the specified FI16RGB565 structure is equivalent to this FI16RGB565 structure.

Parameters
otherA FI16RGB565 structure to compare to this instance.
Returns
true if obj is a FI16RGB565 structure equivalent to this FI16RGB565 structure; otherwise, false.

Definition at line 253 of file FI16RGB565.cs.

override int FreeImageAPI.FI16RGB565.GetHashCode ( )

Returns a hash code for this FI16RGB565 structure.

Returns
An integer value that specifies the hash code for this FI16RGB565.

Definition at line 260 of file FI16RGB565.cs.

override int FreeImageAPI.FI16RGB565.GetHashCode ( )

Returns a hash code for this FI16RGB565 structure.

Returns
An integer value that specifies the hash code for this FI16RGB565.

Definition at line 262 of file FI16RGB565.cs.

static implicit FreeImageAPI.FI16RGB565.operator Color ( FI16RGB565  value)
static

Converts the value of a FI16RGB565 structure to a System.Drawing.Color structure.

Parameters
valueA FI16RGB565 structure.
Returns
A new instance of System.Drawing.Color initialized to value .

Definition at line 134 of file FI16RGB565.cs.

static implicit FreeImageAPI.FI16RGB565.operator Color ( FI16RGB565  value)
static

Converts the value of a FI16RGB565 structure to a System.Drawing.Color structure.

Parameters
valueA FI16RGB565 structure.
Returns
A new instance of System.Drawing.Color initialized to value .

Definition at line 134 of file FI16RGB565.cs.

static implicit FreeImageAPI.FI16RGB565.operator FI16RGB565 ( Color  value)
static

Converts the value of a System.Drawing.Color structure to a FI16RGB565 structure.

Parameters
valueA System.Drawing.Color structure.
Returns
A new instance of FI16RGB565 initialized to value .

Definition at line 124 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.FI16RGB565().

static implicit FreeImageAPI.FI16RGB565.operator FI16RGB565 ( Color  value)
static

Converts the value of a System.Drawing.Color structure to a FI16RGB565 structure.

Parameters
valueA System.Drawing.Color structure.
Returns
A new instance of FI16RGB565 initialized to value .

Definition at line 124 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.FI16RGB565().

static bool FreeImageAPI.FI16RGB565.operator!= ( FI16RGB565  left,
FI16RGB565  right 
)
static

Tests whether two specified FI16RGB565 structures are different.

Parameters
leftThe FI16RGB565 that is to the left of the inequality operator.
rightThe FI16RGB565 that is to the right of the inequality operator.
Returns
true if the two FI16RGB565 structures are different; otherwise, false.

Definition at line 114 of file FI16RGB565.cs.

static bool FreeImageAPI.FI16RGB565.operator!= ( FI16RGB565  left,
FI16RGB565  right 
)
static

Tests whether two specified FI16RGB565 structures are different.

Parameters
leftThe FI16RGB565 that is to the left of the inequality operator.
rightThe FI16RGB565 that is to the right of the inequality operator.
Returns
true if the two FI16RGB565 structures are different; otherwise, false.

Definition at line 114 of file FI16RGB565.cs.

static bool FreeImageAPI.FI16RGB565.operator== ( FI16RGB565  left,
FI16RGB565  right 
)
static

Tests whether two specified FI16RGB565 structures are equivalent.

Parameters
leftThe FI16RGB565 that is to the left of the equality operator.
rightThe FI16RGB565 that is to the right of the equality operator.
Returns
true if the two FI16RGB565 structures are equal; otherwise, false.

Definition at line 101 of file FI16RGB565.cs.

static bool FreeImageAPI.FI16RGB565.operator== ( FI16RGB565  left,
FI16RGB565  right 
)
static

Tests whether two specified FI16RGB565 structures are equivalent.

Parameters
leftThe FI16RGB565 that is to the left of the equality operator.
rightThe FI16RGB565 that is to the right of the equality operator.
Returns
true if the two FI16RGB565 structures are equal; otherwise, false.

Definition at line 101 of file FI16RGB565.cs.

override string FreeImageAPI.FI16RGB565.ToString ( )

Converts the numeric value of the FI16RGB565 object to its equivalent string representation.

Returns
The string representation of the value of this instance.

Definition at line 270 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.Color.

override string FreeImageAPI.FI16RGB565.ToString ( )

Converts the numeric value of the FI16RGB565 object to its equivalent string representation.

Returns
The string representation of the value of this instance.

Definition at line 272 of file FI16RGB565.cs.

References FreeImageAPI.FI16RGB565.Color.

Property Documentation

byte FreeImageAPI.FI16RGB565.Blue
getset

Gets or sets the blue color component.

Definition at line 194 of file FI16RGB565.cs.

Color FreeImageAPI.FI16RGB565.Color
getset

Gets or sets the System.Drawing.Color of the structure.

Definition at line 143 of file FI16RGB565.cs.

Referenced by FreeImageAPI.FI16RGB565.CompareTo(), and FreeImageAPI.FI16RGB565.ToString().

byte FreeImageAPI.FI16RGB565.Green
getset

Gets or sets the green color component.

Definition at line 179 of file FI16RGB565.cs.

byte FreeImageAPI.FI16RGB565.Red
getset

Gets or sets the red color component.

Definition at line 164 of file FI16RGB565.cs.


The documentation for this struct was generated from the following file: