Struct RectangleF
Represents a rectangle in 2D space.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public struct RectangleF
Constructors
| Improve this Doc View SourceRectangleF(Single, Single, Single, Single)
Initializes a new instance of the Rectangle struct.
Declaration
public RectangleF(float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | The x coordinate. |
System.Single | y | The y coordinate. |
System.Single | width | Width. |
System.Single | height | Height. |
Properties
| Improve this Doc View SourceHeight
Gets the height.
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
System.Single | The height. |
Width
Gets the width.
Declaration
public float Width { get; }
Property Value
Type | Description |
---|---|
System.Single | The width. |
X
Gets the x coordinate.
Declaration
public float X { get; }
Property Value
Type | Description |
---|---|
System.Single | The x. |
Y
Gets the y coordinate.
Declaration
public float Y { get; }
Property Value
Type | Description |
---|---|
System.Single | The y. |
Methods
| Improve this Doc View SourceContains(Vector2)
Checkes if the rectangle contains the specified point.
Declaration
public bool Contains(Vector2 point)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | point | Point. |
Returns
Type | Description |
---|---|
System.Boolean | The contains. |
Deconstruct(out Single, out Single, out Single, out Single)
Declaration
public void Deconstruct(out float x, out float y, out float width, out float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | |
System.Single | y | |
System.Single | width | |
System.Single | height |
Equals(RectangleF)
Declaration
public bool Equals(RectangleF other)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | other |
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 |
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
ToInspectorString()
Declaration
[CustomStringValue(CustomStringApplyWhen.CanWrite)]
public string ToInspectorString()
Returns
Type | Description |
---|---|
System.String |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.ValueType.ToString()
Operators
| Improve this Doc View SourceImplicit((Single x, Single y, Single width, Single height) to RectangleF)
Declaration
public static implicit operator RectangleF((float x, float y, float width, float height) rect)
Parameters
Type | Name | Description |
---|---|---|
System.ValueTuple<System.Single, System.Single, System.Single, System.Single> | rect |
Returns
Type | Description |
---|---|
RectangleF |