Class Rectangle
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
The Rectangle class.
C#Copypublic class Rectangle : Disposable, IDisposable, ICloneable
- Inheritance
- Implements
-
System.IDisposableSystem.ICloneable
Constructors
Declaration
C#Copypublic Rectangle()
API Level: 3
Declaration
C#Copypublic Rectangle(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The x coordinate (or left). |
Int32 | y | The y coordinate (or right). |
Int32 | width | The width (or bottom). |
Int32 | height | The height (or top). |
API Level: 3
Properties
Declaration
C#Copypublic int Height { get; [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor")] set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor.
API Level: 3
Declaration
C#Copypublic int Width { get; [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor")] set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor.
API Level: 3
Declaration
C#Copypublic int X { get; [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor")] set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor.
API Level: 3
Declaration
C#Copypublic int Y { get; [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor")] set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Rectangle(...) constructor.
API Level: 3
Methods
Declaration
C#Copypublic int Area()
Returns
Type | Description |
---|---|
Int32 | The area of the rectangle. |
API Level: 3
Declaration
C#Copypublic int Bottom()
Returns
Type | Description |
---|---|
Int32 | The bottom of the rectangle. |
API Level: 3
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 |
---|---|
Boolean | True if the specified rectangle is contained. |
API Level: 3
Declaration
C#Copypublic override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True if boxes are exactly same. |
Overrides
API Level: 4
Declaration
C#Copypublic override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the current object. |
Overrides
API Level: 4
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 |
---|---|
Boolean | True if the rectangles intersect. |
API Level: 3
Declaration
C#Copypublic bool IsEmpty()
Returns
Type | Description |
---|---|
Boolean | True if width or height are zero. |
API Level: 3
Declaration
C#Copypublic int Left()
Returns
Type | Description |
---|---|
Int32 | The left edge of the rectangle. |
API Level: 3
Declaration
C#Copypublic int Right()
Returns
Type | Description |
---|---|
Int32 | The right edge of the rectangle. |
API Level: 3
Declaration
C#Copypublic void Set(int newX, int newY, int newWidth, int newHeight)
Parameters
Type | Name | Description |
---|---|---|
Int32 | newX | The x coordinate. |
Int32 | newY | The y coordinate. |
Int32 | newWidth | The width. |
Int32 | newHeight | The height. |
API Level: 3
Declaration
C#Copypublic int Top()
Returns
Type | Description |
---|---|
Int32 | The top of the rectangle. |
API Level: 3
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 |
---|---|
Boolean | True if the boxes are exactly the same. |
API Level: 3
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 |
---|---|
Boolean | True if the rectangles are not identical. |