Show / Hide Table of Contents

    Class Quad

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

    Inheritance
    System.Object
    Quad
    Implements
    System.IEquatable<Quad>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Mapsui.Geometries
    Assembly: Mapsui.Geometries.dll
    Syntax
    public class Quad : IEquatable<Quad>
    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

    | Improve this Doc View Source

    Quad()

    Declaration
    public Quad()
    | Improve this Doc View Source

    Quad(Point, Point, Point, Point)

    Declaration
    public Quad(Point bottomLeft, Point topLeft, Point topRight, Point bottomRight)
    Parameters
    Type Name Description
    Point bottomLeft
    Point topLeft
    Point topRight
    Point bottomRight
    | Improve this Doc View Source

    Quad(Quad)

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

    Properties

    | Improve this Doc View Source

    BottomLeft

    Declaration
    public Point BottomLeft { get; set; }
    Property Value
    Type Description
    Point
    | Improve this Doc View Source

    BottomRight

    Declaration
    public Point BottomRight { get; set; }
    Property Value
    Type Description
    Point
    | Improve this Doc View Source

    TopLeft

    Declaration
    public Point TopLeft { get; set; }
    Property Value
    Type Description
    Point
    | Improve this Doc View Source

    TopRight

    Declaration
    public Point TopRight { get; set; }
    Property Value
    Type Description
    Point
    | Improve this Doc View Source

    Vertices

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

    Declaration
    public IEnumerable<Point> Vertices { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Point>

    Methods

    | Improve this Doc View Source

    Equals(Quad)

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

    Declaration
    public bool Equals(Quad other)
    Parameters
    Type Name Description
    Quad other

    Other object to compare

    Returns
    Type Description
    System.Boolean

    Returns true if they are equal

    | Improve this Doc 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
    System.Object obj

    Other object to compare

    Returns
    Type Description
    System.Boolean

    Returns true if they are equal

    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Returns a hash code for the specified object

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the specified object

    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    Rotate(Double, Double, Double)

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

    Declaration
    public Quad Rotate(double degrees, double centerX, double centerY)
    Parameters
    Type Name Description
    System.Double degrees

    Angle to rotate clockwise (degrees)

    System.Double centerX

    X coordinate of point about which to rotate

    System.Double centerY

    Y coordinate of point about which to rotate

    Returns
    Type Description
    Quad

    Returns the rotate quad

    | Improve this Doc View Source

    ToBoundingBox()

    Calculates a new bounding box that encompasses all 4 vertices.

    Declaration
    public BoundingBox ToBoundingBox()
    Returns
    Type Description
    BoundingBox

    Returns the calculate bounding box

    | Improve this Doc 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
    System.String

    Returns the string

    Overrides
    System.Object.ToString()

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX