Length.hx 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright (C)2005-2013 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, do not edit!
  23. package js.html.svg;
  24. /** <p>The <code>SVGLength</code> interface correspond to the <a title="https://developer.mozilla.org/en/SVG/Content_type#Length" rel="internal" href="https://developer.mozilla.org/en/SVG/Content_type#Length">&lt;length&gt;</a> basic data type.</p>
  25. <p>An <code>SVGLength</code> object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.</p><br><br>
  26. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/Document_Object_Model_(DOM)/SVGLength">MDN</a>. */
  27. @:native("SVGLength")
  28. extern class Length
  29. {
  30. /** A value was specified using the cm units defined in CSS2. */
  31. static inline var SVG_LENGTHTYPE_CM : Int = 6;
  32. /** A value was specified using the em units defined in CSS2. */
  33. static inline var SVG_LENGTHTYPE_EMS : Int = 3;
  34. /** A value was specified using the ex units defined in CSS2. */
  35. static inline var SVG_LENGTHTYPE_EXS : Int = 4;
  36. /** A value was specified using the in units defined in CSS2. */
  37. static inline var SVG_LENGTHTYPE_IN : Int = 8;
  38. /** A value was specified using the mm units defined in CSS2. */
  39. static inline var SVG_LENGTHTYPE_MM : Int = 7;
  40. /** No unit type was provided (i.e., a unitless value was specified), which indicates a value in user units. */
  41. static inline var SVG_LENGTHTYPE_NUMBER : Int = 1;
  42. /** A value was specified using the pc units defined in CSS2. */
  43. static inline var SVG_LENGTHTYPE_PC : Int = 10;
  44. /** A percentage value was specified. */
  45. static inline var SVG_LENGTHTYPE_PERCENTAGE : Int = 2;
  46. /** A value was specified using the pt units defined in CSS2. */
  47. static inline var SVG_LENGTHTYPE_PT : Int = 9;
  48. /** A value was specified using the px units defined in CSS2. */
  49. static inline var SVG_LENGTHTYPE_PX : Int = 5;
  50. /** The unit type is not one of predefined unit types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type. */
  51. static inline var SVG_LENGTHTYPE_UNKNOWN : Int = 0;
  52. /** The type of the value as specified by one of the SVG_LENGTHTYPE_* constants defined on this interface. */
  53. var unitType(default,null) : Int;
  54. /** <p>The value as a floating point value, in user units. Setting this attribute will cause <code>valueInSpecifiedUnits</code> and <code>valueAsString</code> to be updated automatically to reflect this setting.</p> <p><strong>Exceptions on setting:</strong> a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/DOMException">DOMException</a></code>
  55. with code <code>NO_MODIFICATION_ALLOWED_ERR</code> is raised when the length corresponds to a read only attribute or when the object itself is read only.</p> Getter throws DOMException. Setter throws DOMException. */
  56. var value : Float;
  57. /** <p>The value as a string value, in the units expressed by <code>unitType</code>. Setting this attribute will cause <code>value</code>, <code>valueInSpecifiedUnits</code> and <code>unitType</code> to be updated automatically to reflect this setting.</p> <p><strong>Exceptions on setting:</strong></p> <ul> <li>a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/DOMException">DOMException</a></code>
  58. with code <code>SYNTAX_ERR</code> is raised if the assigned string cannot be parsed as a valid <a title="https://developer.mozilla.org/en/SVG/Content_type#Length" rel="internal" href="https://developer.mozilla.org/en/SVG/Content_type#Length">&lt;length&gt;</a>.</li> <li>a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/DOMException">DOMException</a></code>
  59. with code <code>NO_MODIFICATION_ALLOWED_ERR</code> is raised when the length corresponds to a read only attribute or when the object itself is read only.</li> </ul> Setter throws DOMException. */
  60. var valueAsString : String;
  61. /** <p>The value as a floating point value, in the units expressed by <code>unitType</code>. Setting this attribute will cause <code>value</code> and <code>valueAsString</code> to be updated automatically to reflect this setting.</p> <p><strong>Exceptions on setting:</strong> a <code><a rel="custom" href="https://developer.mozilla.org/en/DOM/DOMException">DOMException</a></code>
  62. with code <code>NO_MODIFICATION_ALLOWED_ERR</code> is raised when the length corresponds to a read only attribute or when the object itself is read only.</p> */
  63. var valueInSpecifiedUnits : Float;
  64. function convertToSpecifiedUnits( unitType : Int ) : Void;
  65. function newValueSpecifiedUnits( unitType : Int, valueInSpecifiedUnits : Float ) : Void;
  66. }