Struct Mode
Mode struct. Represents a video mode in term of its number of columns, rows and color depth.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Cosmos.System.Graphics
Assembly: Cosmos.System2.dll
Syntax
public struct Mode
Constructors
| Improve this Doc View SourceMode(Int32, Int32, ColorDepth)
Create new instance of the Mode struct.
Declaration
public Mode(int columns, int rows, ColorDepth color_depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | columns | Number of columns. |
System.Int32 | rows | Number of rows. |
ColorDepth | color_depth | Color depth. |
Properties
| Improve this Doc View SourceColorDepth
Get color depth
Declaration
public readonly ColorDepth ColorDepth { get; }
Property Value
Type | Description |
---|---|
ColorDepth |
Height
Get rows.
Declaration
public readonly int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Width
Get columns.
Declaration
public readonly int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceCompareTo(Mode)
Compare modes.
Declaration
public int CompareTo(Mode other)
Parameters
Type | Name | Description |
---|---|---|
Mode | other | Other mode to compare to. |
Returns
Type | Description |
---|---|
System.Int32 | -1 if this smaller, +1 if this bigger, 0 otherwise. |
Equals(Mode)
Check if modes equal.
Declaration
public bool Equals(Mode other)
Parameters
Type | Name | Description |
---|---|---|
Mode | other | Other mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
Equals(Object)
Check if modes equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Get hash code.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | int value. |
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
ToString()
To string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | string value. |
Overrides
System.ValueType.ToString()
Operators
| Improve this Doc View SourceEquality(Mode, Mode)
Check if modes are equal.
Declaration
public static bool operator ==(Mode mode_a, Mode mode_b)
Parameters
Type | Name | Description |
---|---|---|
Mode | mode_a | lhs mode. |
Mode | mode_b | rhs mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
GreaterThan(Mode, Mode)
Compare modes.
Declaration
public static bool operator>(Mode mode_a, Mode mode_b)
Parameters
Type | Name | Description |
---|---|---|
Mode | mode_a | lhs mode. |
Mode | mode_b | rhs mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
GreaterThanOrEqual(Mode, Mode)
Compare modes.
Declaration
public static bool operator >=(Mode mode_a, Mode mode_b)
Parameters
Type | Name | Description |
---|---|---|
Mode | mode_a | lhs mode. |
Mode | mode_b | rhs mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
Inequality(Mode, Mode)
Check if modes are not equal.
Declaration
public static bool operator !=(Mode mode_a, Mode mode_b)
Parameters
Type | Name | Description |
---|---|---|
Mode | mode_a | lhs mode. |
Mode | mode_b | rhs mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
LessThan(Mode, Mode)
Compare modes.
Declaration
public static bool operator <(Mode mode_a, Mode mode_b)
Parameters
Type | Name | Description |
---|---|---|
Mode | mode_a | lhs mode. |
Mode | mode_b | rhs mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |
LessThanOrEqual(Mode, Mode)
Compare modes.
Declaration
public static bool operator <=(Mode mode_a, Mode mode_b)
Parameters
Type | Name | Description |
---|---|---|
Mode | mode_a | lhs mode. |
Mode | mode_b | rhs mode. |
Returns
Type | Description |
---|---|
System.Boolean | bool value. |