Search Results for

    Show / Hide Table of Contents

    Class MQuad

    Double precision polygon with 4 explicit vertices. This is useful to represent a MRect that has been rotated.

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

    The sides do not have to be parallel to the two axes of the coordinate system. If this has been rotated, the 'BottomLeft' vertex may not actually be the min point in x/y.

    Constructors

    | Edit this page View Source

    MQuad()

    Declaration
    public MQuad()
    | Edit this page View Source

    MQuad(MPoint, MPoint, MPoint, MPoint)

    Declaration
    public MQuad(MPoint bottomLeft, MPoint topLeft, MPoint topRight, MPoint bottomRight)
    Parameters
    Type Name Description
    MPoint bottomLeft
    MPoint topLeft
    MPoint topRight
    MPoint bottomRight
    | Edit this page View Source

    MQuad(MQuad)

    Declaration
    public MQuad(MQuad quad)
    Parameters
    Type Name Description
    MQuad quad

    Properties

    | Edit this page View Source

    BottomLeft

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

    BottomRight

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

    TopLeft

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

    TopRight

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

    Vertices

    Returns the vertices in clockwise order from bottom left around to bottom right

    Declaration
    public IEnumerable<MPoint> Vertices { get; }
    Property Value
    Type Description
    IEnumerable<MPoint>

    Methods

    | Edit this page View Source

    Equals(MQuad?)

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

    Declaration
    public bool Equals(MQuad? other)
    Parameters
    Type Name Description
    MQuad other

    Other object to compare

    Returns
    Type Description
    bool

    Returns true if they are equal

    | Edit this page View Source

    Equals(object?)

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

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

    Other object to compare

    Returns
    Type Description
    bool

    Returns true if they are equal

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

    GetHashCode()

    Returns a hash code for the specified object

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the specified object

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

    Rotate(double, double, double)

    Creates a new quad by rotate all 4 vertices clockwise about the specified center point

    Declaration
    public MQuad 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
    MQuad

    Returns the rotate quad

    | Edit this page View Source

    ToBoundingBox()

    Calculates a new bounding box that encompasses all 4 vertices.

    Declaration
    public MRect ToBoundingBox()
    Returns
    Type Description
    MRect

    Returns the calculate bounding box

    | Edit this page View Source

    ToString()

    Returns a string representation of the vertices from bottom-left clockwise to bottom-right

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    Returns the string

    Overrides
    object.ToString()

    Implements

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX