FreeImage.NET Class Library Reference
FI16RGB555 Structure |
The FI16RGB555 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.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
[SerializableAttribute] public struct FI16RGB555 : IComparable, IComparable<FI16RGB555>, IEquatable<FI16RGB555>
The FI16RGB555 type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FI16RGB555 |
Initializes a new instance based on the specified Color.
|
Properties
Name | Description | |
---|---|---|
Blue |
Gets or sets the blue color component.
| |
Color |
Gets or sets the Color of the structure.
| |
Green |
Gets or sets the green color component.
| |
Red |
Gets or sets the red color component.
|
Methods
Name | Description | |
---|---|---|
CompareTo(Object) |
Compares this instance with a specified Object.
| |
CompareTo(FI16RGB555) |
Compares this instance with a specified FI16RGB555 object.
| |
Equals(Object) |
Tests whether the specified object is a FI16RGB555 structure
and is equivalent to this FI16RGB555 structure.
(Overrides ValueTypeEquals(Object).) | |
Equals(FI16RGB555) |
Tests whether the specified FI16RGB555 structure is equivalent to this FI16RGB555 structure.
| |
GetHashCode |
Returns a hash code for this FI16RGB555 structure.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString |
Converts the numeric value of the FI16RGB555 object
to its equivalent string representation.
(Overrides ValueTypeToString.) |
Operators
Name | Description | |
---|---|---|
Equality |
Tests whether two specified FI16RGB555 structures are equivalent.
| |
(Color to FI16RGB555) |
Converts the value of a Color structure to a FI16RGB555 structure.
| |
(FI16RGB555 to Color) |
Converts the value of a FI16RGB555 structure to a Color structure.
| |
Inequality |
Tests whether two specified FI16RGB555 structures are different.
|
Remarks
For easy integration of the underlying structure into the .NET framework, the FI16RGB555 structure implements implicit conversion operators to convert the represented color to and from the Color type. This makes the Color type a real replacement for the FI16RGB555 structure and my be used in all situations which require an FI16RGB555 type.
Examples
The following code example demonstrates the various conversions between the
FI16RGB555 structure and the Color structure.
FI16RGB555 fi16rgb; // Initialize the structure using a native .NET Color structure. fi16rgb = new FI16RGB555(Color.Indigo); // Initialize the structure using the implicit operator. fi16rgb = Color.DarkSeaGreen; // Convert the FI16RGB555 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;
See Also