summaryrefslogtreecommitdiffstats
path: root/src/Ellipse.js
blob: b5bd436b17989b0cac9c67738f22265d25f36014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import Base from './Base.js'
import * as circled from './circled.js'
import {extend, nodeOrNew} from './tools.js'
import {register} from './adopter.js'
import {registerMethods} from './methods.js'

export default class Ellipse extends Base {
  constructor (node) {
    super(nodeOrNew('ellipse', node), Ellipse)
  }
}

extend(Ellipse, circled)

registerMethods('Container', {
  // Create an ellipse
  ellipse: function (width, height) {
    return this.put(new Ellipse()).size(width, height).move(0, 0)
  }
})

register(Ellipse)