Class Rectangle

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
3

The Rectangle class.

C#
Copy
public class Rectangle : IDisposable
Inheritance
Rectangle
Implements
System.IDisposable

Constructors

View Source

Rectangle()

The constructor.

Declaration
C#
Copy
public Rectangle()
API Level: 3
View Source

Rectangle(Int32, Int32, Int32, Int32)

The constructor.

Declaration
C#
Copy
public Rectangle(int x, int y, int width, int height)
Parameters
Type Name Description
System.Int32 x

The x coordinate (or left).

System.Int32 y

The y coordinate (or right).

System.Int32 width

The width (or bottom).

System.Int32 height

The height (or top).

API Level: 3

Fields

View Source

disposed

A Flat to check if it is already disposed.

Declaration
C#
Copy
protected bool disposed
Field Value
Type Description
Boolean
API Level: 3
View Source

swigCMemOwn

swigCMemOwn

Declaration
C#
Copy
protected bool swigCMemOwn
Field Value
Type Description
Boolean
API Level: 3

Properties

View Source

Height

The height of the rectangle.

Declaration
C#
Copy
public int Height { get; set; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

Width

The width of the rectangle.

Declaration
C#
Copy
public int Width { get; set; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

X

The x position of the rectangle.

Declaration
C#
Copy
public int X { get; set; }
Property Value
Type Description
System.Int32
API Level: 3
View Source

Y

The Y position of the rectangle.

Declaration
C#
Copy
public int Y { get; set; }
Property Value
Type Description
System.Int32
API Level: 3

Methods

View Source

Area()

Gets the area of the rectangle.

Declaration
C#
Copy
public int Area()
Returns
Type Description
System.Int32

The area of the rectangle.

API Level: 3
View Source

Bottom()

Gets the bottom of the rectangle.

Declaration
C#
Copy
public int Bottom()
Returns
Type Description
System.Int32

The bottom of the rectangle.

API Level: 3
View Source

Contains(Rectangle)

Determines whether or not this rectangle contains the specified rectangle.

Declaration
C#
Copy
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 Source

Dispose()

Dispose.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(DisposeTypes)

Dispose.

Declaration
C#
Copy
protected virtual void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type
API Level: 3
View Source

Equals(Object)

Equality operator.

Declaration
C#
Copy
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 Source

Finalize()

Dispose.

Declaration
C#
Copy
protected void Finalize()
API Level: 3
View Source

GetHashCode()

Serves as the default hash function.

Declaration
C#
Copy
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current object.

Overrides
API Level: 4
View Source

Intersects(Rectangle)

Determines whether or not this rectangle and the specified rectangle intersect.

Declaration
C#
Copy
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 Source

IsEmpty()

Determines whether or not this rectangle is empty.

Declaration
C#
Copy
public bool IsEmpty()
Returns
Type Description
Boolean

True if width or height are zero.

API Level: 3
View Source

Left()

Gets the left of the rectangle.

Declaration
C#
Copy
public int Left()
Returns
Type Description
System.Int32

The left edge of the rectangle.

API Level: 3
View Source

Right()

Gets the right of the rectangle.

Declaration
C#
Copy
public int Right()
Returns
Type Description
System.Int32

The right edge of the rectangle.

API Level: 3
View Source

Set(Int32, Int32, Int32, Int32)

Assignment from individual values.

Declaration
C#
Copy
public void Set(int newX, int newY, int newWidth, int newHeight)
Parameters
Type Name Description
System.Int32 newX

The x coordinate.

System.Int32 newY

The y coordinate.

System.Int32 newWidth

The width.

System.Int32 newHeight

The height.

API Level: 3
View Source

Top()

Gets the top of the rectangle.

Declaration
C#
Copy
public int Top()
Returns
Type Description
System.Int32

The top of the rectangle.

API Level: 3

Operators

View Source

Equality(Rectangle, Rectangle)

THe Equality operator.

Declaration
C#
Copy
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 Source

Inequality(Rectangle, Rectangle)

Inequality operator.

Declaration
C#
Copy
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.

API Level: 3

Implements

System.IDisposable