Search Results for

    Show / Hide Table of Contents

    Class MPoint

    Class for a point in Mapsui

    Inheritance
    object
    MPoint
    Implements
    IEquatable<MPoint>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Mapsui
    Assembly: Mapsui.dll
    Syntax
    public class MPoint : IEquatable<MPoint>

    Constructors

    | Edit this page View Source

    MPoint()

    Declaration
    public MPoint()
    | Edit this page View Source

    MPoint(MPoint)

    Declaration
    public MPoint(MPoint point)
    Parameters
    Type Name Description
    MPoint point
    | Edit this page View Source

    MPoint(double, double)

    Declaration
    public MPoint(double x, double y)
    Parameters
    Type Name Description
    double x
    double y
    | Edit this page View Source

    MPoint((double x, double y))

    Declaration
    public MPoint((double x, double y) position)
    Parameters
    Type Name Description
    (double x, double y) position

    Properties

    | Edit this page View Source

    X

    Declaration
    public double X { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    Y

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

    Methods

    | Edit this page View Source

    Copy()

    Declaration
    public MPoint Copy()
    Returns
    Type Description
    MPoint
    | Edit this page View Source

    Distance(MPoint)

    Calculate distance to a given point

    Declaration
    public double Distance(MPoint point)
    Parameters
    Type Name Description
    MPoint point

    Point for calculating distance

    Returns
    Type Description
    double

    Distance between this and given point

    | Edit this page View Source

    Equals(MPoint?)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(MPoint? point)
    Parameters
    Type Name Description
    MPoint point
    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    | Edit this page View Source

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    | Edit this page View Source

    Offset(double, double)

    Create a new MPoint with an offset (x, y) to the original one

    Declaration
    public MPoint Offset(double offsetX, double offsetY)
    Parameters
    Type Name Description
    double offsetX

    Offset in X direction

    double offsetY

    Offset in Y direction

    Returns
    Type Description
    MPoint
    | Edit this page View Source

    Rotate(double)

    Calculates a new point by rotating this point clockwise about the origin (0,0)

    Declaration
    public MPoint Rotate(double degrees)
    Parameters
    Type Name Description
    double degrees

    Angle to rotate clockwise (degrees)

    Returns
    Type Description
    MPoint

    Returns the rotated point

    | Edit this page View Source

    Rotate(double, MPoint)

    Calculates a new point by rotating this point clockwise about the specified center point

    Declaration
    public MPoint Rotate(double degrees, MPoint center)
    Parameters
    Type Name Description
    double degrees

    Angle to rotate clockwise (degrees)

    MPoint center

    MPoint about which to rotate

    Returns
    Type Description
    MPoint

    Returns the rotated point

    | Edit this page View Source

    Rotate(double, double, double)

    Calculates a new point by rotating this point clockwise about the specified center point

    Declaration
    public MPoint Rotate(double degrees, double centerX, double centerY)
    Parameters
    Type Name Description
    double degrees

    Angle to rotate clockwise (degrees)

    double centerX

    X coordinate of point about which to rotate

    double centerY

    Y coordinate of point about which to rotate

    Returns
    Type Description
    MPoint

    Returns the rotated point

    | Edit this page View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Operators

    | Edit this page View Source

    operator +(MPoint, MPoint)

    Declaration
    public static MPoint operator +(MPoint point1, MPoint point2)
    Parameters
    Type Name Description
    MPoint point1
    MPoint point2
    Returns
    Type Description
    MPoint
    | Edit this page View Source

    operator ==(MPoint?, MPoint?)

    Declaration
    public static bool operator ==(MPoint? left, MPoint? right)
    Parameters
    Type Name Description
    MPoint left
    MPoint right
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator !=(MPoint?, MPoint?)

    Declaration
    public static bool operator !=(MPoint? left, MPoint? right)
    Parameters
    Type Name Description
    MPoint left
    MPoint right
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator *(MPoint, double)

    Declaration
    public static MPoint operator *(MPoint point1, double multiplier)
    Parameters
    Type Name Description
    MPoint point1
    double multiplier
    Returns
    Type Description
    MPoint
    | Edit this page View Source

    operator -(MPoint, MPoint)

    Declaration
    public static MPoint operator -(MPoint point1, MPoint point2)
    Parameters
    Type Name Description
    MPoint point1
    MPoint point2
    Returns
    Type Description
    MPoint

    Implements

    IEquatable<T>

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX