Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Rectangle

This is a Shape primitive. Defines an instance of a Rectangle shape for use in the Shapes or ContourShapes primitives value. Usage:

// Inside a calculator's map function, this particular definition will draw
// red 24x24px squares centered at { x: index, y: value } of each rendered bar
...
 {
     graphics: {
         items: [
             {
                 tag: 'Shapes',
                 key: 'rects',
                 //the rectangle is a primitve
                 primitives: [
                     {
                         tag: 'Rectangle',
                         position: {
                             x: du(d.index()),
                             y: du(d.value()),
                         }
                         size: {
                             height: px(24),
                             width: px(24)
                         }
                     }
                 ],
                 fillStyle: {
                     color: '#f00'
                 }
             }
         ]
     }
 }
...

Hierarchy

  • Rectangle

Properties

infiniteEnd: boolean
infiniteStart: boolean
position: Point
size: Size
tag: "Rectangle"

Generated using TypeDoc