SVGAngle.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*!
  2. SVGAngle
  3. http://www.w3.org/TR/SVG/types.html#InterfaceSVGAngle
  4. // Angle Unit Types
  5. const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
  6. const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
  7. const unsigned short SVG_ANGLETYPE_DEG = 2;
  8. const unsigned short SVG_ANGLETYPE_RAD = 3;
  9. const unsigned short SVG_ANGLETYPE_GRAD = 4;
  10. readonly attribute unsigned short unitType;
  11. attribute float value setraises(DOMException);
  12. attribute float valueInSpecifiedUnits setraises(DOMException);
  13. attribute DOMString valueAsString setraises(DOMException);
  14. void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException);
  15. void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException);
  16. */
  17. #import <Foundation/Foundation.h>
  18. @interface SVGAngle : NSObject
  19. /*! Angle Unit Types */
  20. typedef enum SVGKAngleType
  21. {
  22. SVG_ANGLETYPE_UNKNOWN = 0,
  23. SVG_ANGLETYPE_UNSPECIFIED = 1,
  24. SVG_ANGLETYPE_DEG = 2,
  25. SVG_ANGLETYPE_RAD = 3,
  26. SVG_ANGLETYPE_GRAD = 4
  27. } SVGKAngleType;
  28. @property(nonatomic, readonly) SVGKAngleType unitType;
  29. @property(nonatomic) float value;
  30. @property(nonatomic) float valueInSpecifiedUnits;
  31. @property(nonatomic,strong) NSString* valueAsString;
  32. -(void) newValueSpecifiedUnits:(SVGKAngleType) unitType valueInSpecifiedUnits:(float) valueInSpecifiedUnits;
  33. -(void) convertToSpecifiedUnits:(SVGKAngleType) unitType;
  34. @end