DOMMatrix.hx 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Copyright (C)2005-2017 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. {
  32. /** @throws DOMError */
  33. @:overload( function() : Void {} )
  34. @:overload( function( transformList : String ) : Void {} )
  35. @:overload( function( other : DOMMatrixReadOnly ) : Void {} )
  36. @:overload( function( array32 : Float32Array ) : Void {} )
  37. @:overload( function( array64 : Float64Array ) : Void {} )
  38. function new( numberSequence : Array<Float> ) : Void;
  39. function multiplySelf( other : DOMMatrix ) : DOMMatrix;
  40. function preMultiplySelf( other : DOMMatrix ) : DOMMatrix;
  41. /**
  42. Returns itself, a `DOMMatrix`, with its new content being the result of the matrix being translated by the given vector.
  43. **/
  44. function translateSelf( tx : Float, ty : Float, ?tz : Float = 0.0 ) : DOMMatrix;
  45. /**
  46. 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.
  47. **/
  48. function scaleSelf( scale : Float, ?originX : Float = 0.0, ?originY : Float = 0.0 ) : DOMMatrix;
  49. /**
  50. 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.
  51. **/
  52. function scale3dSelf( scale : Float, ?originX : Float = 0.0, ?originY : Float = 0.0, ?originZ : Float = 0.0 ) : DOMMatrix;
  53. /**
  54. 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.
  55. **/
  56. 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;
  57. /**
  58. 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.
  59. **/
  60. function rotateSelf( angle : Float, ?originX : Float = 0.0, ?originY : Float = 0.0 ) : DOMMatrix;
  61. /**
  62. 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.
  63. **/
  64. function rotateFromVectorSelf( x : Float, y : Float ) : DOMMatrix;
  65. /**
  66. 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.
  67. **/
  68. function rotateAxisAngleSelf( x : Float, y : Float, z : Float, angle : Float ) : DOMMatrix;
  69. /**
  70. 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.
  71. **/
  72. function skewXSelf( sx : Float ) : DOMMatrix;
  73. /**
  74. 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.
  75. **/
  76. function skewYSelf( sy : Float ) : DOMMatrix;
  77. /**
  78. 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`.
  79. **/
  80. function invertSelf() : DOMMatrix;
  81. /** @throws DOMError */
  82. /**
  83. Returns itself, a `DOMMatrix`, with its describing the matrix representing the same transformation as the CSS `transform` functions given in parameter.
  84. **/
  85. function setMatrixValue( transformList : String ) : DOMMatrix;
  86. }