Implements rectangle shape with text support.
Kind: global class
Extends: Shape
Since: 1.0.0
Create Rectangle shape instance.
| Param | Type | Description |
|---|---|---|
| cursor | Cursor |
Cursor instance |
| [options] | Object |
Options object |
Example
Rectangle.create(cursor, {
text: 'Hello, World',
width: 20,
height: '50%',
x: 'center',
y: 'middle',
background: 'black',
foreground: 'white'
});rectangle.render() ⇒ Rectangle
Render the rectangle with specified options.
Kind: instance method of Rectangle