Class Rectangle
Definition
- Assembly:
- Tizen.NUI.dll
The Rectangle class.
C#Copypublic class Rectangle : Disposable, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic Rectangle()
Declaration
C#Copypublic 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
Declaration
C#Copyprotected bool swigCMemOwn
Field Value
Type | Description |
---|---|
bool |
Properties
Declaration
C#Copypublic int Height { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int Width { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int X { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int Y { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Declaration
C#Copypublic int Area()
Returns
Type | Description |
---|---|
int | The area of the rectangle. |
Declaration
C#Copypublic int Bottom()
Returns
Type | Description |
---|---|
int | The bottom of the rectangle. |
Contains(Rectangle)
Determines whether or not this rectangle contains the specified rectangle.
Declaration
C#Copypublic 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. |
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
Overrides
Declaration
C#Copypublic 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
Declaration
C#Copypublic 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
C#Copypublic 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. |
Declaration
C#Copypublic bool IsEmpty()
Returns
Type | Description |
---|---|
bool | True if width or height are zero. |
Declaration
C#Copypublic int Left()
Returns
Type | Description |
---|---|
int | The left edge of the rectangle. |
Declaration
C#Copypublic int Right()
Returns
Type | Description |
---|---|
int | The right edge of the rectangle. |
Declaration
C#Copypublic 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. |
Declaration
C#Copypublic int Top()
Returns
Type | Description |
---|---|
int | The top of the rectangle. |
Operators
Declaration
C#Copypublic 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. |
Declaration
C#Copypublic 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. |