SVGAnimatedPreserveAspectRatio.m 651 B

12345678910111213141516171819202122232425262728
  1. #import "SVGAnimatedPreserveAspectRatio.h"
  2. @implementation SVGAnimatedPreserveAspectRatio
  3. - (id)init
  4. {
  5. self = [super init];
  6. if (self) {
  7. self.baseVal = [SVGPreserveAspectRatio new];
  8. }
  9. return self;
  10. }
  11. /** TODO: Current implementation (animation not supported anywhere in SVGKit yet) simply returns
  12. a copy of self.baseVal --- NOTE: spec REQUIRES you return a copy! It is explicit on this!
  13. */
  14. -(SVGPreserveAspectRatio *)animVal
  15. {
  16. SVGPreserveAspectRatio* cloneOfBase = [SVGPreserveAspectRatio new];
  17. cloneOfBase.align = self.baseVal.align;
  18. cloneOfBase.meetOrSlice = self.baseVal.meetOrSlice;
  19. return cloneOfBase;
  20. }
  21. @end