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
Inherited Members
Namespace: JoeScan.Pinchot
Assembly: JoeScan.Pinchot.dll
Syntax
public struct Point2D : IEquatable<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, int)
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. |
int | brightness | The brightness value. |
Point2D(float, float)
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 |
---|---|---|
float | x | The X value in ScanSystemUnits. |
float | y | The Y value in ScanSystemUnits. |
Point2D(float, float, int)
Initializes a new instance of the Point2D struct.
Declaration
public Point2D(float x, float y, int brightness)
Parameters
Type | Name | Description |
---|---|---|
float | x | The X value in ScanSystemUnits. |
float | y | The Y value in ScanSystemUnits. |
int | 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 |
---|---|
int | The brightness value. |
IsValid
Checks if the point holds valid data.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
X
Gets or sets the X coordinate value in ScanSystemUnits.
Declaration
public float X { get; set; }
Property Value
Type | Description |
---|---|
float | 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 |
---|---|
float | 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 |
---|---|
bool |
|
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 object.
Declaration
public override bool Equals(object point)
Parameters
Type | Name | Description |
---|---|---|
object | point | The object to test for equality. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
| Improve this Doc View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer hash code. |
Overrides
Operators
| Improve this Doc View Sourceoperator ==(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 |
---|---|
bool |
|
operator !=(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 |
---|---|
bool |
|