Show / Hide Table of Contents

Class BoundedRectangle

This class defines a rectanglar area, whose position is automatically "locked" to being inside a rectangular bounding box as it is changed. A typical use might be keeping track of a camera's view area.

Inheritance
System.Object
BoundedRectangle
Implements
System.IEquatable<BoundedRectangle>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
[Serializable]
public class BoundedRectangle : IEquatable<BoundedRectangle>

Constructors

| Improve this Doc View Source

BoundedRectangle(Rectangle, Rectangle)

Constructor.

Declaration
public BoundedRectangle(Rectangle area, Rectangle boundingBox)
Parameters
Type Name Description
Rectangle area

Initial area for the rectangle.

Rectangle boundingBox

Initial bounding box by which to bound the rectangle.

Properties

| Improve this Doc View Source

Area

The rectangle that is guaranteed to be contained completely within BoundingBox. Although it does not specifically provide a set accessor, this property is returning a reference and as such may be assigned to.

Declaration
public Rectangle Area { get; }
Property Value
Type Description
Rectangle
| Improve this Doc View Source

BoundingBox

The rectangle which Area is automatically bounded to be within. Although this property does not explicitly provide a set accessor, it is returning a reference so therefore the property may be assigned to.

Declaration
public Rectangle BoundingBox { get; }
Property Value
Type Description
Rectangle

Methods

| Improve this Doc View Source

Equals(BoundedRectangle)

Compares the current BoundedRectangle to the one given.

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

True if the given BoundedRectangle represents the same area, false otherwise.

| Improve this Doc View Source

Equals(Object)

Compares the current BoundedRectangle to the object given.

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

True if the given object is a BoundedRectangle that represents the same area, false otherwise.

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

GetHashCode()

Returns a hash-value for this object.

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

Operators

| Improve this Doc View Source

Equality(BoundedRectangle, BoundedRectangle)

Compares the two BoundedRectangle instances.

Declaration
public static bool operator ==(BoundedRectangle lhs, BoundedRectangle rhs)
Parameters
Type Name Description
BoundedRectangle lhs
BoundedRectangle rhs
Returns
Type Description
System.Boolean

True if the two given BoundedRectangle instances represent the same area, false otherwise.

| Improve this Doc View Source

Inequality(BoundedRectangle, BoundedRectangle)

Compares the two BoundedRectangle instances.

Declaration
public static bool operator !=(BoundedRectangle lhs, BoundedRectangle rhs)
Parameters
Type Name Description
BoundedRectangle lhs
BoundedRectangle rhs
Returns
Type Description
System.Boolean

True if the two given BoundedRectangle instances do NOT represent the same area, false otherwise.

Implements

System.IEquatable<T>

Extension Methods

Utility.Yield<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX