Angle.hx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (C)2005-2018 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. /**
  33. Some unknown type of value.
  34. **/
  35. static inline var SVG_ANGLETYPE_UNKNOWN : Int = 0;
  36. /**
  37. A unitless `number` interpreted as a value in degrees.
  38. **/
  39. static inline var SVG_ANGLETYPE_UNSPECIFIED : Int = 1;
  40. /**
  41. An `angle` with a `deg` unit.
  42. **/
  43. static inline var SVG_ANGLETYPE_DEG : Int = 2;
  44. /**
  45. An `angle` with a `rad` unit.
  46. **/
  47. static inline var SVG_ANGLETYPE_RAD : Int = 3;
  48. /**
  49. An `angle` with a `grad` unit.
  50. **/
  51. static inline var SVG_ANGLETYPE_GRAD : Int = 4;
  52. /**
  53. The type of the value as specified by one of the `SVG_ANGLETYPE_*` constants defined on this interface.
  54. **/
  55. var unitType(default,null) : Int;
  56. /**
  57. 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.
  58. 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.
  59. **/
  60. var value : Float;
  61. /**
  62. 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.
  63. 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.
  64. **/
  65. var valueInSpecifiedUnits : Float;
  66. /**
  67. 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.
  68. Exceptions on setting:
  69. 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.
  70. **/
  71. var valueAsString : String;
  72. /** @throws DOMError */
  73. function newValueSpecifiedUnits( unitType : Int, valueInSpecifiedUnits : Float ) : Void;
  74. /** @throws DOMError */
  75. function convertToSpecifiedUnits( unitType : Int ) : Void;
  76. }