UNPKG

svgdom

Version:

Straightforward DOM implementation for SVG, HTML and XML

14 lines (12 loc) 244 B
export class SVGPoint { constructor () { this.x = 0 this.y = 0 } matrixTransform (m) { var r = new SVGPoint() r.x = m.a * this.x + m.c * this.y + m.e * 1 r.y = m.b * this.x + m.d * this.y + m.f * 1 return r } }