vector-canvas.js 473 B

12345678910111213141516
  1. /**
  2. * Class for vector images manipulations.
  3. * @constructor
  4. * @param {DOMElement} container to place canvas to
  5. * @param {Number} width
  6. * @param {Number} height
  7. */
  8. jvm.VectorCanvas = function(container, width, height) {
  9. this.mode = window.SVGAngle ? 'svg' : 'vml';
  10. if (this.mode == 'svg') {
  11. this.impl = new jvm.SVGCanvasElement(container, width, height);
  12. } else {
  13. this.impl = new jvm.VMLCanvasElement(container, width, height);
  14. }
  15. return this.impl;
  16. };