DOMMatrix.idl 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #import <Geometry/DOMMatrixReadOnly.idl>
  2. // https://drafts.fxtf.org/geometry/#dommatrix
  3. // FIXME: LegacyWindowAlias currently doesn't do anything.
  4. [Exposed=(Window,Worker), Serializable, LegacyWindowAlias=(SVGMatrix, WebKitCSSMatrix), UseNewAKString]
  5. interface DOMMatrix : DOMMatrixReadOnly {
  6. constructor(optional (DOMString or sequence<unrestricted double>) init);
  7. // FIXME: [NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other = {});
  8. // FIXME: [NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
  9. // FIXME: [NewObject] static DOMMatrix fromFloat64Array(Float64Array array64);
  10. // These attributes are simple aliases for certain elements of the 4x4 matrix
  11. inherit attribute unrestricted double a;
  12. inherit attribute unrestricted double b;
  13. inherit attribute unrestricted double c;
  14. inherit attribute unrestricted double d;
  15. inherit attribute unrestricted double e;
  16. inherit attribute unrestricted double f;
  17. inherit attribute unrestricted double m11;
  18. inherit attribute unrestricted double m12;
  19. inherit attribute unrestricted double m13;
  20. inherit attribute unrestricted double m14;
  21. inherit attribute unrestricted double m21;
  22. inherit attribute unrestricted double m22;
  23. inherit attribute unrestricted double m23;
  24. inherit attribute unrestricted double m24;
  25. inherit attribute unrestricted double m31;
  26. inherit attribute unrestricted double m32;
  27. inherit attribute unrestricted double m33;
  28. inherit attribute unrestricted double m34;
  29. inherit attribute unrestricted double m41;
  30. inherit attribute unrestricted double m42;
  31. inherit attribute unrestricted double m43;
  32. inherit attribute unrestricted double m44;
  33. // Mutable transform methods
  34. // FIXME: DOMMatrix multiplySelf(optional DOMMatrixInit other = {});
  35. // FIXME: DOMMatrix preMultiplySelf(optional DOMMatrixInit other = {});
  36. // FIXME: DOMMatrix translateSelf(optional unrestricted double tx = 0, optional unrestricted double ty = 0, optional unrestricted double tz = 0);
  37. // FIXME: DOMMatrix scaleSelf(optional unrestricted double scaleX = 1, optional unrestricted double scaleY, optional unrestricted double scaleZ = 1, optional unrestricted double originX = 0, optional unrestricted double originY = 0, optional unrestricted double originZ = 0);
  38. // FIXME: DOMMatrix scale3dSelf(optional unrestricted double scale = 1, optional unrestricted double originX = 0, optional unrestricted double originY = 0, optional unrestricted double originZ = 0);
  39. // FIXME: DOMMatrix rotateSelf(optional unrestricted double rotX = 0, optional unrestricted double rotY, optional unrestricted double rotZ);
  40. // FIXME: DOMMatrix rotateFromVectorSelf(optional unrestricted double x = 0, optional unrestricted double y = 0);
  41. // FIXME: DOMMatrix rotateAxisAngleSelf(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double angle = 0);
  42. // FIXME: DOMMatrix skewXSelf(optional unrestricted double sx = 0);
  43. // FIXME: DOMMatrix skewYSelf(optional unrestricted double sy = 0);
  44. DOMMatrix invertSelf();
  45. // FIXME: [Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
  46. };