Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.01 KB

API.md

File metadata and controls

42 lines (32 loc) · 1.01 KB

Rectangle ⇐ Shape

Implements rectangle shape with text support.

Kind: global class
Extends: Shape
Since: 1.0.0

new Rectangle(cursor, [options])

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