SVGPolylineElement.m 678 B

12345678910111213141516171819202122
  1. #import "SVGPolylineElement.h"
  2. #import "SVGUtils.h"
  3. #import "SVGElement_ForParser.h" // to resolve Xcode circular dependencies; in long term, parsing SHOULD NOT HAPPEN inside any class whose name starts "SVG" (because those are reserved classes for the SVG Spec)
  4. @implementation SVGPolylineElement
  5. - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult {
  6. [super postProcessAttributesAddingErrorsTo:parseResult];
  7. if( [[self getAttribute:@"points"] length] > 0 )
  8. {
  9. CGMutablePathRef path = createPathFromPointsInString([[self getAttribute:@"points"] UTF8String], NO);
  10. self.pathForShapeInRelativeCoords = path;
  11. CGPathRelease(path);
  12. }
  13. }
  14. @end