Class Point
A point (x and y coordinates).
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Point
Constructors
Point()
Initializes a new instance of the Point class.
Declaration
public Point()
Point(Int32, Int32)
Initializes a new instance of the Point class.
Declaration
public Point(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
System. |
x | The X coordinate. |
System. |
y | The Y coordinate. |
Properties
Empty
Gets the empty point (0,0).
Declaration
public static Point Empty { get; }
Property Value
Type | Description |
---|---|
Point |
X
Gets or sets the X coordinate.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System. |
Y
Gets or sets the Y coordinate.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
Equals(Point)
Determines whether the specified point is equivalent to the current point. Does not require the object pointers to match.
Declaration
public bool Equals(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The point to compare with the current object. |
Returns
Type | Description |
---|---|
System. |
true if the specified point is equivalent to the current point; otherwise, false. |
Equals(Object)
Determines whether the specified object is equivalent to the current point. Does not require the object pointers to match.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System. |
true if the specified object is equivalent to the current object; otherwise, false. |
Overrides
FromJson(String)
Deserializes an instance from JSON.
Declaration
public static Point FromJson(string pointJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
pointJson | The JSON to deserialize. |
Returns
Type | Description |
---|---|
Point | The deserialized point. |
FromStruct(Point)
Converts a System.Drawing.Point to a Point.
Declaration
public static Point FromStruct(Point point)
Parameters
Type | Name | Description |
---|---|---|
System. |
point |
Returns
Type | Description |
---|---|
Point |
GetHashCode()
Gets a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
A hash code. |
Overrides
IsEquivalent(Point)
Determines whether the specified point is equivalent.
Declaration
public bool IsEquivalent(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The point. |
Returns
Type | Description |
---|---|
System. |
IsEquivalent(Point, Point)
Determines whether the two points are equivalent.
Declaration
public static bool IsEquivalent(Point point1, Point point2)
Parameters
Returns
Type | Description |
---|---|
System. |
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |
ToJson(Point)
Serializes an instance to JSON.
Declaration
public static string ToJson(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The point. |
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |
ToString()
Returns a string that represents this instance using format "{x},{y}".
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
Overrides
ToStruct()
Converts this Point to a System.Drawing.Point.
Declaration
public Point ToStruct()
Returns
Type | Description |
---|---|
System. |
ToStruct(Point)
Converts a Point to a System.Drawing.Point.
Declaration
public static Point ToStruct(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point |
Returns
Type | Description |
---|---|
System. |
Operators
Equality(Point, Point)
Determines whether the specified point is equivalent to the current point. Does not require the object pointers to match.
Declaration
public static bool operator ==(Point point1, Point point2)
Parameters
Returns
Type | Description |
---|---|
System. |
true if the specified point is equivalent to the current point; otherwise, false. |
Inequality(Point, Point)
Determines whether the specified point is NOT equivalent to the current point.
Declaration
public static bool operator !=(Point point1, Point point2)
Parameters
Returns
Type | Description |
---|---|
System. |
true if the specified point is NOT equivalent to the current point; otherwise, false. |