Class MRect
Assembly: Mapsui.dll
Syntax
public class MRect : IEquatable<MRect>
Constructors
|
Edit this page
View Source
MRect(MRect)
Declaration
Parameters
| Type |
Name |
Description |
| MRect |
rect |
|
|
Edit this page
View Source
MRect(IEnumerable<MRect>)
Declaration
public MRect(IEnumerable<MRect> rects)
Parameters
|
Edit this page
View Source
MRect(double)
Declaration
public MRect(double value)
Parameters
| Type |
Name |
Description |
| double |
value |
|
|
Edit this page
View Source
MRect(double, double)
Declaration
public MRect(double x, double y)
Parameters
|
Edit this page
View Source
MRect(double, double, double, double)
Declaration
public MRect(double minX, double minY, double maxX, double maxY)
Parameters
Properties
|
Edit this page
View Source
Bottom
Declaration
public double Bottom { get; }
Property Value
|
Edit this page
View Source
Centroid
Declaration
public MPoint Centroid { get; }
Property Value
|
Edit this page
View Source
Height
Declaration
public double Height { get; }
Property Value
|
Edit this page
View Source
Left
Declaration
public double Left { get; }
Property Value
|
Edit this page
View Source
Max
Declaration
public MPoint Max { get; }
Property Value
|
Edit this page
View Source
MaxX
Declaration
public double MaxX { get; }
Property Value
|
Edit this page
View Source
MaxY
Declaration
public double MaxY { get; }
Property Value
|
Edit this page
View Source
Min
Declaration
public MPoint Min { get; }
Property Value
|
Edit this page
View Source
MinX
Declaration
public double MinX { get; }
Property Value
|
Edit this page
View Source
MinY
Declaration
public double MinY { get; }
Property Value
|
Edit this page
View Source
Right
Declaration
public double Right { get; }
Property Value
|
Edit this page
View Source
Top
Declaration
public double Top { get; }
Property Value
|
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
|
Edit this page
View Source
Width
Declaration
public double Width { get; }
Property Value
Methods
|
Edit this page
View Source
Contains(MPoint?)
Declaration
public bool Contains(MPoint? point)
Parameters
| Type |
Name |
Description |
| MPoint |
point |
|
Returns
|
Edit this page
View Source
Contains(MRect)
Declaration
public bool Contains(MRect r)
Parameters
| Type |
Name |
Description |
| MRect |
r |
|
Returns
|
Edit this page
View Source
Contains(double, double)
Declaration
public bool Contains(double x, double y)
Parameters
Returns
|
Edit this page
View Source
Copy()
Declaration
Returns
|
Edit this page
View Source
Equals(MRect?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(MRect? other)
Parameters
| Type |
Name |
Description |
| MRect |
other |
An object to compare with this object.
|
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
|
Edit this page
View Source
GetArea()
Declaration
Returns
|
Edit this page
View Source
GetBottomLeft()
Declaration
public MPoint GetBottomLeft()
Returns
|
Edit this page
View Source
GetBottomRight()
Declaration
public MPoint GetBottomRight()
Returns
|
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
|
Edit this page
View Source
GetTopLeft()
Declaration
public MPoint GetTopLeft()
Returns
|
Edit this page
View Source
GetTopRight()
Declaration
public MPoint GetTopRight()
Returns
|
Edit this page
View Source
Grow(double)
Declaration
public MRect Grow(double amount)
Parameters
| Type |
Name |
Description |
| double |
amount |
|
Returns
|
Edit this page
View Source
Grow(double, double)
Declaration
public MRect Grow(double amountInX, double amountInY)
Parameters
Returns
|
Edit this page
View Source
Intersects(MRect?)
Declaration
public bool Intersects(MRect? rect)
Parameters
| Type |
Name |
Description |
| MRect |
rect |
|
Returns
|
Edit this page
View Source
Join(MRect?)
Declaration
public MRect Join(MRect? rect)
Parameters
| Type |
Name |
Description |
| MRect |
rect |
|
Returns
|
Edit this page
View Source
Multiply(double)
Adjusts the size by increasing Width and Heigh with (Width * Height) / 2 * factor.
Declaration
public MRect Multiply(double factor)
Parameters
| Type |
Name |
Description |
| double |
factor |
|
Returns
|
Edit this page
View Source
Rotate(double)
Calculates a new quad by rotating this rect about its center by the
specified angle clockwise
Declaration
public MQuad Rotate(double degrees)
Parameters
| Type |
Name |
Description |
| double |
degrees |
Angle about which to rotate (degrees)
|
Returns
| Type |
Description |
| MQuad |
Returns the calculated quad
|
|
Edit this page
View Source
ToString()
Returns a string representation of the vertices from bottom-left and top-right
Declaration
public override string ToString()
Returns
| Type |
Description |
| string |
Returns the string
|
Overrides
Operators
|
Edit this page
View Source
operator ==(MRect?, MRect?)
Declaration
public static bool operator ==(MRect? left, MRect? right)
Parameters
Returns
|
Edit this page
View Source
operator !=(MRect?, MRect?)
Declaration
public static bool operator !=(MRect? left, MRect? right)
Parameters
Returns
Implements
Extension Methods