Rect
Represents a rectangle with a set origin (top-left corner) and size(see example).
Definition
Package:@progress/kendo-drawing
Methods
Gets the position of the bottom-left corner of the rectangle. This is also the rectangle origin.
- The position of the bottom-left corner.
Gets the position of the bottom-right corner of the rectangle.
- The position of the bottom-right corner.
Creates a new instance with the same origin and size.
- A new Rect instance with the same origin and size.
Compares this rectangle with another instance.
The rectangle to compare with.
Returns:boolean
true if the origin and size is the same for both rectangles. Otherwise, returns false.
Gets the origin (top-left point) of the rectangle.
- The origin (top-left point).
Gets the height of the rectangle.
number
- The height of the rectangle.
Sets the corner radius of the rectangle.
The new corner radius of the rectangle as a single number or an [rx, ry] array.
- The current rectangle instance.
Gets the position of the top-left corner of the rectangle. This is also the rectangle origin.
- The position of the top-left corner.
Gets the position of the top-right corner of the rectangle.
- The position of the top-right corner.
Gets the rectangle width.
number
- The rectangle width.
Properties
cornerRadius
number[]
The size of the rectangle.