Class Rectangle
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
The Rectangle class.
public class Rectangle : Disposable, IDisposable, ICloneable
- Inheritance
- Implements
Constructors
View SourceRectangle()
The constructor.
Declaration
public Rectangle()
API Level: 3
View SourceRectangle(Int32, Int32, Int32, Int32)
The constructor.
Declaration
public 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
View SourceHeight
The height of the rectangle.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
API Level: 3
View SourceWidth
The width of the rectangle.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
API Level: 3
View SourceX
The x position of the rectangle.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
API Level: 3
View SourceY
The Y position of the rectangle.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
API Level: 3
Methods
View SourceArea()
Gets the area of the rectangle.
Declaration
public int Area()
Returns
Type | Description |
---|---|
Int32 | The area of the rectangle. |
API Level: 3
View SourceBottom()
Gets the bottom of the rectangle.
Declaration
public int Bottom()
Returns
Type | Description |
---|---|
Int32 | The bottom of the rectangle. |
API Level: 3
View SourceContains(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 |
---|---|
Boolean | True if the specified rectangle is contained. |
API Level: 3
View SourceEquals(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 |
---|---|
Boolean | True if boxes are exactly same. |
Overrides
API Level: 4
View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the current object. |
Overrides
API Level: 4
View SourceIntersects(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 |
---|---|
Boolean | True if the rectangles intersect. |
API Level: 3
View SourceIsEmpty()
Determines whether or not this rectangle is empty.
Declaration
public bool IsEmpty()
Returns
Type | Description |
---|---|
Boolean | True if width or height are zero. |
API Level: 3
View SourceLeft()
Gets the left of the rectangle.
Declaration
public int Left()
Returns
Type | Description |
---|---|
Int32 | The left edge of the rectangle. |
API Level: 3
View SourceRight()
Gets the right of the rectangle.
Declaration
public int Right()
Returns
Type | Description |
---|---|
Int32 | The right edge of the rectangle. |
API Level: 3
View SourceSet(Int32, Int32, Int32, Int32)
Assignment from individual values.
Declaration
public 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
View SourceTop()
Gets the top of the rectangle.
Declaration
public int Top()
Returns
Type | Description |
---|---|
Int32 | The top of the rectangle. |
API Level: 3
Operators
View SourceEquality(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 |
---|---|
Boolean | True if the boxes are exactly the same. |
API Level: 3
View SourceInequality(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 |
---|---|
Boolean | True if the rectangles are not identical. |