PatternStyle.js 772 B

123456789101112131415161718192021222324252627282930313233
  1. import {Style} from "./Style";
  2. /**
  3. * Pattern style represents an opaque object describing a pattern, based on an image, a canvas, or a video.
  4. *
  5. * The get method returns a CanvasPattern object https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern created by the context.createPattern() method.
  6. *
  7. * @class
  8. * @extends {Style}
  9. */
  10. function PatternStyle()
  11. {
  12. }
  13. /**
  14. * Applies an 2x3 transformation matrix representing a linear transform to the pattern.
  15. *
  16. * The transformation allows to move, rotate and scale the pattern freely
  17. *
  18. * @param {number[]} transform 2x3 Transformation matrix.
  19. */
  20. PatternStyle.prototype.setTransform = function(transform)
  21. {
  22. // TODO <ADD CODE HERE>
  23. };
  24. PatternStyle.prototype.toJSON = function ()
  25. {
  26. };
  27. export {PatternStyle};