SVGTransform.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*!
  2. http://www.w3.org/TR/SVG/coords.html#InterfaceSVGTransform
  3. // Transform Types
  4. const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
  5. const unsigned short SVG_TRANSFORM_MATRIX = 1;
  6. const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
  7. const unsigned short SVG_TRANSFORM_SCALE = 3;
  8. const unsigned short SVG_TRANSFORM_ROTATE = 4;
  9. const unsigned short SVG_TRANSFORM_SKEWX = 5;
  10. const unsigned short SVG_TRANSFORM_SKEWY = 6;
  11. readonly attribute unsigned short type;
  12. readonly attribute SVGMatrix matrix;
  13. readonly attribute float angle;
  14. void setMatrix(in SVGMatrix matrix) raises(DOMException);
  15. void setTranslate(in float tx, in float ty) raises(DOMException);
  16. void setScale(in float sx, in float sy) raises(DOMException);
  17. void setRotate(in float angle, in float cx, in float cy) raises(DOMException);
  18. void setSkewX(in float angle) raises(DOMException);
  19. void setSkewY(in float angle) raises(DOMException);
  20. */
  21. #import <Foundation/Foundation.h>
  22. #import "SVGMatrix.h"
  23. @interface SVGTransform : NSObject
  24. /*! Transform Types */
  25. typedef enum SVGKTransformType
  26. {
  27. SVG_TRANSFORM_UNKNOWN = 0,
  28. SVG_TRANSFORM_MATRIX = 1,
  29. SVG_TRANSFORM_TRANSLATE = 2,
  30. SVG_TRANSFORM_SCALE = 3,
  31. SVG_TRANSFORM_ROTATE = 4,
  32. SVG_TRANSFORM_SKEWX = 5,
  33. SVG_TRANSFORM_SKEWY = 6
  34. } SVGKTransformType;
  35. @property(nonatomic) SVGKTransformType type;
  36. @property(nonatomic,strong) SVGMatrix* matrix;
  37. @property(nonatomic,readonly) float angle;
  38. -(void) setMatrix:(SVGMatrix*) matrix;
  39. -(void) setTranslate:(float) tx ty:(float) ty;
  40. -(void) setScale:(float) sx sy:(float) sy;
  41. -(void) setRotate:(float) angle cx:(float) cx cy:(float) cy;
  42. -(void) setSkewX:(float) angle;
  43. -(void) setSkewY:(float) angle;
  44. @end