Struct Point2D
A data point consisting of X and Y spatial coordinates and a brightness value. Invalid points have an X and Y value of ProfileDataInvalidXY and a brightness of ProfileDataInvalidBrightness.
Implements
Namespace: JoeScan.Pinchot
Assembly: JoeScan.Pinchot.dll
Syntax
public struct Point2D
Constructors
| Improve this Doc View SourcePoint2D(Double, Double)
Initializes a new instance of the Point2D struct with Brightness being set to ProfileDataInvalidBrightness.
Declaration
public Point2D(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
Double | x | The X value in ScanSystemUnits. |
Double | y | The Y value in ScanSystemUnits. |
Point2D(Double, Double, Int32)
Initializes a new instance of the Point2D struct.
Declaration
public Point2D(double x, double y, int brightness)
Parameters
Type | Name | Description |
---|---|---|
Double | x | The X value in ScanSystemUnits. |
Double | y | The Y value in ScanSystemUnits. |
Int32 | brightness | The brightness value. |
Point2D(Single, Single)
Initializes a new instance of the Point2D struct with Brightness being set to ProfileDataInvalidBrightness.
Declaration
public Point2D(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The X value in ScanSystemUnits. |
Single | y | The Y value in ScanSystemUnits. |
Point2D(Single, Single, Int32)
Initializes a new instance of the Point2D struct.
Declaration
public Point2D(float x, float y, int brightness)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The X value in ScanSystemUnits. |
Single | y | The Y value in ScanSystemUnits. |
Int32 | brightness | The brightness value. |
Properties
| Improve this Doc View SourceBrightness
Gets or sets the brightness value.
Declaration
public int Brightness { get; set; }
Property Value
Type | Description |
---|---|
Int32 | The brightness value. |
IsValid
Checks if the point holds valid data.
Declaration
public readonly bool IsValid { get; }
Property Value
Type | Description |
---|---|
Boolean | true if point is valid else false. |
X
Gets or sets the X coordinate value in ScanSystemUnits.
Declaration
public float X { get; set; }
Property Value
Type | Description |
---|---|
Single | The X coordinate value in ScanSystemUnits. |
Y
Gets or sets the Y coordinate value in ScanSystemUnits.
Declaration
public float Y { get; set; }
Property Value
Type | Description |
---|---|
Single | The Y coordinate value in ScanSystemUnits. |
Methods
| Improve this Doc View SourceEquals(Point2D)
Specifies whether this Point2D instance contains the same coordinates within 1/10,000th of an ScanSystemUnits and the same brightness as the specified Point2D.
Declaration
public bool Equals(Point2D point)
Parameters
Type | Name | Description |
---|---|---|
Point2D | point | The Point2D to test for equality. |
Returns
Type | Description |
---|---|
Boolean |
|
Equals(Object)
Specifies whether this Point2D instance contains the same coordinates within 1/10,000th of an ScanSystemUnits
and the same brightness as the specified
Declaration
public override bool Equals(object point)
Parameters
Type | Name | Description |
---|---|---|
Object | point | The |
Returns
Type | Description |
---|---|
Boolean |
|
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer hash code. |
Operators
| Improve this Doc View SourceEquality(Point2D, Point2D)
Compares two Point2D objects. The result specifies whether the two Point2D objects have coordinates within 1/10,000th of an ScanSystemUnits and have the same brightness.
Declaration
public static bool operator ==(Point2D pointA, Point2D pointB)
Parameters
Type | Name | Description |
---|---|---|
Point2D | pointA | A Point2D to compare. |
Point2D | pointB | A Point2D to compare. |
Returns
Type | Description |
---|---|
Boolean |
|
Inequality(Point2D, Point2D)
Compares two Point2D objects. The result specifies whether the two Point2D objects have coordinates that are not within 1/10,000th of an ScanSystemUnits or do not have the same brightness.
Declaration
public static bool operator !=(Point2D pointA, Point2D pointB)
Parameters
Type | Name | Description |
---|---|---|
Point2D | pointA | A Point2D to compare. |
Point2D | pointB | A Point2D to compare. |
Returns
Type | Description |
---|---|
Boolean |
|