DOMMatrix.hx 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\DOMMatrix.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. The `DOMMatrix` interface represents 4x4 matrices, suitable for 2D and 3D operations.
  26. Documentation [DOMMatrix](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix>
  28. **/
  29. @:native("DOMMatrix")
  30. extern class DOMMatrix extends DOMMatrixReadOnly {
  31. /** @throws DOMError */
  32. @:overload( function() : Void {} )
  33. @:overload( function( transformList : String ) : Void {} )
  34. @:overload( function( other : DOMMatrixReadOnly ) : Void {} )
  35. @:overload( function( array32 : js.lib.Float32Array ) : Void {} )
  36. @:overload( function( array64 : js.lib.Float64Array ) : Void {} )
  37. function new( numberSequence : Array<Float> ) : Void;
  38. function multiplySelf( other : DOMMatrix ) : DOMMatrix;
  39. function preMultiplySelf( other : DOMMatrix ) : DOMMatrix;
  40. /**
  41. Returns itself, a `DOMMatrix`, with its new content being the result of the matrix being translated by the given vector.
  42. **/
  43. function translateSelf( tx : Float, ty : Float, tz : Float = 0.0 ) : DOMMatrix;
  44. /**
  45. Returns itself, a `DOMMatrix`, with its new content being the result of the matrix x and y dimensions being scaled by the given factor, centered on the origin given.
  46. **/
  47. function scaleSelf( scale : Float, originX : Float = 0.0, originY : Float = 0.0 ) : DOMMatrix;
  48. /**
  49. Returns itself, a `DOMMatrix`, with its new content being the result of the matrix x, y and z dimension being scaled by the given factor, centered on the origin given.
  50. **/
  51. function scale3dSelf( scale : Float, originX : Float = 0.0, originY : Float = 0.0, originZ : Float = 0.0 ) : DOMMatrix;
  52. /**
  53. Returns itself, a `DOMMatrix`, with its new content being the result of the matrix x, y and z dimension being scaled by the given factor for each dimension, centered on the origin given.
  54. **/
  55. function scaleNonUniformSelf( scaleX : Float, scaleY : Float = 1.0, scaleZ : Float = 1.0, originX : Float = 0.0, originY : Float = 0.0, originZ : Float = 0.0 ) : DOMMatrix;
  56. /**
  57. Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being rotated by the given angle, with the rotation centered on the origin given.
  58. **/
  59. function rotateSelf( angle : Float, originX : Float = 0.0, originY : Float = 0.0 ) : DOMMatrix;
  60. /**
  61. Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being rotated by the angle between the given vector and (1,0), centered on the origin given.
  62. **/
  63. function rotateFromVectorSelf( x : Float, y : Float ) : DOMMatrix;
  64. /**
  65. Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being rotated by the given angle and the give vector.
  66. **/
  67. function rotateAxisAngleSelf( x : Float, y : Float, z : Float, angle : Float ) : DOMMatrix;
  68. /**
  69. Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being skewed along the x-axis by the given factor.
  70. **/
  71. function skewXSelf( sx : Float ) : DOMMatrix;
  72. /**
  73. Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being skewed along the y-axis by the given factor.
  74. **/
  75. function skewYSelf( sy : Float ) : DOMMatrix;
  76. /**
  77. Returns itself,  a `DOMMatrix`, with its new content being the result of the original matrix being inverted. If the matrix cannot be inverted, all its components are set to `NaN` and `is2D()` returns `false`.
  78. **/
  79. function invertSelf() : DOMMatrix;
  80. /**
  81. Returns itself, a `DOMMatrix`, with its describing the matrix representing the same transformation as the CSS `transform` functions given in parameter.
  82. @throws DOMError
  83. **/
  84. function setMatrixValue( transformList : String ) : DOMMatrix;
  85. }