Show / Hide Table of Contents

Class RectangleF

Structure using the same layout than System.Drawing.RectangleF

Inheritance
System.Object
RectangleF
Namespace: VRageMath
Assembly: VRage.Math.dll
Syntax
public sealed class RectangleF : ValueType, IEquatable<RectangleF>

Constructors

RectangleF(Single, Single, Single, Single)

Initializes a new instance of the RectangleF struct.

Declaration
public RectangleF(float x, float y, float width, float height)
Parameters
Type Name Description
System.Single x

The x.

System.Single y

The y.

System.Single width

The width.

System.Single height

The height.

RectangleF(Vector2, Vector2)

Initializes a new instance of the RectangleF struct.

Declaration
public RectangleF(Vector2 position, Vector2 size)
Parameters
Type Name Description
Vector2 position

The x-y position of this rectangle.

Vector2 size

The x-y size of this rectangle.

Fields

Position

The Position.

Declaration
public Vector2 Position
Field Value
Type Description
Vector2

Size

The Size.

Declaration
public Vector2 Size
Field Value
Type Description
Vector2

Properties

Bottom

Declaration
public float Bottom { get; }
Property Value
Type Description
System.Single

Center

Declaration
public Vector2 Center { get; }
Property Value
Type Description
Vector2

Height

Height of this rectangle.

Declaration
public float Height { get; set; }
Property Value
Type Description
System.Single

Right

Declaration
public float Right { get; }
Property Value
Type Description
System.Single

Width

Width of this rectangle.

Declaration
public float Width { get; set; }
Property Value
Type Description
System.Single

X

Left coordinate.

Declaration
public float X { get; set; }
Property Value
Type Description
System.Single

Y

Top coordinate.

Declaration
public float Y { get; set; }
Property Value
Type Description
System.Single

Methods

Contains(Int32, Int32)

Declaration
public bool Contains(int x, int y)
Parameters
Type Name Description
System.Int32 x
System.Int32 y
Returns
Type Description
System.Boolean

Contains(Single, Single)

Declaration
public bool Contains(float x, float y)
Parameters
Type Name Description
System.Single x
System.Single y
Returns
Type Description
System.Boolean

Contains(Point)

Declaration
public bool Contains(Point point)
Parameters
Type Name Description
Point point
Returns
Type Description
System.Boolean

Contains(Vector2)

Declaration
public bool Contains(Vector2 vector2D)
Parameters
Type Name Description
Vector2 vector2D
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

Equals(RectangleF)

Equals to other rectangle

Declaration
public bool Equals(RectangleF other)
Parameters
Type Name Description
RectangleF other
Returns
Type Description
System.Boolean

GetHashCode()

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

Intersect(ref RectangleF, ref RectangleF, out RectangleF)

Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.

Declaration
public static bool Intersect(ref RectangleF value1, ref RectangleF value2, out RectangleF result)
Parameters
Type Name Description
RectangleF value1

The first Rectangle to compare.

RectangleF value2

The second Rectangle to compare.

RectangleF result

[OutAttribute] The area where the two first parameters overlap.

Returns
Type Description
System.Boolean

Min(Nullable<RectangleF>, Nullable<RectangleF>)

Declaration
public static RectangleF Min(Nullable<RectangleF> rectangle, Nullable<RectangleF> scissors)
Parameters
Type Name Description
System.Nullable<RectangleF> rectangle
System.Nullable<RectangleF> scissors
Returns
Type Description
RectangleF

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Equality(RectangleF, RectangleF)

Implements the operator ==.

Declaration
public static bool operator ==(RectangleF left, RectangleF right)
Parameters
Type Name Description
RectangleF left

The left.

RectangleF right

The right.

Returns
Type Description
System.Boolean

The result of the operator.

Inequality(RectangleF, RectangleF)

Implements the operator !=.

Declaration
public static bool operator !=(RectangleF left, RectangleF right)
Parameters
Type Name Description
RectangleF left

The left.

RectangleF right

The right.

Returns
Type Description
System.Boolean

The result of the operator.

☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾