Class PointPairBase
This is a base class that provides base-level functionality for a data point consisting of an (X,Y) pair of double values.
Implements
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class PointPairBase : ISerializable
Remarks
This class is typically a base class for actual PointPair type implementations.
Constructors
| Improve this Doc View SourcePointPairBase()
Default Constructor
Declaration
public PointPairBase()
PointPairBase(Double, Double)
Creates a point pair with the specified X and Y.
Declaration
public PointPairBase(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
Double | x | This pair's x coordinate. |
Double | y | This pair's y coordinate. |
PointPairBase(PointF)
Creates a point pair from the specified PointF struct.
Declaration
public PointPairBase(PointF pt)
Parameters
Type | Name | Description |
---|---|---|
PointF | pt | The PointF struct from which to get the new PointPair values. |
PointPairBase(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected PointPairBase(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | A SerializationInfo instance that defines the serialized data |
StreamingContext | context | A StreamingContext instance that contains the serialized data |
PointPairBase(PointPairBase)
The PointPairBase copy constructor.
Declaration
public PointPairBase(PointPairBase rhs)
Parameters
Type | Name | Description |
---|---|---|
PointPairBase | rhs | The basis for the copy. |
Fields
| Improve this Doc View SourceDefaultFormat
The default format to be used for displaying point values via the ToString() method.
Declaration
public const string DefaultFormat = "G"
Field Value
Type | Description |
---|---|
String |
Missing
Missing values are represented internally using MaxValue.
Declaration
public const double Missing = 1.7976931348623157E+308
Field Value
Type | Description |
---|---|
Double |
schema
Current schema value that defines the version of the serialized file
Declaration
public const int schema = 11
Field Value
Type | Description |
---|---|
Int32 |
X
This PointPair's X coordinate
Declaration
public double X
Field Value
Type | Description |
---|---|
Double |
Y
This PointPair's Y coordinate
Declaration
public double Y
Field Value
Type | Description |
---|---|
Double |
Properties
| Improve this Doc View SourceIsInvalid
Readonly value that determines if either the X or the Y coordinate in this PointPair is an invalid (not plotable) value. It is considered invalid if it is missing (equal to System.Double.Max), Infinity, or NaN.
Declaration
public bool IsInvalid { get; }
Property Value
Type | Description |
---|---|
Boolean | true if either value is invalid |
IsMissing
Readonly value that determines if either the X or the Y coordinate in this PointPair is a missing value.
Declaration
public bool IsMissing { get; }
Property Value
Type | Description |
---|---|
Boolean | true if either value is missing |
Methods
| Improve this Doc View SourceEquals(Object)
Compare two PointPairBase objects for equality. To be equal, X and Y must be exactly the same between the two objects.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The PointPairBase object to be compared with. |
Returns
Type | Description |
---|---|
Boolean | true if the PointPairBase objects are equal, false otherwise |
Overrides
| Improve this Doc View SourceGetHashCode()
Return the HashCode from the base class.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceGetObjectData(SerializationInfo, StreamingContext)
Populates a SerializationInfo instance with the data needed to serialize the target object
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | A SerializationInfo instance that defines the serialized data |
StreamingContext | context | A StreamingContext instance that contains the serialized data |
IsValueInvalid(Double)
static method to determine if the specified point value is invalid.
Declaration
public static bool IsValueInvalid(double value)
Parameters
Type | Name | Description |
---|---|---|
Double | value | The value to be checked for validity. |
Returns
Type | Description |
---|---|
Boolean | true if the value is invalid, false otherwise |
Remarks
The value is considered invalid if it is Missing, PositiveInfinity, NegativeInfinity or NaN.
ToString()
Format this PointPair value using the default format. Example: "( 12.345, -16.876 )". The two double values are formatted with the "g" format type.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of the PointPair |
Overrides
| Improve this Doc View SourceToString(String)
Format this PointPair value using a general format string. Example: a format string of "e2" would give "( 1.23e+001, -1.69e+001 )".
Declaration
public string ToString(string format)
Parameters
Type | Name | Description |
---|---|---|
String | format | A format string that will be used to format each of the two double type values (see ToString()). |
Returns
Type | Description |
---|---|
String | A string representation of the PointPair |
ToString(String, String)
Format this PointPair value using different general format strings for the X and Y values. Example: a format string of "e2" would give "( 1.23e+001, -1.69e+001 )". The Z value is not displayed (see ToString(String, String, String)).
Declaration
public string ToString(string formatX, string formatY)
Parameters
Type | Name | Description |
---|---|---|
String | formatX | A format string that will be used to format the X double type value (see ToString()). |
String | formatY | A format string that will be used to format the Y double type value (see ToString()). |
Returns
Type | Description |
---|---|
String | A string representation of the PointPair |
Operators
| Improve this Doc View SourceImplicit(PointPairBase to PointF)
Implicit conversion from PointPair to PointF. Note that this conversion can result in data loss, since the data are being cast from a type double (64 bit) to a float (32 bit).
Declaration
public static implicit operator PointF(PointPairBase pair)
Parameters
Type | Name | Description |
---|---|---|
PointPairBase | pair | The PointPair struct on which to operate |
Returns
Type | Description |
---|---|
PointF | A PointF struct equivalent to the PointPair |