Struct Point
Represents a point consisting of a X- and a Y-position.
Implements
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public readonly struct Point : IEquatable<Point>
Constructors
| Edit this page View SourcePoint(float, float)
Initializes a new instance of the Point class using the provided values.
Declaration
public Point(float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The value used for the X-position. |
| float | y | The value used for the Y-position. |
Properties
| Edit this page View SourceInvalid
Gets a [NaN,NaN]-Point.
Declaration
public static ref readonly Point Invalid { get; }
Property Value
| Type | Description |
|---|---|
| Point |
X
Gets the X-position of this Point.
Declaration
public float X { get; }
Property Value
| Type | Description |
|---|---|
| float |
Y
Gets the Y-position of this Point.
Declaration
public float Y { get; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
| Edit this page View SourceEquals(Point)
Declaration
public bool Equals(Point other)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | other | The point to test. |
Returns
| Type | Description |
|---|---|
| bool |
|
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to test. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
| Edit this page View SourceGetHashCode()
Returns a hash code for this Point.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | An integer value that specifies the hash code for this Point. |
Overrides
| Edit this page View SourceToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that contains the X and Y of this Point. For example "[X: 100, Y: 20]". |
Overrides
Operators
| Edit this page View Sourceoperator +(in Point, in Point)
Declaration
public static Point operator +(in Point point1, in Point point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point1 | The first Point. |
| Point | point2 | The second Point. |
Returns
| Type | Description |
|---|---|
| Point | A new Point representing the addition of the two provided Point. |
operator +(in Point, in Size)
Declaration
public static Rectangle operator +(in Point point, in Size size)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point | The Point of the rectangle. |
| Size | size | The Size of the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle |
operator /(in Point, in Point)
Declaration
public static Point operator /(in Point point1, in Point point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point1 | The first Point. |
| Point | point2 | The second Point. |
Returns
| Type | Description |
|---|---|
| Point | A new Point representing the division of the two provided Point. |
operator ==(in Point, in Point)
Returns a value that indicates whether two specified Point are equal.
Declaration
public static bool operator ==(in Point point1, in Point point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point1 | The first Point to compare. |
| Point | point2 | The second Point to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|
operator !=(in Point, in Point)
Returns a value that indicates whether two specified Point are equal.
Declaration
public static bool operator !=(in Point point1, in Point point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point1 | The first Point to compare. |
| Point | point2 | The second Point to compare. |
Returns
| Type | Description |
|---|---|
| bool |
|
operator *(in Point, in Point)
Declaration
public static Point operator *(in Point point1, in Point point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point1 | The first Point. |
| Point | point2 | The second Point. |
Returns
| Type | Description |
|---|---|
| Point | A new Point representing the multiplication of the two provided Point. |
operator *(in Point, in Scale)
Declaration
public static Point operator *(in Point point, in Scale scale)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point | The Point. |
| Scale | scale | The Scale. |
Returns
| Type | Description |
|---|---|
| Point | A new Point representing the multiplication of the Point and the provided Scale. |
operator -(in Point, in Point)
Declaration
public static Point operator -(in Point point1, in Point point2)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | point1 | The first Point. |
| Point | point2 | The second Point. |
Returns
| Type | Description |
|---|---|
| Point | A new Point representing the subtraction of the two provided Point. |