Angle.hx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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\SVGAngle.webidl. Do not edit!
  23. package js.html.svg;
  24. /**
  25. The `SVGAngle` interface is used to represent a value that can be an `angle` or `number` value. An `SVGAngle` reflected through the `animVal` attribute is always read only.
  26. Documentation [SVGAngle](https://developer.mozilla.org/en-US/docs/Web/API/SVGAngle) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/SVGAngle$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/SVGAngle>
  28. **/
  29. @:native("SVGAngle")
  30. extern class Angle {
  31. /**
  32. Some unknown type of value.
  33. **/
  34. static inline var SVG_ANGLETYPE_UNKNOWN : Int = 0;
  35. /**
  36. A unitless `number` interpreted as a value in degrees.
  37. **/
  38. static inline var SVG_ANGLETYPE_UNSPECIFIED : Int = 1;
  39. /**
  40. An `angle` with a `deg` unit.
  41. **/
  42. static inline var SVG_ANGLETYPE_DEG : Int = 2;
  43. /**
  44. An `angle` with a `rad` unit.
  45. **/
  46. static inline var SVG_ANGLETYPE_RAD : Int = 3;
  47. /**
  48. An `angle` with a `grad` unit.
  49. **/
  50. static inline var SVG_ANGLETYPE_GRAD : Int = 4;
  51. /**
  52. The type of the value as specified by one of the `SVG_ANGLETYPE_*` constants defined on this interface.
  53. **/
  54. var unitType(default,null) : Int;
  55. /**
  56. The value as a floating point value, in user units. Setting this attribute will cause `valueInSpecifiedUnits` and `valueAsString` to be updated automatically to reflect this setting.
  57. Exceptions on setting: a `DOMException` with code `NO_MODIFICATION_ALLOWED_ERR` is raised when the length corresponds to a read only attribute or when the object itself is read only.
  58. **/
  59. var value : Float;
  60. /**
  61. The value as a floating point value, in the units expressed by `unitType`. Setting this attribute will cause `value` and `valueAsString` to be updated automatically to reflect this setting.
  62. Exceptions on setting: a `DOMException` with code `NO_MODIFICATION_ALLOWED_ERR` is raised when the length corresponds to a read only attribute or when the object itself is read only.
  63. **/
  64. var valueInSpecifiedUnits : Float;
  65. /**
  66. The value as a `DOMString` value, in the units expressed by `unitType`. Setting this attribute will cause `value`, `valueInSpecifiedUnits` and `unitType` to be updated automatically to reflect this setting.
  67. Exceptions on setting:
  68. a `DOMException` with code `SYNTAX_ERR` is raised if the assigned string cannot be parsed as a valid `angle`. a `DOMException` with code `NO_MODIFICATION_ALLOWED_ERR` is raised when the length corresponds to a read only attribute or when the object itself is read only.
  69. **/
  70. var valueAsString : String;
  71. /** @throws DOMError */
  72. function newValueSpecifiedUnits( unitType : Int, valueInSpecifiedUnits : Float ) : Void;
  73. /** @throws DOMError */
  74. function convertToSpecifiedUnits( unitType : Int ) : Void;
  75. }