Show / Hide Table of Contents

Struct Point

Point - Defaults to 0,0

Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:ImGui
Assembly:ImGui.dll
Syntax
[Serializable]
public struct Point

Constructors

| Improve this Doc

Point(Double, Double)

Constructor which accepts the X and Y values

Declaration
public Point(double x, double y)
Parameters
Type Name Description
System.Double x

The value for the X coordinate of the new Point

System.Double y

The value for the Y coordinate of the new Point

Fields

| Improve this Doc

Invalid

Declaration
public static readonly Point Invalid
Field Value
Type Description
Point
| Improve this Doc

Zero

Declaration
public static readonly Point Zero
Field Value
Type Description
Point

Properties

| Improve this Doc

X

X - double. Default value is 0.

Declaration
public double X { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc

Y

Y - double. Default value is 0.

Declaration
public double Y { get; set; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc

Add(Point, Vector)

Add: Point + Vector

Declaration
public static Point Add(Point point, Vector vector)
Parameters
Type Name Description
Point point

The Point to be added to the Vector

Vector vector

The Vector to be added to the Point

Returns
Type Description
Point

Point - The result of the addition

| Improve this Doc

Equals(Point)

Equals - compares this Point with the passed in object. In this equality double.NaN is equal to itself, unlike in numeric equality. Note that double values can acquire error when operated upon, such that an exact comparison between two values which are logically equal may fail.

Declaration
public bool Equals(Point value)
Parameters
Type Name Description
Point value

The Point to compare to "this"

Returns
Type Description
System.Boolean

bool - true if "value" is equal to "this".

| Improve this Doc

Equals(Point, Point)

Compares two Point instances for object equality. In this equality double.NaN is equal to itself, unlike in numeric equality. Note that double values can acquire error when operated upon, such that an exact comparison between two values which are logically equal may fail.

Declaration
public static bool Equals(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The first Point to compare

Point point2

The second Point to compare

Returns
Type Description
System.Boolean

bool - true if the two Point instances are exactly equal, false otherwise

| Improve this Doc

Equals(Object)

Equals - compares this Point with the passed in object. In this equality double.NaN is equal to itself, unlike in numeric equality. Note that double values can acquire error when operated upon, such that an exact comparison between two values which are logically equal may fail.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
System.Object o

The object to compare to "this"

Returns
Type Description
System.Boolean

bool - true if the object is an instance of Point and if it's equal to "this".

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc

GetHashCode()

Returns the HashCode for this Point

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

int - the HashCode for this Point

Overrides
System.ValueType.GetHashCode()
| Improve this Doc

Offset(Double, Double)

Offset - update the location by adding offsetX to X and offsetY to Y

Declaration
public void Offset(double offsetX, double offsetY)
Parameters
Type Name Description
System.Double offsetX

The offset in the x dimension

System.Double offsetY

The offset in the y dimension

| Improve this Doc

Parse(String)

Parse - returns an instance converted from the provided string using the culture "en-US"

string with Point data
Declaration
public static Point Parse(string source)
Parameters
Type Name Description
System.String source
Returns
Type Description
Point
| Improve this Doc

Subtract(Point, Point)

Subtract: Point - Point

Declaration
public static Vector Subtract(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The Point from which point2 is subtracted

Point point2

The Point subtracted from point1

Returns
Type Description
Vector

Vector - The result of the subtraction

| Improve this Doc

Subtract(Point, Vector)

Subtract: Point - Vector

Declaration
public static Point Subtract(Point point, Vector vector)
Parameters
Type Name Description
Point point

The Point from which the Vector is subtracted

Vector vector

The Vector which is subtracted from the Point

Returns
Type Description
Point

Point - The result of the subtraction

| Improve this Doc

ToString()

Creates a string representation of this object based on the current culture.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string representation of this object.

Overrides
System.ValueType.ToString()

Operators

| Improve this Doc

Addition(Point, Vector)

Operator Point + Vector

Declaration
public static Point operator +(Point point, Vector vector)
Parameters
Type Name Description
Point point

The Point to be added to the Vector

Vector vector

The Vectr to be added to the Point

Returns
Type Description
Point

Point - The result of the addition

| Improve this Doc

Equality(Point, Point)

Compares two Point instances for exact equality. Note that double values can acquire error when operated upon, such that an exact comparison between two values which are logically equal may fail. Furthermore, using this equality operator, double.NaN is not equal to itself.

Declaration
public static bool operator ==(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The first Point to compare

Point point2

The second Point to compare

Returns
Type Description
System.Boolean

bool - true if the two Point instances are exactly equal, false otherwise

| Improve this Doc

Explicit(Point to Size)

Explicit conversion to Size. Note that since Size cannot contain negative values, the resulting size will contains the absolute values of X and Y

Declaration
public static explicit operator Size(Point point)
Parameters
Type Name Description
Point point

Point - the Point to convert to a Size

Returns
Type Description
Size

Size - A Size equal to this Point

| Improve this Doc

Explicit(Point to Vector)

Explicit conversion to Vector

Declaration
public static explicit operator Vector(Point point)
Parameters
Type Name Description
Point point

Point - the Point to convert to a Vector

Returns
Type Description
Vector

Vector - A Vector equal to this Point

| Improve this Doc

Inequality(Point, Point)

Compares two Point instances for exact inequality. Note that double values can acquire error when operated upon, such that an exact comparison between two values which are logically equal may fail. Furthermore, using this equality operator, double.NaN is not equal to itself.

Declaration
public static bool operator !=(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The first Point to compare

Point point2

The second Point to compare

Returns
Type Description
System.Boolean

bool - true if the two Point instances are exactly unequal, false otherwise

| Improve this Doc

Subtraction(Point, Point)

Operator Point - Point

Declaration
public static Vector operator -(Point point1, Point point2)
Parameters
Type Name Description
Point point1

The Point from which point2 is subtracted

Point point2

The Point subtracted from point1

Returns
Type Description
Vector

Vector - The result of the subtraction

| Improve this Doc

Subtraction(Point, Vector)

Operator Point - Vector

Declaration
public static Point operator -(Point point, Vector vector)
Parameters
Type Name Description
Point point

The Point from which the Vector is subtracted

Vector vector

The Vector which is subtracted from the Point

Returns
Type Description
Point

Point - The result of the subtraction

  • Improve this Doc
Back to top Copyright © 2016 zwcloud
Generated by DocFX