Class Rectangle
Definition
- Assembly:
- Tizen.NUI.dll
The Rectangle class.
public class Rectangle : IDisposable
- Inheritance
-
objectRectangle
- Implements
-
System.IDisposable
Constructors
View SourceRectangle()
The constructor.
Declaration
public Rectangle()
Rectangle(int, int, int, int)
The constructor.
Declaration
public Rectangle(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | x | The x coordinate (or left). |
int | y | The y coordinate (or right). |
int | width | The width (or bottom). |
int | height | The height (or top). |
Fields
View Sourcedisposed
A Flat to check if it is already disposed.
Declaration
protected bool disposed
Field Value
Type | Description |
---|---|
bool |
swigCMemOwn
swigCMemOwn
Declaration
protected bool swigCMemOwn
Field Value
Type | Description |
---|---|
bool |
Properties
View SourceHeight
The height of the rectangle.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
int |
Width
The width of the rectangle.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
int |
X
The x position of the rectangle.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
int |
Y
The Y position of the rectangle.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceArea()
Gets the area of the rectangle.
Declaration
public int Area()
Returns
Type | Description |
---|---|
int | The area of the rectangle. |
Bottom()
Gets the bottom of the rectangle.
Declaration
public int Bottom()
Returns
Type | Description |
---|---|
int | The bottom of the rectangle. |
Contains(Rectangle)
Determines whether or not this rectangle contains the specified rectangle.
Declaration
public bool Contains(Rectangle other)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | other | The other rectangle to test against this rectangle. |
Returns
Type | Description |
---|---|
bool | True if the specified rectangle is contained. |
Dispose()
Dispose.
Declaration
public void Dispose()
Dispose(DisposeTypes)
Dispose.
Declaration
protected virtual void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
Equals(object)
Equality operator.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | True if boxes are exactly same. |
Overrides
~Rectangle()
Dispose.
Declaration
protected ~Rectangle()
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Intersects(Rectangle)
Determines whether or not this rectangle and the specified rectangle intersect.
Declaration
public bool Intersects(Rectangle other)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | other | The other rectangle to test against this rectangle. |
Returns
Type | Description |
---|---|
bool | True if the rectangles intersect. |
IsEmpty()
Determines whether or not this rectangle is empty.
Declaration
public bool IsEmpty()
Returns
Type | Description |
---|---|
bool | True if width or height are zero. |
Left()
Gets the left of the rectangle.
Declaration
public int Left()
Returns
Type | Description |
---|---|
int | The left edge of the rectangle. |
Right()
Gets the right of the rectangle.
Declaration
public int Right()
Returns
Type | Description |
---|---|
int | The right edge of the rectangle. |
Set(int, int, int, int)
Assignment from individual values.
Declaration
public void Set(int newX, int newY, int newWidth, int newHeight)
Parameters
Type | Name | Description |
---|---|---|
int | newX | The x coordinate. |
int | newY | The y coordinate. |
int | newWidth | The width. |
int | newHeight | The height. |
Top()
Gets the top of the rectangle.
Declaration
public int Top()
Returns
Type | Description |
---|---|
int | The top of the rectangle. |
Operators
View Sourceoperator ==(Rectangle, Rectangle)
THe Equality operator.
Declaration
public static bool operator ==(Rectangle a, Rectangle b)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | a | The first operand. |
Rectangle | b | The second operand. |
Returns
Type | Description |
---|---|
bool | True if the boxes are exactly the same. |
operator !=(Rectangle, Rectangle)
Inequality operator.
Declaration
public static bool operator !=(Rectangle a, Rectangle b)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | a | The first rectangle. |
Rectangle | b | The second rectangle. |
Returns
Type | Description |
---|---|
bool | True if the rectangles are not identical. |