SVGUseElement.m 747 B

123456789101112131415161718192021222324252627
  1. #import "SVGUseElement.h"
  2. #import "SVGUseElement_Mutable.h"
  3. @implementation SVGUseElement
  4. @synthesize x;
  5. @synthesize y;
  6. @synthesize width;
  7. @synthesize height;
  8. @synthesize instanceRoot;
  9. @synthesize animatedInstanceRoot;
  10. @synthesize transform; // each SVGElement subclass that conforms to protocol "SVGTransformable" has to re-synthesize this to work around bugs in Apple's Objective-C 2.0 design that don't allow @properties to be extended by categories / protocols
  11. -(CALayer *)newLayer
  12. {
  13. return [CALayer layer];
  14. }
  15. -(void)layoutLayer:(CALayer *)layer
  16. {
  17. if( [instanceRoot.correspondingElement respondsToSelector:@selector(layoutLayer:)])
  18. [((SVGElement<ConverterSVGToCALayer>*)instanceRoot.correspondingElement) layoutLayer:layer];
  19. }
  20. @end