SVGMatrix.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*!
  2. http://www.w3.org/TR/SVG/coords.html#InterfaceSVGMatrix
  3. interface SVGMatrix {
  4. attribute float a setraises(DOMException);
  5. attribute float b setraises(DOMException);
  6. attribute float c setraises(DOMException);
  7. attribute float d setraises(DOMException);
  8. attribute float e setraises(DOMException);
  9. attribute float f setraises(DOMException);
  10. SVGMatrix multiply(in SVGMatrix secondMatrix);
  11. SVGMatrix inverse() raises(SVGException);
  12. SVGMatrix translate(in float x, in float y);
  13. SVGMatrix scale(in float scaleFactor);
  14. SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY);
  15. SVGMatrix rotate(in float angle);
  16. SVGMatrix rotateFromVector(in float x, in float y) raises(SVGException);
  17. SVGMatrix flipX();
  18. SVGMatrix flipY();
  19. SVGMatrix skewX(in float angle);
  20. SVGMatrix skewY(in float angle);
  21. };
  22. */
  23. #import <Foundation/Foundation.h>
  24. @interface SVGMatrix : NSObject
  25. @property(nonatomic) float a;
  26. @property(nonatomic) float b;
  27. @property(nonatomic) float c;
  28. @property(nonatomic) float d;
  29. @property(nonatomic) float e;
  30. @property(nonatomic) float f;
  31. -(SVGMatrix*) multiply:(SVGMatrix*) secondMatrix;
  32. -(SVGMatrix*) inverse;
  33. -(SVGMatrix*) translate:(float) x y:(float) y;
  34. -(SVGMatrix*) scale:(float) scaleFactor;
  35. -(SVGMatrix*) scaleNonUniform:(float) scaleFactorX scaleFactorY:(float) scaleFactorY;
  36. -(SVGMatrix*) rotate:(float) angle;
  37. -(SVGMatrix*) rotateFromVector:(float) x y:(float) y;
  38. -(SVGMatrix*) flipX;
  39. -(SVGMatrix*) flipY;
  40. -(SVGMatrix*) skewX:(float) angle;
  41. -(SVGMatrix*) skewY:(float) angle;
  42. @end