Class Region
Implements
Namespace: Scripting
Syntax
public class Region : INamedItem
Constructors
Region(String, IEnumerable<IReadable2DLocation>)
Construct a new region
Declaration
public Region(string name, IEnumerable<IReadable2DLocation> points)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the region |
System.Collections.Generic.IEnumerable<IReadable2DLocation> | points | The enumeration of points defining the region |
Properties
BoundingBox
Get the bounding box of this region
Declaration
public Rectangle BoundingBox { get; }
Property Value
Type | Description |
---|---|
Rectangle |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Contains(IReadable2DLocation)
Test if the region contains the location
Declaration
public bool Contains(IReadable2DLocation location)
Parameters
Type | Name | Description |
---|---|---|
IReadable2DLocation | location | The location |
Returns
Type | Description |
---|---|
System.Boolean | True if the region contains the location, otherwise false |
Equals(Region)
Declaration
public bool Equals(Region val)
Parameters
Type | Name | Description |
---|---|---|
Region | val |
Returns
Type | Description |
---|---|
System.Boolean | True if equal otherwise false is returned. |
Equals(Object)
Tests a System.Object against this current Region for equality.
Declaration
public override bool Equals(object toCompare)
Parameters
Type | Name | Description |
---|---|---|
System.Object | toCompare |
Returns
Type | Description |
---|---|
System.Boolean | True if object is equal otherwise false is returned. |
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Gets the hash code for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this object. |
Overrides
System.Object.GetHashCode()
Operators
Equality(Region, Region)
Declaration
public static bool operator ==(Region a, Region b)
Parameters
Type | Name | Description |
---|---|---|
Region | a | |
Region | b |
Returns
Type | Description |
---|---|
System.Boolean | True if equal otherwise false is returned. |
Inequality(Region, Region)
Declaration
public static bool operator !=(Region a, Region b)
Parameters
Type | Name | Description |
---|---|---|
Region | a | |
Region | b |
Returns
Type | Description |
---|---|
System.Boolean | True if not equal otherwise false is returned. |