From e24ed2e7265f58a65cd031320dc9abef079a719a Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 24 Apr 2012 16:52:58 +0100 Subject: [PATCH 001/110] Change1: Document SVGShapeElement, and improve the naming of its most important variable. ALSO: disabled the class "SVGPathView", since it is UNDOCUMENTED and USED NOWHERE --- Core/SVGElement.h | 18 +++++---- Core/SVGEllipseElement.m | 3 +- Core/SVGGroupElement.m | 19 +++++---- Core/SVGLineElement.m | 3 +- Core/SVGPathElement.m | 3 +- Core/SVGPolygonElement.m | 3 +- Core/SVGPolylineElement.m | 3 +- Core/SVGRectElement.m | 3 +- Core/SVGShapeElement+Private.h | 14 ------- Core/SVGShapeElement.h | 40 +++++++++++++++---- Core/SVGShapeElement.m | 18 ++++----- .../SVGPad.xcodeproj/project.pbxproj | 2 - iOS/SVGPathView.h | 7 +++- iOS/SVGPathView.m | 4 +- 14 files changed, 80 insertions(+), 60 deletions(-) delete mode 100644 Core/SVGShapeElement+Private.h diff --git a/Core/SVGElement.h b/Core/SVGElement.h index 5af720579..88fc07b4a 100644 --- a/Core/SVGElement.h +++ b/Core/SVGElement.h @@ -1,10 +1,14 @@ -// -// SVGElement.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - +/** + SVGElement + + Data: + - "children": child elements (SVG is a tree: every element can have chidren) + - "localName": the final part of the SVG tag (e.g. in " @class SVGDocument; diff --git a/Core/SVGEllipseElement.m b/Core/SVGEllipseElement.m index 2b78cee76..f7cd2783d 100644 --- a/Core/SVGEllipseElement.m +++ b/Core/SVGEllipseElement.m @@ -8,7 +8,6 @@ #import "SVGEllipseElement.h" #import "SVGElement+Private.h" -#import "SVGShapeElement+Private.h" @implementation SVGEllipseElement @@ -46,7 +45,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { CGMutablePathRef path = CGPathCreateMutable(); CGPathAddEllipseInRect(path, NULL, CGRectMake(_cx - _rx, _cy - _ry, _rx * 2, _ry * 2)); - [self loadPath:path]; + [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } diff --git a/Core/SVGGroupElement.m b/Core/SVGGroupElement.m index dcf6872a0..41712ea83 100644 --- a/Core/SVGGroupElement.m +++ b/Core/SVGGroupElement.m @@ -1,10 +1,15 @@ -// -// SVGGroupElement.m -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - +/** + SVGGroupElement.m + + In SVG, every single element can contain children. + + However, the SVG spec defines a special (optional) "group" element, that is never rendered, + but allows additional nesting (e.g. for programmatic / organizational purposes). + + This is the "G" tag. + + To make sure we don't lose this info when loading an SVG, we store a special element for it. + */ #import "SVGGroupElement.h" #import "SVGDocument.h" diff --git a/Core/SVGLineElement.m b/Core/SVGLineElement.m index 595ed7efc..69d89607b 100644 --- a/Core/SVGLineElement.m +++ b/Core/SVGLineElement.m @@ -8,7 +8,6 @@ #import "SVGLineElement.h" #import "SVGElement+Private.h" -#import "SVGShapeElement+Private.h" @implementation SVGLineElement @@ -42,7 +41,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { CGPathMoveToPoint(path, NULL, _x1, _y1); CGPathAddLineToPoint(path, NULL, _x2, _y2); - [self loadPath:path]; + [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } diff --git a/Core/SVGPathElement.m b/Core/SVGPathElement.m index 2337af160..c1f3cb212 100644 --- a/Core/SVGPathElement.m +++ b/Core/SVGPathElement.m @@ -8,7 +8,6 @@ #import "SVGPathElement.h" #import "SVGElement+Private.h" -#import "SVGShapeElement+Private.h" #import "SVGUtils.h" #import "SVGPointsAndPathsParser.h" @@ -137,7 +136,7 @@ - (void)parseData:(NSString *)data } while (foundCmd); - [self loadPath:path]; + [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } diff --git a/Core/SVGPolygonElement.m b/Core/SVGPolygonElement.m index 0359ba38b..24ca6bf40 100644 --- a/Core/SVGPolygonElement.m +++ b/Core/SVGPolygonElement.m @@ -8,7 +8,6 @@ #import "SVGPolygonElement.h" #import "SVGElement+Private.h" -#import "SVGShapeElement+Private.h" #import "SVGPointsAndPathsParser.h" @@ -62,7 +61,7 @@ - (void)parseData:(NSString *)data path:path relativeTo:lastCoordinate]; - [self loadPath:path]; + [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } diff --git a/Core/SVGPolylineElement.m b/Core/SVGPolylineElement.m index 798e88ea3..81fef4517 100644 --- a/Core/SVGPolylineElement.m +++ b/Core/SVGPolylineElement.m @@ -8,7 +8,6 @@ #import "SVGPolylineElement.h" #import "SVGElement+Private.h" -#import "SVGShapeElement+Private.h" #import "SVGUtils.h" @implementation SVGPolylineElement @@ -21,7 +20,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"points"])) { CGMutablePathRef path = SVGPathFromPointsInString([value UTF8String], NO); - [self loadPath:path]; + [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } } diff --git a/Core/SVGRectElement.m b/Core/SVGRectElement.m index 068660359..99334fcad 100644 --- a/Core/SVGRectElement.m +++ b/Core/SVGRectElement.m @@ -8,7 +8,6 @@ #import "SVGRectElement.h" #import "SVGElement+Private.h" -#import "SVGShapeElement+Private.h" @interface SVGRectElement () @@ -98,7 +97,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { NSLog(@"Unsupported corner-radius configuration: rx differs from ry"); } - [self loadPath:path]; + [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } diff --git a/Core/SVGShapeElement+Private.h b/Core/SVGShapeElement+Private.h deleted file mode 100644 index 8648bbb5b..000000000 --- a/Core/SVGShapeElement+Private.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// SVGShapeElement+Private.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGShapeElement.h" - -@interface SVGShapeElement (Private) - -- (void)loadPath:(CGPathRef)aPath; - -@end diff --git a/Core/SVGShapeElement.h b/Core/SVGShapeElement.h index 5ce3f4101..180ac3320 100644 --- a/Core/SVGShapeElement.h +++ b/Core/SVGShapeElement.h @@ -1,9 +1,26 @@ -// -// SVGShapeElement.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// +/** + SVGShapeElement + + NB: half of this class is stored in the secret header file "SVGShapeElement+Private". Due to bugs in + Apple's Xcode, you may not be able to view that file - or come back to the class file - using the + standard Xcode controls + + The majority of real-world SVG elements are Shapes: arbitrary shapes made out of line segments, curves, etc. + + Co-ordinate system + --- + + Many SVG files have poor internal formatting. We deliberately DO NOT FIX THEM (maybe a future feature). + + We store the EXACT WAY THE SVG SHAPE WAS SPECIFIED. If that means the parent had no transform (even though it + obviously should have done), we leave it that way. + + + Data: + - "pathRelative": the actual path as parsed from the original file. THIS MIGHT NOT BE NORMALISED (maybe a future feature) + + - "opacity", "fillColor", "strokeColor", "strokeWidth", "fillPattern", "fillType": SVG info telling you how to paint the shape + */ #import "SVGElement.h" #import "SVGUtils.h" @@ -27,6 +44,15 @@ typedef enum { @property (nonatomic, readwrite) CGFloat strokeWidth; @property (nonatomic, readwrite) SVGColor strokeColor; -@property (nonatomic, readonly) CGPathRef path; +@property (nonatomic, readonly) CGPathRef pathRelative; + +/*! + The provided path will be cloned, and set as the new "pathRelative" + + The provided path MUST already be in the local co-ordinate space, i.e. when rendering, + 0,0 in this path will be transformed by the local transform, and the parent's + transform, and all grandparents in the tree, etc + */ +- (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath; @end diff --git a/Core/SVGShapeElement.m b/Core/SVGShapeElement.m index 4586ba71f..e5ce9961e 100644 --- a/Core/SVGShapeElement.m +++ b/Core/SVGShapeElement.m @@ -29,15 +29,15 @@ @implementation SVGShapeElement @synthesize strokeWidth = _strokeWidth; @synthesize strokeColor = _strokeColor; -@synthesize path = _path; +@synthesize pathRelative = _pathRelative; - (void)finalize { - CGPathRelease(_path); + CGPathRelease(_pathRelative); [super finalize]; } - (void)dealloc { - CGPathRelease(_path); + CGPathRelease(_pathRelative); self.fillPattern = nil; [super dealloc]; @@ -102,14 +102,14 @@ - (void)parseAttributes:(NSDictionary *)attributes { } } -- (void)loadPath:(CGPathRef)aPath { - if (_path) { - CGPathRelease(_path); - _path = NULL; +- (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath { + if (_pathRelative) { + CGPathRelease(_pathRelative); + _pathRelative = NULL; } if (aPath) { - _path = CGPathCreateCopy(aPath); + _pathRelative = CGPathCreateCopy(aPath); } } @@ -165,7 +165,7 @@ - (CALayer *) newLayer { #endif CGMutablePathRef pathToPlaceInLayer = CGPathCreateMutable(); - CGPathAddPath( pathToPlaceInLayer, &transformFromSVGUnitsToScreenUnits, _path); + CGPathAddPath( pathToPlaceInLayer, &transformFromSVGUnitsToScreenUnits, _pathRelative); CGRect rect = CGRectIntegral(CGPathGetPathBoundingBox( pathToPlaceInLayer )); diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index 762c63330..1667eda18 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -116,7 +116,6 @@ 3BF503E4148C62D900CC7D17 /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; 3BF503E5148C62D900CC7D17 /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 3BF503E7148C62D900CC7D17 /* SVGShapeElement+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGShapeElement+Private.h"; sourceTree = ""; }; 3BF503E8148C62D900CC7D17 /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; 3BF503EA148C62D900CC7D17 /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; @@ -292,7 +291,6 @@ 3BF503E4148C62D900CC7D17 /* SVGPolylineElement.m */, 3BF503E5148C62D900CC7D17 /* SVGRectElement.h */, 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */, - 3BF503E7148C62D900CC7D17 /* SVGShapeElement+Private.h */, 3BF503E8148C62D900CC7D17 /* SVGShapeElement.h */, 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */, 3BF503EA148C62D900CC7D17 /* SVGTextElement.h */, diff --git a/iOS/SVGPathView.h b/iOS/SVGPathView.h index 4fb8236d2..ec96ad092 100644 --- a/iOS/SVGPathView.h +++ b/iOS/SVGPathView.h @@ -8,6 +8,9 @@ #import "SVGView.h" +#define ENABLE_SVGPATHVIEW_CLASS 0 + +#if ENABLE_SVGPATHVIEW_CLASS #if NS_BLOCKS_AVAILABLE @@ -51,4 +54,6 @@ typedef void (^layerTreeEnumerator)(CALayer* child); - (void) pathView:(SVGPathView*)v path:(SVGPathElement*)path touch:(UITouch*)touch; -@end \ No newline at end of file +@end + +#endif \ No newline at end of file diff --git a/iOS/SVGPathView.m b/iOS/SVGPathView.m index 7da3027b0..7250a1ece 100755 --- a/iOS/SVGPathView.m +++ b/iOS/SVGPathView.m @@ -8,10 +8,11 @@ #import "SVGElement+Private.h" #import "SVGDocument.h" #import "SVGPathElement.h" -#import "SVGShapeElement+Private.h" #import "CGPathAdditions.h" #import "SVGDocument+CA.h" +#if ENABLE_SVGPATHVIEW_CLASS + @implementation SVGPathView @synthesize delegate; @@ -106,3 +107,4 @@ - (void)enumerateChildLayersUsingBlock:(layerTreeEnumerator)callback #endif @end +#endif From 42810b50aaacedfe5a5306615b527aa5e46cc55d Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 24 Apr 2012 17:20:52 +0100 Subject: [PATCH 002/110] Added docs for SVGPathView --- iOS/SVGPathView.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/iOS/SVGPathView.h b/iOS/SVGPathView.h index ec96ad092..ca081c3c8 100644 --- a/iOS/SVGPathView.h +++ b/iOS/SVGPathView.h @@ -1,7 +1,13 @@ -// -// SVGPathView.h -// SVGKit -// +/** + SVGPathView + + NB: currently disabled, needs minor updating, but we don't have unit tests to check the changes still work + + Purpose: load an SVG full of paths, then be able to select a path and peel that off into a new view. + + + SVGPathView works nicely for that one purpose, it re-orients the path from a document such that it can be displayed properly on it's lonesome rather than whatever other world coords it used to be. + */ #import #import From 08ab263c7ab1bee0defeac28ee3c6b3c497c3a02 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 24 Apr 2012 17:30:25 +0100 Subject: [PATCH 003/110] MINOR: un-privated 3 methods in SVGElement. Removed the header file that breaks Xcode --- Core/SVGDocument.m | 1 - Core/SVGElement+Private.h | 16 ---------------- Core/SVGElement.h | 8 ++++++++ Core/SVGParserSVG.m | 1 - .../SVGPadDemo/SVGPad.xcodeproj/project.pbxproj | 2 -- 5 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 Core/SVGElement+Private.h diff --git a/Core/SVGDocument.m b/Core/SVGDocument.m index 545b76fbc..f34fa7459 100644 --- a/Core/SVGDocument.m +++ b/Core/SVGDocument.m @@ -9,7 +9,6 @@ #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" -#import "SVGElement+Private.h" #import "SVGParser.h" #import "SVGTitleElement.h" #import "SVGPathElement.h" diff --git a/Core/SVGElement+Private.h b/Core/SVGElement+Private.h deleted file mode 100644 index 30a18c0c3..000000000 --- a/Core/SVGElement+Private.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// SVGElement+Private.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGElement.h" - -@interface SVGElement (Private) - -- (void)parseAttributes:(NSDictionary *)attributes; -- (void)addChild:(SVGElement *)element; -- (void)parseContent:(NSString *)content; - -@end diff --git a/Core/SVGElement.h b/Core/SVGElement.h index 88fc07b4a..437865917 100644 --- a/Core/SVGElement.h +++ b/Core/SVGElement.h @@ -44,6 +44,13 @@ @property (nonatomic, retain) SVGElement *parent; #endif +#pragma mark - ORIGINALLY PACKAGE-PROTECTED +- (void)parseAttributes:(NSDictionary *)attributes; +- (void)addChild:(SVGElement *)element; +- (void)parseContent:(NSString *)content; + +#pragma mark - Public + + (BOOL)shouldStoreContent; // to optimize parser, default is NO - (id)initWithDocument:(SVGDocument *)aDocument name:(NSString *)name; @@ -61,6 +68,7 @@ -(CGAffineTransform) transformAbsolute; #endif + @end @protocol SVGLayeredElement < NSObject > diff --git a/Core/SVGParserSVG.m b/Core/SVGParserSVG.m index b399c5868..ce8da3a5c 100644 --- a/Core/SVGParserSVG.m +++ b/Core/SVGParserSVG.m @@ -13,7 +13,6 @@ #import "SVGPolylineElement.h" #import "SVGRectElement.h" #import "SVGTitleElement.h" -#import "SVGElement+Private.h" @implementation SVGParserSVG diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index 1667eda18..dc464c48e 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -90,7 +90,6 @@ 3BF503CA148C62D900CC7D17 /* SVGDocument+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGDocument+CA.m"; sourceTree = ""; }; 3BF503CB148C62D900CC7D17 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; 3BF503CC148C62D900CC7D17 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; - 3BF503CD148C62D900CC7D17 /* SVGElement+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGElement+Private.h"; sourceTree = ""; }; 3BF503CE148C62D900CC7D17 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; 3BF503CF148C62D900CC7D17 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; @@ -263,7 +262,6 @@ 3BF503CA148C62D900CC7D17 /* SVGDocument+CA.m */, 3BF503CB148C62D900CC7D17 /* SVGDocument.h */, 3BF503CC148C62D900CC7D17 /* SVGDocument.m */, - 3BF503CD148C62D900CC7D17 /* SVGElement+Private.h */, 3BF503CE148C62D900CC7D17 /* SVGElement.h */, 3BF503CF148C62D900CC7D17 /* SVGElement.m */, 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */, From ad15afd4757da3b8a14a55bc75184cea9be01161 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 24 Apr 2012 22:34:42 +0100 Subject: [PATCH 004/110] MEGA RE-FACTOR: added SVGImage (similar to UIImage), made SVGDocument only represent the file / URL on disk, cleaned up the "export to CALayers" (more cleanup work left to do there), and upgraded the SVGKit library to compile cleanly on iOS 5.x --- Core/SVGBasicDataTypes.h | 80 +++ Core/SVGBasicDataTypes.m | 66 ++ Core/SVGDocument.h | 78 +-- Core/SVGDocument.m | 275 +------- Core/SVGElement.h | 8 +- Core/SVGElement.m | 4 +- Core/SVGEllipseElement.m | 2 - Core/SVGGroupElement.m | 3 - Core/{SVGDocument+CA.h => SVGImage+CA.h} | 15 +- Core/{SVGDocument+CA.m => SVGImage+CA.m} | 51 +- Core/SVGImage.h | 117 ++++ Core/SVGImage.m | 291 ++++++++ Core/SVGKit.h | 4 +- Core/SVGLineElement.m | 2 - Core/SVGParser.h | 61 +- Core/SVGParser.m | 54 +- Core/SVGParserExtension.h | 38 + Core/SVGParserSVG.m | 44 +- Core/SVGPathElement.m | 1 - Core/SVGPolygonElement.m | 2 - Core/SVGPolylineElement.m | 1 - Core/SVGRectElement.m | 1 - Core/SVGSVGElement.h | 40 ++ Core/SVGSVGElement.m | 95 +++ Core/SVGShapeElement.m | 2 - .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 650 +++++++++--------- .../SVGPadDemo/Classes/DetailViewController.m | 12 +- .../SVGPadDemo/Classes/SVGPadAppDelegate.h | 3 + .../SVGPad.xcodeproj/project.pbxproj | 50 +- iOS/SVGDocumentView.h | 22 - iOS/SVGDocumentView.m | 86 --- iOS/SVGPathView.m | 7 +- iOS/SVGView.h | 6 +- iOS/SVGView.m | 24 +- 34 files changed, 1294 insertions(+), 901 deletions(-) create mode 100644 Core/SVGBasicDataTypes.h create mode 100644 Core/SVGBasicDataTypes.m rename Core/{SVGDocument+CA.h => SVGImage+CA.h} (55%) rename Core/{SVGDocument+CA.m => SVGImage+CA.m} (55%) create mode 100644 Core/SVGImage.h create mode 100644 Core/SVGImage.m create mode 100644 Core/SVGParserExtension.h create mode 100644 Core/SVGSVGElement.h create mode 100644 Core/SVGSVGElement.m delete mode 100644 iOS/SVGDocumentView.h delete mode 100644 iOS/SVGDocumentView.m diff --git a/Core/SVGBasicDataTypes.h b/Core/SVGBasicDataTypes.h new file mode 100644 index 000000000..e9bc4fb49 --- /dev/null +++ b/Core/SVGBasicDataTypes.h @@ -0,0 +1,80 @@ +/** + SVGBasicDataTypes.h + + Contains structs needed to support SVGKit, and all the methods you need to manipulate, create, view those structs + */ + +#ifndef SVG_BASIC_DATA_TYPES_H_ +#define SVG_BASIC_DATA_TYPES_H_ + + +#import + +#import + +/** + http://www.w3.org/TR/SVG11/types.html#InterfaceSVGLength + + // Length Unit Types + const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; + const unsigned short SVG_LENGTHTYPE_NUMBER = 1; + const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; + const unsigned short SVG_LENGTHTYPE_EMS = 3; + const unsigned short SVG_LENGTHTYPE_EXS = 4; + const unsigned short SVG_LENGTHTYPE_PX = 5; + const unsigned short SVG_LENGTHTYPE_CM = 6; + const unsigned short SVG_LENGTHTYPE_MM = 7; + const unsigned short SVG_LENGTHTYPE_IN = 8; + const unsigned short SVG_LENGTHTYPE_PT = 9; + const unsigned short SVG_LENGTHTYPE_PC = 10; + + readonly attribute unsigned short unitType; + attribute float value setraises(DOMException); + attribute float valueInSpecifiedUnits setraises(DOMException); + attribute DOMString valueAsString setraises(DOMException); +*/ +typedef enum SVGLengthType +{ + SVGLengthTypeUnknown, + SVGLengthTypeNumber, + SVGLengthTypePercentage, + SVGLengthTypeEms, + SVGLengthTypeExs, + SVGLengthTypePx, + SVGLengthTypeCm, + SVGLengthTypeMm, + SVGLengthTypeIn, + SVGLengthTypePt, + SVGLengthTypePc +} SVGLengthType; + +/** + When a is used in an SVG presentation attribute, the syntax must match the following pattern: + + length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")? + */ +typedef struct +{ + const float value; + const SVGLengthType type; +} SVGLength; + +// FIXME: only absolute widths and heights are supported (no percentages) +extern const SVGLength SVGLengthZero; + +/** Only supports raw float numbers for now, and pretends they are pixels */ +SVGLength SVGLengthFromNSString( NSString* value ); + +SVGLength SVGLengthGetWidth( CGRect rect ); + +SVGLength SVGLengthGetHeight( CGRect rect ); + +CGFloat SVGLengthAsPixels( SVGLength len ); + +CGFloat SVGLengthAsApplePoints( SVGLength len ); + +@interface SVGBasicDataTypes : NSObject + +@end + +#endif \ No newline at end of file diff --git a/Core/SVGBasicDataTypes.m b/Core/SVGBasicDataTypes.m new file mode 100644 index 000000000..95279c110 --- /dev/null +++ b/Core/SVGBasicDataTypes.m @@ -0,0 +1,66 @@ +// +// SVGBasicDataTypes.m +// SVGPad +// +// Created by adam applecansuckmybigtodger on 24/04/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "SVGBasicDataTypes.h" + +const SVGLength SVGLengthZero = { 0.0, SVGLengthTypeUnknown }; + +/** Only supports raw float numbers now, and pretends they are pixels */ +SVGLength SVGLengthFromNSString( NSString* value ) +{ + SVGLength result = { [value floatValue], SVGLengthTypePx }; + return result; +} + +SVGLength SVGLengthGetWidth( CGRect rect ) +{ + SVGLength result = { CGRectGetWidth(rect), SVGLengthTypePx }; + return result; +} + +SVGLength SVGLengthGetHeight( CGRect rect ) +{ + SVGLength result = { CGRectGetHeight(rect), SVGLengthTypePx }; + return result; +} + +CGFloat SVGLengthAsPixels( SVGLength len ) +{ + switch( len.type ) + { + case SVGLengthTypeUnknown: + case SVGLengthTypeNumber: + case SVGLengthTypePercentage: + case SVGLengthTypeEms: + case SVGLengthTypeExs: + case SVGLengthTypeCm: + case SVGLengthTypeMm: + case SVGLengthTypeIn: + case SVGLengthTypePt: + case SVGLengthTypePc: + { + NSCAssert( FALSE, @"Can't convert this particular SVGLength type to pixels" ); + } + + case SVGLengthTypePx: + return len.value; + } +} + +/*! Currently returns length-as-pixels (even though Apple has 4x real pixels to the apple points, right now the SVG lib does NOTHING special to handle Retina displays) + + TODO: add Retina support to SVGKit, and when it works: this method should perhaps return pixels / (points/pixel) + */ +CGFloat SVGLengthAsApplePoints( SVGLength len ) +{ + return SVGLengthAsPixels(len); +} + +@implementation SVGBasicDataTypes + +@end diff --git a/Core/SVGDocument.h b/Core/SVGDocument.h index f019d7f47..64d76eb61 100644 --- a/Core/SVGDocument.h +++ b/Core/SVGDocument.h @@ -1,61 +1,31 @@ -// -// SVGDocument.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGElement.h" - -#import "SVGGroupElement.h" - -#import "SVGParser.h" - -#if NS_BLOCKS_AVAILABLE -typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); -#endif - -@class SVGDefsElement; - -@interface SVGDocument : SVGElement < SVGLayeredElement > { -} - -// only absolute widths and heights are supported (no percentages) -@property (nonatomic, readonly) CGFloat width; -@property (nonatomic, readonly) CGFloat height; -@property (nonatomic, readonly, copy) NSString *version; -@property (nonatomic, readonly) CGRect viewBoxFrame; - -// convenience accessors to parsed children -@property (nonatomic, readonly) NSString *title; -@property (nonatomic, readonly) NSString *desc; // 'description' is reserved by NSObject -@property (nonatomic, readonly) SVGDefsElement *defs; - -/*! from the SVG spec, each "g" tag in the XML is a separate "group of graphics things", - * this dictionary contains a mapping from "value of id attribute" to "SVGGroupElement" - * - * see also: anonymousGraphicsGroups (for groups that have no "id=" attribute) +/** + SVGDocument.h + + NB: this is NOTHING SIMILAR to the old SVGDocument class that existed in early versions of SVGKit. This is a complete + re-write. + + SVGDocument represents the info about a file that was read from disk or over the web during parsing. + + Once it has been parsed / loaded, that info is NOT PART OF the in-memory SVG any more - if you were to save the file, you could + save it in a different location, with a different SVG Spec, etc. + + However, it's useful for debugging (and for optional "save this document in same place it was loaded from / same format" + to store this info at runtime just in case it's needed later. + + Also, it helps during parsing to keep track of some document-level information + */ -@property (nonatomic, retain) NSDictionary *graphicsGroups; -/*! from the SVG spec, each "g" tag in the XML is a separate "group of graphics things", - * this array contains all the groups that had no "id=" attribute - * - * see also: graphicsGroups (for groups that have an "id=" attribute) - */ -@property (nonatomic, retain) NSArray *anonymousGraphicsGroups; - -+ (void) addSVGParserExtension:(NSObject*) extension; -+ (id)documentNamed:(NSString *)name; // 'name' in mainBundle -+ (id)documentFromURL:(NSURL *)url; -+ (id)documentWithContentsOfFile:(NSString *)aPath; -- (id)initWithContentsOfFile:(NSString *)aPath; -- (id)initWithFrame:(CGRect)frame; +#import -#if NS_BLOCKS_AVAILABLE +@interface SVGDocument : NSObject -- (void) applyAggregator:(SVGElementAggregationBlock)aggregator; +@property(nonatomic,retain) NSString* svgLanguageVersion; /*< */ +@property(nonatomic) BOOL hasSourceFile, hasSourceURL; +@property(nonatomic,retain) NSString* filePath; +@property(nonatomic,retain) NSURL* URL; -#endif ++(SVGDocument*) documentFromFilename:(NSString*) p; ++(SVGDocument*) documentFromURL:(NSURL*) u; @end diff --git a/Core/SVGDocument.m b/Core/SVGDocument.m index f34fa7459..2c6f7721e 100644 --- a/Core/SVGDocument.m +++ b/Core/SVGDocument.m @@ -1,281 +1,24 @@ -// -// SVGDocument.m -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// #import "SVGDocument.h" -#import "SVGDefsElement.h" -#import "SVGDescriptionElement.h" -#import "SVGParser.h" -#import "SVGTitleElement.h" -#import "SVGPathElement.h" - -#import "SVGParserSVG.h" - -@interface SVGDocument () - -@property (nonatomic, copy) NSString *version; - -/*! Only preserved for temporary backwards compatibility */ -- (BOOL)parseFileAtPath:(NSString *)aPath; -/*! Only preserved for temporary backwards compatibility */ --(BOOL)parseFileAtURL:(NSURL *)url; - -- (BOOL)parseFileAtPath:(NSString *)aPath error:(NSError**) error; -- (BOOL)parseFileAtURL:(NSURL *)url error:(NSError**) error; - -- (SVGElement *)findFirstElementOfClass:(Class)class; - -@end - - @implementation SVGDocument -@synthesize width = _width; -@synthesize height = _height; -@synthesize version = _version; -@synthesize viewBoxFrame = _viewBoxFrame; +@synthesize svgLanguageVersion; +@synthesize hasSourceFile, hasSourceURL; +@synthesize filePath, URL; -@synthesize graphicsGroups, anonymousGraphicsGroups; - -@dynamic title, desc, defs; - -static NSMutableArray* _parserExtensions; -+ (void) addSVGParserExtension:(NSObject*) extension ++(SVGDocument*) documentFromFilename:(NSString*) p { - if( _parserExtensions == nil ) - { - _parserExtensions = [NSMutableArray new]; - } - - [_parserExtensions addObject:extension]; -} - -/* TODO: parse 'viewBox' */ - -+ (id)documentNamed:(NSString *)name { - NSParameterAssert(name != nil); - - NSBundle *bundle = [NSBundle mainBundle]; - - if (!bundle) - return nil; - - NSString *newName = [name stringByDeletingPathExtension]; - NSString *extension = [name pathExtension]; - if ([@"" isEqualToString:extension]) { - extension = @"svg"; - } - - NSString *path = [bundle pathForResource:newName ofType:extension]; - - if (!path) - { - NSLog(@"[%@] MISSING FILE, COULD NOT CREATE DOCUMENT: filename = %@, extension = %@", [self class], newName, extension); - return nil; - } - - return [self documentWithContentsOfFile:path]; -} - -+ (id)documentFromURL:(NSURL *)url { - NSParameterAssert(url != nil); - - return [[[[self class] alloc] initWithContentsOfURL:url] autorelease]; -} - -+ (id)documentWithContentsOfFile:(NSString *)aPath { - return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; -} - -- (id)initWithContentsOfFile:(NSString *)aPath { - NSParameterAssert(aPath != nil); - - self = [super initWithDocument:self name:@"svg"]; - if (self) { - _width = _height = 100; - - NSError* parseError = nil; - if (![self parseFileAtPath:aPath error:&parseError]) { - NSLog(@"[%@] MISSING OR CORRUPT FILE, OR FILE USES FEATURES THAT SVGKit DOES NOT YET SUPPORT, COULD NOT CREATE DOCUMENT: path = %@, error = %@", [self class], aPath, parseError); - - [self release]; - return nil; - } - } - return self; -} - -- (id)initWithContentsOfURL:(NSURL *)url { - NSParameterAssert(url != nil); - - self = [super initWithDocument:self name:@"svg"]; - if (self) { - _width = _height = 100; - - if (![self parseFileAtURL:url]) { - NSLog(@"[%@] ERROR: COULD NOT FIND SVG AT URL = %@", [self class], url); - - [self release]; - return nil; - } - } - return self; -} - -- (id) initWithFrame:(CGRect)frame -{ - self = [super initWithDocument:self name:@"svg"]; - if (self) { - _width = CGRectGetWidth(frame); - _height = CGRectGetHeight(frame); - } - return self; -} - -- (void)dealloc { - [_version release]; - self.graphicsGroups = nil; - self.anonymousGraphicsGroups = nil; - [super dealloc]; -} - -- (BOOL)parseFileAtPath:(NSString *)aPath error:(NSError**) error { - SVGParser *parser = [[SVGParser alloc] initWithPath:aPath document:self]; - SVGParserSVG *subParserSVG = [[[SVGParserSVG alloc] init] autorelease]; - [parser.parserExtensions addObject:subParserSVG]; - for( NSObject* extension in _parserExtensions ) - { - [parser.parserExtensions addObject:extension]; - } - - if (![parser parse:error]) { - NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); - [parser release]; - - return NO; - } - - [parser release]; - - return YES; -} - -- (BOOL)parseFileAtPath:(NSString *)aPath { - return [self parseFileAtPath:aPath error:nil]; -} - - --(BOOL)parseFileAtURL:(NSURL *)url error:(NSError**) error { - SVGParser *parser = [[SVGParser alloc] initWithURL:url document:self]; - SVGParserSVG *subParserSVG = [[[SVGParserSVG alloc] init] autorelease]; - [parser.parserExtensions addObject:subParserSVG]; - for( NSObject* extension in _parserExtensions ) - { - [parser.parserExtensions addObject:extension]; - } - - if (![parser parse:error]) { - NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); - [parser release]; - - return NO; - } + SVGDocument* d; - [parser release]; - - return YES; -} - --(BOOL)parseFileAtURL:(NSURL *)url { - return [self parseFileAtURL:url error:nil]; -} - -- (CALayer *)newLayer { - - CALayer* _layer = [CALayer layer]; - _layer.frame = CGRectMake(0.0f, 0.0f, _width, _height); - - return _layer; + return d; } -- (void)layoutLayer:(CALayer *)layer { } - -- (SVGElement *)findFirstElementOfClass:(Class)class { - for (SVGElement *element in self.children) { - if ([element isKindOfClass:class]) - return element; - } - - return nil; -} - -- (NSString *)title { - return [self findFirstElementOfClass:[SVGTitleElement class]].stringValue; -} - -- (NSString *)desc { - return [self findFirstElementOfClass:[SVGDescriptionElement class]].stringValue; -} - -- (SVGDefsElement *)defs { - return (SVGDefsElement *) [self findFirstElementOfClass:[SVGDefsElement class]]; -} - -- (void)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; - - id value = nil; - - if ((value = [attributes objectForKey:@"width"])) { - _width = [value floatValue]; - } - - if ((value = [attributes objectForKey:@"height"])) { - _height = [value floatValue]; - } - - if ((value = [attributes objectForKey:@"version"])) { - self.version = value; - } - - if( (value = [attributes objectForKey:@"viewBox"])) { - NSArray* boxElements = [(NSString*) value componentsSeparatedByString:@" "]; - - _viewBoxFrame = CGRectMake([[boxElements objectAtIndex:0] floatValue], [[boxElements objectAtIndex:1] floatValue], [[boxElements objectAtIndex:2] floatValue], [[boxElements objectAtIndex:3] floatValue]); - NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromCGRect(self.viewBoxFrame)); - } -} - -#if NS_BLOCKS_AVAILABLE - -- (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGElement < SVGLayeredElement > *)element ++(SVGDocument*) documentFromURL:(NSURL*) u { - if (![element.children count]) { - return; - } + SVGDocument* d; - for (SVGElement *child in element.children) { - if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - SVGElement* layeredElement = (SVGElement*)child; - if (layeredElement) { - aggregator(layeredElement); - - [self applyAggregator:aggregator - toElement:layeredElement]; - } - } - } + return d; } -- (void) applyAggregator:(SVGElementAggregationBlock)aggregator -{ - [self applyAggregator:aggregator toElement:self]; -} - -#endif - @end diff --git a/Core/SVGElement.h b/Core/SVGElement.h index 437865917..4b80a9cf9 100644 --- a/Core/SVGElement.h +++ b/Core/SVGElement.h @@ -23,12 +23,6 @@ /*! This is used when generating CALayer objects, to store the id of the SVGElement that created the CALayer */ #define kSVGElementIdentifier @"SVGElementIdentifier" -#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR -@property (nonatomic, readonly) SVGDocument *document; -#else -@property (nonatomic, readonly) __weak SVGDocument *document; -#endif - @property (nonatomic, readonly) NSArray *children; @property (nonatomic, readonly, copy) NSString *stringValue; @property (nonatomic, readonly) NSString *localName; @@ -53,7 +47,7 @@ + (BOOL)shouldStoreContent; // to optimize parser, default is NO -- (id)initWithDocument:(SVGDocument *)aDocument name:(NSString *)name; +- (id)initWithName:(NSString *)name; - (void)loadDefaults; // should be overriden to set element defaults diff --git a/Core/SVGElement.m b/Core/SVGElement.m index 62b88d264..50a2ff8eb 100644 --- a/Core/SVGElement.m +++ b/Core/SVGElement.m @@ -25,7 +25,6 @@ @interface SVGElement () */ @implementation SVGElement -@synthesize document = _document; @synthesize children = _children; @synthesize stringValue = _stringValue; @@ -57,10 +56,9 @@ - (id)init { return self; } -- (id)initWithDocument:(SVGDocument *)aDocument name:(NSString *)name { +- (id)initWithName:(NSString *)name { self = [self init]; if (self) { - _document = aDocument; _localName = [name retain]; #if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES self.transformRelative = CGAffineTransformIdentity; diff --git a/Core/SVGEllipseElement.m b/Core/SVGEllipseElement.m index f7cd2783d..a9ba0bf14 100644 --- a/Core/SVGEllipseElement.m +++ b/Core/SVGEllipseElement.m @@ -7,8 +7,6 @@ #import "SVGEllipseElement.h" -#import "SVGElement+Private.h" - @implementation SVGEllipseElement @synthesize cx = _cx; diff --git a/Core/SVGGroupElement.m b/Core/SVGGroupElement.m index 41712ea83..2f7cd973a 100644 --- a/Core/SVGGroupElement.m +++ b/Core/SVGGroupElement.m @@ -12,9 +12,6 @@ but allows additional nesting (e.g. for programmatic / organizational purposes). */ #import "SVGGroupElement.h" -#import "SVGDocument.h" - -#import "SVGElement+Private.h" #import "CALayerWithChildHitTest.h" @implementation SVGGroupElement diff --git a/Core/SVGDocument+CA.h b/Core/SVGImage+CA.h similarity index 55% rename from Core/SVGDocument+CA.h rename to Core/SVGImage+CA.h index 50769a046..eea7d9313 100644 --- a/Core/SVGDocument+CA.h +++ b/Core/SVGImage+CA.h @@ -1,14 +1,8 @@ -// -// SVGDocument+CA.h -// SVGKit -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -#import "SVGDocument.h" + +#import "SVGImage.h" #import -@interface SVGDocument (CA) +@interface SVGImage (CA) - (CALayer *)layerWithIdentifier:(NSString *)identifier; @@ -18,4 +12,7 @@ - (CALayer *)layerWithElement:(SVGElement < SVGLayeredElement > *)element; +/*! returns all the individual CALayer's in the full layer tree, indexed by the SVG identifier of the SVG node that created that layer */ +- (NSDictionary*) dictionaryOfLayers; + @end diff --git a/Core/SVGDocument+CA.m b/Core/SVGImage+CA.m similarity index 55% rename from Core/SVGDocument+CA.m rename to Core/SVGImage+CA.m index 7c9055ede..580597547 100644 --- a/Core/SVGDocument+CA.m +++ b/Core/SVGImage+CA.m @@ -1,15 +1,8 @@ -// -// SVGDocument+CA.m -// SVGKit -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -#import "SVGDocument+CA.h" +#import "SVGImage+CA.h" #import -@implementation SVGDocument (CA) +@implementation SVGImage (CA) static const char *kLayerTreeKey = "svgkit.layertree"; @@ -36,7 +29,7 @@ - (CALayer *)layerTree { CALayer *cachedLayerTree = objc_getAssociatedObject(self, (void *) kLayerTreeKey); if (!cachedLayerTree) { - cachedLayerTree = [self layerWithElement:self]; + cachedLayerTree = [self layerWithElement:self.rootElement]; objc_setAssociatedObject(self, (void *) kLayerTreeKey, cachedLayerTree, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } @@ -62,7 +55,7 @@ - (CALayer *)layerWithElement:(SVGElement *)element { } } - if (element != self) { + if (element != self.rootElement) { [element layoutLayer:layer]; } @@ -71,4 +64,40 @@ - (CALayer *)layerWithElement:(SVGElement *)element { return layer; } +- (void) addSVGLayerTree:(CALayer*) layer withIdentifier:(NSString*) layerID toDictionary:(NSMutableDictionary*) layersByID +{ + [layersByID setValue:layer forKey:layerID]; + + if ( [layer.sublayers count] < 1 ) + { + return; + } + + for (CALayer *subLayer in layer.sublayers) + { + NSString* subLayerID = [subLayer valueForKey:kSVGElementIdentifier]; + + if( subLayerID != nil ) + { + NSLog(@"[%@] element id: %@ => layer: %@", [self class], subLayerID, subLayer); + + [self addSVGLayerTree:subLayer withIdentifier:subLayerID toDictionary:layersByID]; + + } + } +} + +- (NSDictionary*) dictionaryOfLayers +{ + NSMutableDictionary* layersByElementId = [NSMutableDictionary dictionary]; + + CALayer* rootLayer = [self layerTree]; + + [self addSVGLayerTree:rootLayer withIdentifier:self.rootElement.identifier toDictionary:layersByElementId]; + + NSLog(@"[%@] ROOT element id: %@ => layer: %@", [self class], self.rootElement.identifier, rootLayer); + + return layersByElementId; +} + @end diff --git a/Core/SVGImage.h b/Core/SVGImage.h new file mode 100644 index 000000000..c7dcdbcf3 --- /dev/null +++ b/Core/SVGImage.h @@ -0,0 +1,117 @@ +/* + SVGImage + + The main class in SVGKit - this is the one you'll normally interact with + + An SVGImage is as close to "the SVG version of a UIImage" as we could possibly get. We cannot + subclass UIImage because Apple has defined UIImage as immutable - and SVG images actually change + (each time you zoom in, we want to re-render the SVG as a higher-resolution set of pixels) + + We use the exact same method names as UIImage, and try to be literally as identical as possible. + + Data: + - uiImage: not supported yet: will be a cached UIImage that is re-generated on demand. Will enable us to implement an SVGImageView + that works as a drop-in replacement for UIImageView + - size: as per the UIImage.size, returns a size in Apple Points (i.e. 320 == width of iPhone, irrespective of Retina) + - scale: ??? unknown how we'll define this, but could be useful when doing auto-re-render-on-zoom + - svgWidth: the internal SVGLength used to generate the correct .size + - svgHeight: the internal SVGLength used to generate the correct .size + - rootElement: the SVGSVGElement instance that is the root of the parse SVG tree. Use this to access the full SVG document + - svgDescription: ??? + - title: ??? + - defs: the root element + + */ + +#import "SVGBasicDataTypes.h" +#import "SVGElement.h" +#import "SVGSVGElement.h" + +#import "SVGGroupElement.h" + +#import "SVGParser.h" + +#if NS_BLOCKS_AVAILABLE +typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); +#endif + +@class SVGDefsElement; + +@interface SVGImage : NSObject /** Apple made it effectively impossible to extend UIImage: it is immutable */ +{ +} + +#if TARGET_OS_IPHONE +@property (nonatomic, readonly) UIImage* uiImage; /** generates an image on the fly */ +#endif + +@property (nonatomic, readonly) SVGLength svgWidth; +@property (nonatomic, readonly) SVGLength svgHeight; + +// convenience accessors to parsed children +@property (nonatomic, readonly) NSString *title; +@property (nonatomic, readonly) NSString *svgDescription; // 'description' is reserved by NSObject +@property (nonatomic, readonly) SVGDefsElement *defs; + +@property (nonatomic, readonly) SVGSVGElement* rootElement; + ++ (SVGImage *)imageNamed:(NSString *)name; // load from main bundle + ++ (SVGImage *)imageWithContentsOfFile:(NSString *)path; ++ (SVGImage *)imageWithData:(NSData *)data; + +- (id)initWithContentsOfFile:(NSString *)path; +- (id)initWithData:(NSData *)data; + +#pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods +@property(nonatomic,readonly) CGSize size; // reflects orientation setting. size is in pixels +@property(nonatomic,readonly) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); + +/** + + TODO: From UIImage. Not needed, I think? + + @property(nonatomic,readonly) CIImage *CIImage __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // returns underlying CIImage or nil if CGImageRef based +*/ + +// the these draw the image 'right side up' in the usual coordinate system with 'point' being the top-left. + +- (void)drawAtPoint:(CGPoint)point; // mode = kCGBlendModeNormal, alpha = 1.0 + +#pragma mark - unsupported / unimplemented UIImage methods (should add as a feature) +- (void)drawAtPoint:(CGPoint)point blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha; +- (void)drawInRect:(CGRect)rect; // mode = kCGBlendModeNormal, alpha = 1.0 +- (void)drawInRect:(CGRect)rect blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha; + +- (void)drawAsPatternInRect:(CGRect)rect; // draws the image as a CGPattern +// animated images. When set as UIImageView.image, animation will play in an infinite loop until removed. Drawing will render the first image + ++ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // read sequnce of files with suffix starting at 0 or 1 ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // squence of files ++ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); + +/** + + TODO: From UIImage. Not needed, I think? + +@property(nonatomic,readonly) NSArray *images __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // default is nil for non-animated images +@property(nonatomic,readonly) NSTimeInterval duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // total duration for all frames. default is 0 for non-animated images + */ +#pragma mark ---------end of unsupported items + ++ (id)documentFromURL:(NSURL *)url; + +- (id)initWithContentsOfFile:(NSString *)aPath; +- (id)initWithFrame:(CGRect)frame; + +#pragma mark - utility methods + +#if NS_BLOCKS_AVAILABLE + +- (void) applyAggregator:(SVGElementAggregationBlock)aggregator; + +#endif + +@end + + diff --git a/Core/SVGImage.m b/Core/SVGImage.m new file mode 100644 index 000000000..13e802a8b --- /dev/null +++ b/Core/SVGImage.m @@ -0,0 +1,291 @@ +#import "SVGImage.h" + +#import "SVGDefsElement.h" +#import "SVGDescriptionElement.h" +#import "SVGParser.h" +#import "SVGTitleElement.h" +#import "SVGPathElement.h" + +#import "SVGParserSVG.h" + +@interface SVGImage () + +/*! Only preserved for temporary backwards compatibility */ +- (BOOL)parseFileAtPath:(NSString *)aPath; +/*! Only preserved for temporary backwards compatibility */ +-(BOOL)parseFileAtURL:(NSURL *)url; + +- (BOOL)parseFileAtPath:(NSString *)aPath error:(NSError**) error; +- (BOOL)parseFileAtURL:(NSURL *)url error:(NSError**) error; + +@property (nonatomic, readwrite) SVGSVGElement* rootElement; + +#pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods +//NOT DEFINED: what is the scale for a SVGImage? @property(nonatomic,readwrite) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); + +@end + +#pragma mark - main class +@implementation SVGImage + +@synthesize svgWidth = _width; +@synthesize svgHeight = _height; +@synthesize rootElement = _rootElement; + +@dynamic title, svgDescription, defs; + + ++ (SVGImage *)imageNamed:(NSString *)name { + NSParameterAssert(name != nil); + + NSBundle *bundle = [NSBundle mainBundle]; + + if (!bundle) + return nil; + + NSString *newName = [name stringByDeletingPathExtension]; + NSString *extension = [name pathExtension]; + if ([@"" isEqualToString:extension]) { + extension = @"svg"; + } + + NSString *path = [bundle pathForResource:newName ofType:extension]; + + if (!path) + { + NSLog(@"[%@] MISSING FILE, COULD NOT CREATE DOCUMENT: filename = %@, extension = %@", [self class], newName, extension); + return nil; + } + + return [self imageWithContentsOfFile:path]; +} + ++ (id)documentFromURL:(NSURL *)url { + NSParameterAssert(url != nil); + + return [[[[self class] alloc] initWithContentsOfURL:url] autorelease]; +} + ++ (SVGImage*)imageWithContentsOfFile:(NSString *)aPath { + return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; +} + +- (id)initWithContentsOfFile:(NSString *)aPath { + NSParameterAssert(aPath != nil); + + self = [super init]; + if (self) { + self.rootElement = [[SVGSVGElement alloc] initWithName:@"svg"]; + _width = SVGLengthZero; + _height = SVGLengthZero; + + NSError* parseError = nil; + if (![self parseFileAtPath:aPath error:&parseError]) { + NSLog(@"[%@] MISSING OR CORRUPT FILE, OR FILE USES FEATURES THAT SVGKit DOES NOT YET SUPPORT, COULD NOT CREATE DOCUMENT: path = %@, error = %@", [self class], aPath, parseError); + + [self release]; + return nil; + } + } + return self; +} + +- (id)initWithContentsOfURL:(NSURL *)url { + NSParameterAssert(url != nil); + + self = [super init]; + if (self) { + self.rootElement = [[SVGSVGElement alloc] initWithName:@"svg"]; + _width = SVGLengthZero; + _height = SVGLengthZero; + + if (![self parseFileAtURL:url]) { + NSLog(@"[%@] ERROR: COULD NOT FIND SVG AT URL = %@", [self class], url); + + [self release]; + return nil; + } + } + return self; +} + +- (id) initWithFrame:(CGRect)frame +{ + self = [super init]; + if (self) { + self.rootElement = [[SVGSVGElement alloc] initWithName:@"svg"]; + + _width = SVGLengthGetWidth(frame); + _height = SVGLengthGetHeight(frame); + } + return self; +} + +- (void)dealloc { + self.rootElement = nil; + [super dealloc]; +} + ++ (UIImage *)imageWithData:(NSData *)data +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); + return nil; +} + +- (id)initWithData:(NSData *)data +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); + return nil; +} + +#pragma mark - UIImage methods we reproduce to make it act like a UIImage + +-(CGSize)size +{ + return CGSizeMake( SVGLengthAsApplePoints(self.svgWidth), SVGLengthAsApplePoints(self.svgHeight)); +} + +-(CGFloat)scale +{ + NSAssert( FALSE, @"image.scale is currently UNDEFINED for an SVGImage (nothing implemented by SVGKit)" ); + return 0.0; +} + +-(UIImage *)uiImage +{ + NSAssert( FALSE, @"Auto-converting SVGImage to a rasterized UIImage is not yet implemented by SVGKit" ); + return nil; +} + +// the these draw the image 'right side up' in the usual coordinate system with 'point' being the top-left. + +- (void)drawAtPoint:(CGPoint)point // mode = kCGBlendModeNormal, alpha = 1.0 +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); +} + +#pragma mark - unsupported / unimplemented UIImage methods (should add as a feature) +- (void)drawAtPoint:(CGPoint)point blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha +{ +NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); +} +- (void)drawInRect:(CGRect)rect // mode = kCGBlendModeNormal, alpha = 1.0 +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); +} +- (void)drawInRect:(CGRect)rect blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); +} + +- (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern +// animated images. When set as UIImageView.image, animation will play in an infinite loop until removed. Drawing will render the first image +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); +} + ++ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); + return nil; +} ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); + return nil; +} ++ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) +{ + NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); + return nil; +} + + +- (BOOL)parseFileAtPath:(NSString *)aPath error:(NSError**) error { + SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:[SVGDocument documentFromFilename:aPath] ]; + + if (![defaultParser parse:error]) { + NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); + [defaultParser release]; + + return NO; + } + + return YES; +} + +- (BOOL)parseFileAtPath:(NSString *)aPath { + return [self parseFileAtPath:aPath error:nil]; +} + + +-(BOOL)parseFileAtURL:(NSURL *)url error:(NSError**) error { + SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:[SVGDocument documentFromURL:url]]; + + if (![defaultParser parse:error]) { + NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); + [defaultParser release]; + + return NO; + } + + [defaultParser release]; + + return YES; +} + +-(BOOL)parseFileAtURL:(NSURL *)url { + return [self parseFileAtURL:url error:nil]; +} + +- (CALayer *)newLayer { + + CALayer* _layer = [CALayer layer]; + _layer.frame = CGRectMake(0.0f, 0.0f, SVGLengthAsPixels(self.svgWidth), SVGLengthAsPixels(self.svgHeight)); + + return _layer; +} + +- (void)layoutLayer:(CALayer *)layer { } + +- (NSString *)title { + return [self.rootElement findFirstElementOfClass:[SVGTitleElement class]].stringValue; +} + +- (NSString *)desc { + return [self.rootElement findFirstElementOfClass:[SVGDescriptionElement class]].stringValue; +} + +- (SVGDefsElement *)defs { + return (SVGDefsElement *) [self.rootElement findFirstElementOfClass:[SVGDefsElement class]]; +} + +#if NS_BLOCKS_AVAILABLE + +- (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGElement < SVGLayeredElement > *)element +{ + if (![element.children count]) { + return; + } + + for (SVGElement *child in element.children) { + if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { + SVGElement* layeredElement = (SVGElement*)child; + if (layeredElement) { + aggregator(layeredElement); + + [self applyAggregator:aggregator + toElement:layeredElement]; + } + } + } +} + +- (void) applyAggregator:(SVGElementAggregationBlock)aggregator +{ + [self applyAggregator:aggregator toElement:self.rootElement]; +} + +#endif + +@end diff --git a/Core/SVGKit.h b/Core/SVGKit.h index 68f20142b..669a6f7f5 100644 --- a/Core/SVGKit.h +++ b/Core/SVGKit.h @@ -11,8 +11,8 @@ #import "SVGCircleElement.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" - #import "SVGDocument.h" - #import "SVGDocument+CA.h" + #import "SVGImage.h" + #import "SVGImage+CA.h" #import "SVGElement.h" #import "SVGEllipseElement.h" #import "SVGGroupElement.h" diff --git a/Core/SVGLineElement.m b/Core/SVGLineElement.m index 69d89607b..6852f0d7b 100644 --- a/Core/SVGLineElement.m +++ b/Core/SVGLineElement.m @@ -7,8 +7,6 @@ #import "SVGLineElement.h" -#import "SVGElement+Private.h" - @implementation SVGLineElement @synthesize x1 = _x1; diff --git a/Core/SVGParser.h b/Core/SVGParser.h index 9becccef2..8f83bd4f9 100644 --- a/Core/SVGParser.h +++ b/Core/SVGParser.h @@ -1,9 +1,28 @@ -// -// SVGParser.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// +/** + SVGParser.h + + The main parser for SVGKit. All the magic starts here + + PARSING + --- + Actual parsing of an SVG is split into three places: + + 1. High level, XML parsing: this file (SVGParser) + 2. Mid level, parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" + 3. Mid level, parsing SVG tags only: SVGParserSVG (it's an extension that just does base SVG) + 4. Low level, parsing individual tags within a file, and precise co-ordinates: all the "SVG...Element" classes parse themselves + + IDEALLY, we'd like to change that to: + + 1. High level, XML parsing: this file (SVGParser) + 2. Mid level, parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" + 3. Mid level, parsing SVG tags only, but also handling all the different tags: SVGParserSVG + 4. Lowest level, parsing co-ordinate lists, numbers, strings: yacc/lex parser (in an unnamed class that hasn't been written yet) + */ + +#import + +#import "SVGParserExtension.h" /*! RECOMMENDED: leave this set to 1 to get warnings about "legal, but poorly written" SVG */ #define PARSER_WARN_FOR_ANONYMOUS_SVG_G_TAGS 1 @@ -13,27 +32,6 @@ @class SVGDocument; -@protocol SVGParserExtension - -/*! Array of URI's as NSString's, one string for each XMLnamespace that this parser-extension can parse - * - * e.g. the main parser returns "[NSArray arrayWithObjects:@"http://www.w3.org/2000/svg", nil];" - */ --(NSArray*) supportedNamespaces; - -/*! Array of NSString's, one string for each XML tag (within a supported namespace!) that this parser-extension can parse - * - * e.g. the main parser returns "[NSArray arrayWithObjects:@"svg", @"title", @"defs", @"path", @"line", @"circle", ...etc... , nil];" - */ --(NSArray*) supportedTags; - -- (NSObject*)handleStartElement:(NSString *)name document:(SVGDocument*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent inDocument:(SVGDocument*) svgDocument; --(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; --(BOOL) createdItemShouldStoreContent:(NSObject*) item; - -@end - @interface SVGParser : NSObject { @private NSString *_path; @@ -44,7 +42,7 @@ #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR SVGDocument *_document; #else - __weak SVGDocument *_document; + __weak SVGDocument *_document; // TODO: should this still be weak? probably not? #endif NSError* errorForCurrentParse; } @@ -55,8 +53,11 @@ @property(nonatomic, retain) NSMutableArray* parseWarnings; -- (id)initWithPath:(NSString *)aPath document:(SVGDocument *)document; -- (id) initWithURL:(NSURL*)aURL document:(SVGDocument *)document; ++(SVGParser*) parserPlainSVGDocument:(SVGDocument*) document; + +- (id)initWithDocument:(SVGDocument *)doc; + +- (void) addSVGParserExtension:(NSObject*) extension; - (BOOL)parse:(NSError **)outError; diff --git a/Core/SVGParser.m b/Core/SVGParser.m index b14d6e0d4..4e618dcbb 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -11,6 +11,8 @@ #import "SVGDocument.h" +#import "SVGParserSVG.h" + @interface SVGParserStackItem : NSObject @property(nonatomic,retain) NSObject* parserForThisItem; @property(nonatomic,retain) NSObject* item; @@ -46,36 +48,40 @@ @implementation SVGParser static NSString *NSStringFromLibxmlString (const xmlChar *string); static NSMutableDictionary *NSDictionaryFromLibxmlAttributes (const xmlChar **attrs, int attr_ct); ++(SVGParser*) parserPlainSVGDocument:(SVGDocument*) document +{ + SVGParser *parser = [[[SVGParser alloc] initWithDocument:document] autorelease]; + + SVGParserSVG *subParserSVG = [[[SVGParserSVG alloc] init] autorelease]; + + [parser.parserExtensions addObject:subParserSVG]; + + return parser; +} + #define READ_CHUNK_SZ 1024*10 -- (id)initWithPath:(NSString *)aPath document:(SVGDocument *)document { +- (id)initWithDocument:(SVGDocument *)doc { self = [super init]; if (self) { self.parseWarnings = [NSMutableArray array]; self.parserExtensions = [NSMutableArray array]; - _path = [aPath copy]; - self.sourceURL = nil; - _document = document; - _storedChars = [NSMutableString new]; - _elementStack = [NSMutableArray new]; - _failed = NO; - } - return self; -} - -- (id) initWithURL:(NSURL*)aURL document:(SVGDocument *)document { - self = [super init]; - if( self) { - self.parseWarnings = [NSMutableArray array]; - self.parserExtensions = [NSMutableArray array]; - self.sourceURL = aURL; - _document = document; + _document = doc; + if( _document.hasSourceFile ) + { + _path = [doc.filePath copy]; + } + else if( _document.hasSourceURL ) + { + self.sourceURL = doc.URL; + } + _storedChars = [NSMutableString new]; _elementStack = [NSMutableArray new]; _failed = NO; + } - return self; } @@ -87,6 +93,16 @@ - (void)dealloc { [super dealloc]; } +- (void) addSVGParserExtension:(NSObject*) extension +{ + if( self.parserExtensions == nil ) + { + self.parserExtensions = [NSMutableArray new]; + } + + [self.parserExtensions addObject:extension]; +} + - (BOOL)parse:(NSError **)outError { errorForCurrentParse = nil; [self.parseWarnings removeAllObjects]; diff --git a/Core/SVGParserExtension.h b/Core/SVGParserExtension.h new file mode 100644 index 000000000..37f7eda10 --- /dev/null +++ b/Core/SVGParserExtension.h @@ -0,0 +1,38 @@ +/** + SVGParserExtension.h + + A protocol that lets us split "parsing an SVG" into lots of smaller parsing classes + + PARSING + --- + Actual parsing of an SVG is split into three places: + + 1. High level, XML parsing: SVGParser + 2. ALL THE REST, this class: parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" + + */ + +#import + +#import "SVGDocument.h" + +@protocol SVGParserExtension + +/*! Array of URI's as NSString's, one string for each XMLnamespace that this parser-extension can parse + * + * e.g. the main parser returns "[NSArray arrayWithObjects:@"http://www.w3.org/2000/svg", nil];" + */ +-(NSArray*) supportedNamespaces; + +/*! Array of NSString's, one string for each XML tag (within a supported namespace!) that this parser-extension can parse + * + * e.g. the main parser returns "[NSArray arrayWithObjects:@"svg", @"title", @"defs", @"path", @"line", @"circle", ...etc... , nil];" + */ +-(NSArray*) supportedTags; + +- (NSObject*)handleStartElement:(NSString *)name document:(SVGDocument*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent inDocument:(SVGDocument*) svgDocument; +-(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; +-(BOOL) createdItemShouldStoreContent:(NSObject*) item; + +@end diff --git a/Core/SVGParserSVG.m b/Core/SVGParserSVG.m index ce8da3a5c..a4735d52f 100644 --- a/Core/SVGParserSVG.m +++ b/Core/SVGParserSVG.m @@ -1,9 +1,10 @@ #import "SVGParserSVG.h" +#import "SVGSVGElement.h" #import "SVGCircleElement.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" -#import "SVGDocument.h" +//#import "SVGDocument.h" #import "SVGEllipseElement.h" #import "SVGGroupElement.h" #import "SVGImageElement.h" @@ -24,6 +25,7 @@ - (id)init { if (!elementMap) { elementMap = [[NSDictionary dictionaryWithObjectsAndKeys: + [SVGSVGElement class], @"svg", [SVGCircleElement class], @"circle", [SVGDefsElement class], @"defs", [SVGDescriptionElement class], @"description", @@ -55,29 +57,15 @@ -(NSArray*) supportedNamespaces nil]; } +/** "tags supported" is exactly the set of all SVGElement subclasses that already exist */ -(NSArray*) supportedTags { - NSMutableArray* result = [NSMutableArray arrayWithArray:[elementMap allKeys]]; - [result addObject:@"svg"]; - [result addObject:@"defs"]; - [result addObject:@"g"]; - [result addObject:@"path"]; - return result; + return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } - (NSObject*) handleStartElement:(NSString *)name document:(SVGDocument*) svgDocument xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { if( [[self supportedNamespaces] containsObject:prefix] ) { - NSObject* result = nil; - - // handle svg:svg tag separately - if ([name isEqualToString:@"svg"]) { - result = svgDocument; - [svgDocument parseAttributes:attributes]; - - return result; - } - Class elementClass = [elementMap objectForKey:name]; if (!elementClass) { @@ -92,9 +80,19 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGDocument*) svgDoc [attributes addEntriesFromDictionary:[SVGParser NSDictionaryFromCSSAttributes:style]]; } - SVGElement *element = [[elementClass alloc] initWithDocument:svgDocument name:name]; + SVGElement *element = [[elementClass alloc] initWithName:name]; [element parseAttributes:attributes]; + /** special case: */ + if( [@"svg" isEqualToString:name] ) + { + NSString* svgVersion = nil; + if ((svgVersion = [attributes objectForKey:@"version"])) { + svgDocument.svgLanguageVersion = svgVersion; + } + } + + return element; } @@ -126,14 +124,18 @@ -(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent inDocument:(S if ( parent == nil ) // i.e. the root SVG tag { - NSLog(@"[%@] PARSER_INFO: asked to add object to nil parent; i.e. we've hit the root of the tree; setting global variables on the SVG Document now", [self class]); - [svgDocument setGraphicsGroups:_graphicsGroups]; - [svgDocument setAnonymousGraphicsGroups:_anonymousGraphicsGroups]; + NSAssert( [child isKindOfClass:[SVGSVGElement class]], @"Unexpected root element: expected root tag to be an '' tag. Instead found an: %@", childElement.identifier ); + + NSLog(@"[%@] PARSER_INFO: asked to add object to nil parent; i.e. we've hit the root of the tree; setting global variables on the SVG rootElement now", [self class]); + SVGSVGElement *rootSVGElement = (SVGSVGElement*) childElement; + [rootSVGElement setGraphicsGroups:_graphicsGroups]; + [rootSVGElement setAnonymousGraphicsGroups:_anonymousGraphicsGroups]; [_graphicsGroups release]; [_anonymousGraphicsGroups release]; _graphicsGroups = nil; _anonymousGraphicsGroups = nil; + } else { diff --git a/Core/SVGPathElement.m b/Core/SVGPathElement.m index c1f3cb212..a107a57c6 100644 --- a/Core/SVGPathElement.m +++ b/Core/SVGPathElement.m @@ -7,7 +7,6 @@ #import "SVGPathElement.h" -#import "SVGElement+Private.h" #import "SVGUtils.h" #import "SVGPointsAndPathsParser.h" diff --git a/Core/SVGPolygonElement.m b/Core/SVGPolygonElement.m index 24ca6bf40..502ea512d 100644 --- a/Core/SVGPolygonElement.m +++ b/Core/SVGPolygonElement.m @@ -7,8 +7,6 @@ #import "SVGPolygonElement.h" -#import "SVGElement+Private.h" - #import "SVGPointsAndPathsParser.h" @interface SVGPolygonElement() diff --git a/Core/SVGPolylineElement.m b/Core/SVGPolylineElement.m index 81fef4517..993cd2cec 100644 --- a/Core/SVGPolylineElement.m +++ b/Core/SVGPolylineElement.m @@ -7,7 +7,6 @@ #import "SVGPolylineElement.h" -#import "SVGElement+Private.h" #import "SVGUtils.h" @implementation SVGPolylineElement diff --git a/Core/SVGRectElement.m b/Core/SVGRectElement.m index 99334fcad..e3ed6a334 100644 --- a/Core/SVGRectElement.m +++ b/Core/SVGRectElement.m @@ -7,7 +7,6 @@ #import "SVGRectElement.h" -#import "SVGElement+Private.h" @interface SVGRectElement () diff --git a/Core/SVGSVGElement.h b/Core/SVGSVGElement.h new file mode 100644 index 000000000..de3931e35 --- /dev/null +++ b/Core/SVGSVGElement.h @@ -0,0 +1,40 @@ +/** + SVGSVGElement.m + + Represents the "" tag in an SVG document + + Data: + - documentWidth: the attribute + - documentHeight: the attribute + - viewBoxFrame: ??? + ...data that might be deprecated / removed in future versions of SVGKit: + - graphicsGroups: the collection of all tags in the doc that have "id" attributes + - anonymousGraphicsGroups: the collection of all tags in the doc that DO NOT have "id" attributes + */ + +#import "SVGElement.h" + +#import "SVGBasicDataTypes.h" + +@interface SVGSVGElement : SVGElement < SVGLayeredElement > + +@property (nonatomic, readonly) SVGLength documentWidth; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? +@property (nonatomic, readonly) SVGLength documentHeight; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? +@property (nonatomic, readonly) CGRect viewBoxFrame; // FIXME: maybe can be merged with SVGElement ? + +/*! from the SVG spec, each "g" tag in the XML is a separate "group of graphics things", + * this dictionary contains a mapping from "value of id attribute" to "SVGGroupElement" + * + * see also: anonymousGraphicsGroups (for groups that have no "id=" attribute) + */ +@property (nonatomic, retain) NSDictionary *graphicsGroups; +/*! from the SVG spec, each "g" tag in the XML is a separate "group of graphics things", + * this array contains all the groups that had no "id=" attribute + * + * see also: graphicsGroups (for groups that have an "id=" attribute) + */ +@property (nonatomic, retain) NSArray *anonymousGraphicsGroups; + +- (SVGElement *)findFirstElementOfClass:(Class)class; + +@end diff --git a/Core/SVGSVGElement.m b/Core/SVGSVGElement.m new file mode 100644 index 000000000..53a6c4d5f --- /dev/null +++ b/Core/SVGSVGElement.m @@ -0,0 +1,95 @@ +#import "SVGSVGElement.h" + +#import "CALayerWithChildHitTest.h" + +@implementation SVGSVGElement + +@synthesize documentWidth; +@synthesize documentHeight; +@synthesize viewBoxFrame = _viewBoxFrame; + +@synthesize graphicsGroups, anonymousGraphicsGroups; + +-(void)dealloc +{ + self.graphicsGroups = nil; + self.anonymousGraphicsGroups = nil; + [super dealloc]; +} + +- (void)parseAttributes:(NSDictionary *)attributes { + [super parseAttributes:attributes]; + + id value = nil; + + if ((value = [attributes objectForKey:@"width"])) { + documentWidth = SVGLengthFromNSString( value ); + } + + if ((value = [attributes objectForKey:@"height"])) { + documentHeight = SVGLengthFromNSString( value ); + } + + if( (value = [attributes objectForKey:@"viewBox"])) { + NSArray* boxElements = [(NSString*) value componentsSeparatedByString:@" "]; + + _viewBoxFrame = CGRectMake([[boxElements objectAtIndex:0] floatValue], [[boxElements objectAtIndex:1] floatValue], [[boxElements objectAtIndex:2] floatValue], [[boxElements objectAtIndex:3] floatValue]); + NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromCGRect(self.viewBoxFrame)); + } +} + +- (SVGElement *)findFirstElementOfClass:(Class)class { + for (SVGElement *element in self.children) { + if ([element isKindOfClass:class]) + return element; + } + + return nil; +} + +- (CALayer *)newLayer +{ + + CALayer* _layer = [CALayerWithChildHitTest layer]; + + _layer.name = self.identifier; + [_layer setValue:self.identifier forKey:kSVGElementIdentifier]; + + if ([_layer respondsToSelector:@selector(setShouldRasterize:)]) { + [_layer performSelector:@selector(setShouldRasterize:) + withObject:[NSNumber numberWithBool:YES]]; + } + + return _layer; +} + +- (void)layoutLayer:(CALayer *)layer { + NSArray *sublayers = [layer sublayers]; + CGRect mainRect = CGRectZero; + + for (NSUInteger n = 0; n < [sublayers count]; n++) { + CALayer *currentLayer = [sublayers objectAtIndex:n]; + + if (n == 0) { + mainRect = currentLayer.frame; + } + else { + mainRect = CGRectUnion(mainRect, currentLayer.frame); + } + } + + mainRect = CGRectIntegral(mainRect); // round values to integers + + layer.frame = mainRect; + + for (CALayer *currentLayer in sublayers) { + CGRect frame = currentLayer.frame; + frame.origin.x -= mainRect.origin.x; + frame.origin.y -= mainRect.origin.y; + + currentLayer.frame = CGRectIntegral(frame); + } +} + + +@end diff --git a/Core/SVGShapeElement.m b/Core/SVGShapeElement.m index e5ce9961e..3f30d645d 100644 --- a/Core/SVGShapeElement.m +++ b/Core/SVGShapeElement.m @@ -9,8 +9,6 @@ #import "CGPathAdditions.h" #import "SVGDefsElement.h" -#import "SVGDocument.h" -#import "SVGElement+Private.h" #import "SVGPattern.h" #import "CAShapeLayerWithHitTest.h" diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index dba1dcb54..e7da546d4 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3BF5039E148C5FBC00CC7D17 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF5039D148C5FBC00CC7D17 /* libxml2.dylib */; }; 3BF503A0148C5FC600CC7D17 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF5039F148C5FC600CC7D17 /* UIKit.framework */; }; 3BF503A2148C5FCE00CC7D17 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF503A1148C5FCE00CC7D17 /* CoreGraphics.framework */; }; 3BF503A4148C5FD400CC7D17 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF503A3148C5FD400CC7D17 /* QuartzCore.framework */; }; @@ -15,115 +14,124 @@ 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6604FCF714A0CDA800B4D2D9 /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6604FCF314A0CDA800B4D2D9 /* SVGPointsAndPathsParser.m */; }; - 6604FCF814A0CDA800B4D2D9 /* SVGPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6604FCF414A0CDA800B4D2D9 /* SVGPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6604FCF914A0CDA800B4D2D9 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6604FCF514A0CDA800B4D2D9 /* SVGTextElement.m */; }; - 6604FCFA14A0CDA800B4D2D9 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6604FCF614A0CDA800B4D2D9 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6604FCFC14A0CDAE00B4D2D9 /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6604FCF314A0CDA800B4D2D9 /* SVGPointsAndPathsParser.m */; }; - 6604FCFD14A0CDAE00B4D2D9 /* SVGPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6604FCF414A0CDA800B4D2D9 /* SVGPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6604FCFE14A0CDAE00B4D2D9 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6604FCF514A0CDA800B4D2D9 /* SVGTextElement.m */; }; - 6604FCFF14A0CDAE00B4D2D9 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6604FCF614A0CDA800B4D2D9 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213433148AF2CF006881E1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66226B53148AEAB100EF4A6D /* Foundation.framework */; }; - 662134C3148AF4F7006881E1 /* SVGPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213496148AF4F7006881E1 /* SVGPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134C4148AF4F7006881E1 /* SVGPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213496148AF4F7006881E1 /* SVGPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134C5148AF4F7006881E1 /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213497148AF4F7006881E1 /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134C6148AF4F7006881E1 /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213497148AF4F7006881E1 /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134C7148AF4F7006881E1 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213498148AF4F7006881E1 /* SVGImageElement.m */; }; - 662134C8148AF4F7006881E1 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213498148AF4F7006881E1 /* SVGImageElement.m */; }; - 662134C9148AF4F7006881E1 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213499148AF4F7006881E1 /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134CA148AF4F7006881E1 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213499148AF4F7006881E1 /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134CB148AF4F7006881E1 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621349A148AF4F7006881E1 /* SVGUtils.m */; }; - 662134CC148AF4F7006881E1 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621349A148AF4F7006881E1 /* SVGUtils.m */; }; - 662134CD148AF4F7006881E1 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621349B148AF4F7006881E1 /* SVGTitleElement.m */; }; - 662134CE148AF4F7006881E1 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621349B148AF4F7006881E1 /* SVGTitleElement.m */; }; - 662134CF148AF4F7006881E1 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621349C148AF4F7006881E1 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134D0148AF4F7006881E1 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621349C148AF4F7006881E1 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134D1148AF4F7006881E1 /* SVGShapeElement+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621349D148AF4F7006881E1 /* SVGShapeElement+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134D2148AF4F7006881E1 /* SVGShapeElement+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621349D148AF4F7006881E1 /* SVGShapeElement+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134D3148AF4F7006881E1 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621349E148AF4F7006881E1 /* SVGShapeElement.m */; }; - 662134D4148AF4F7006881E1 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621349E148AF4F7006881E1 /* SVGShapeElement.m */; }; - 662134D5148AF4F7006881E1 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621349F148AF4F7006881E1 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134D6148AF4F7006881E1 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621349F148AF4F7006881E1 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134D7148AF4F7006881E1 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A0148AF4F7006881E1 /* SVGRectElement.m */; }; - 662134D8148AF4F7006881E1 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A0148AF4F7006881E1 /* SVGRectElement.m */; }; - 662134D9148AF4F7006881E1 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A1148AF4F7006881E1 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134DA148AF4F7006881E1 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A1148AF4F7006881E1 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134DB148AF4F7006881E1 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A2148AF4F7006881E1 /* SVGPolylineElement.m */; }; - 662134DC148AF4F7006881E1 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A2148AF4F7006881E1 /* SVGPolylineElement.m */; }; - 662134DD148AF4F7006881E1 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A3148AF4F7006881E1 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134DE148AF4F7006881E1 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A3148AF4F7006881E1 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134DF148AF4F7006881E1 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A4148AF4F7006881E1 /* SVGPolygonElement.m */; }; - 662134E0148AF4F7006881E1 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A4148AF4F7006881E1 /* SVGPolygonElement.m */; }; - 662134E1148AF4F7006881E1 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A5148AF4F7006881E1 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134E2148AF4F7006881E1 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A5148AF4F7006881E1 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134E3148AF4F7006881E1 /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A6148AF4F7006881E1 /* SVGPattern.m */; }; - 662134E4148AF4F7006881E1 /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A6148AF4F7006881E1 /* SVGPattern.m */; }; - 662134E5148AF4F7006881E1 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A7148AF4F7006881E1 /* SVGPathElement.m */; }; - 662134E6148AF4F7006881E1 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A7148AF4F7006881E1 /* SVGPathElement.m */; }; - 662134E7148AF4F7006881E1 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A8148AF4F7006881E1 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134E8148AF4F7006881E1 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134A8148AF4F7006881E1 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134E9148AF4F7006881E1 /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A9148AF4F7006881E1 /* SVGParserSVG.m */; }; - 662134EA148AF4F7006881E1 /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134A9148AF4F7006881E1 /* SVGParserSVG.m */; }; - 662134EB148AF4F7006881E1 /* SVGParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AA148AF4F7006881E1 /* SVGParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134EC148AF4F7006881E1 /* SVGParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AA148AF4F7006881E1 /* SVGParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134ED148AF4F7006881E1 /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134AB148AF4F7006881E1 /* SVGParser.m */; }; - 662134EE148AF4F7006881E1 /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134AB148AF4F7006881E1 /* SVGParser.m */; }; - 662134EF148AF4F7006881E1 /* SVGParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AC148AF4F7006881E1 /* SVGParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F0148AF4F7006881E1 /* SVGParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AC148AF4F7006881E1 /* SVGParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F1148AF4F7006881E1 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134AD148AF4F7006881E1 /* SVGLineElement.m */; }; - 662134F2148AF4F7006881E1 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134AD148AF4F7006881E1 /* SVGLineElement.m */; }; - 662134F3148AF4F7006881E1 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AE148AF4F7006881E1 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F4148AF4F7006881E1 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AE148AF4F7006881E1 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F5148AF4F7006881E1 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AF148AF4F7006881E1 /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F6148AF4F7006881E1 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134AF148AF4F7006881E1 /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F7148AF4F7006881E1 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B0148AF4F7006881E1 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F8148AF4F7006881E1 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B0148AF4F7006881E1 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134F9148AF4F7006881E1 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B1148AF4F7006881E1 /* SVGGroupElement.m */; }; - 662134FA148AF4F7006881E1 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B1148AF4F7006881E1 /* SVGGroupElement.m */; }; - 662134FB148AF4F7006881E1 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B2148AF4F7006881E1 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134FC148AF4F7006881E1 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B2148AF4F7006881E1 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 662134FD148AF4F7006881E1 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B3148AF4F7006881E1 /* SVGEllipseElement.m */; }; - 662134FE148AF4F7006881E1 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B3148AF4F7006881E1 /* SVGEllipseElement.m */; }; - 662134FF148AF4F7006881E1 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B4148AF4F7006881E1 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213500148AF4F7006881E1 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B4148AF4F7006881E1 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213501148AF4F7006881E1 /* SVGElement+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B5148AF4F7006881E1 /* SVGElement+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213502148AF4F7006881E1 /* SVGElement+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B5148AF4F7006881E1 /* SVGElement+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213503148AF4F7006881E1 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B6148AF4F7006881E1 /* SVGElement.m */; }; - 66213504148AF4F7006881E1 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B6148AF4F7006881E1 /* SVGElement.m */; }; - 66213505148AF4F7006881E1 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B7148AF4F7006881E1 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213506148AF4F7006881E1 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B7148AF4F7006881E1 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213507148AF4F7006881E1 /* SVGDocument+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B8148AF4F7006881E1 /* SVGDocument+CA.m */; }; - 66213508148AF4F7006881E1 /* SVGDocument+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134B8148AF4F7006881E1 /* SVGDocument+CA.m */; }; - 66213509148AF4F7006881E1 /* SVGDocument+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B9148AF4F7006881E1 /* SVGDocument+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6621350A148AF4F7006881E1 /* SVGDocument+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134B9148AF4F7006881E1 /* SVGDocument+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6621350B148AF4F7006881E1 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134BA148AF4F7006881E1 /* SVGDocument.m */; }; - 6621350C148AF4F7006881E1 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134BA148AF4F7006881E1 /* SVGDocument.m */; }; - 6621350D148AF4F7006881E1 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134BB148AF4F7006881E1 /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6621350E148AF4F7006881E1 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134BB148AF4F7006881E1 /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6621350F148AF4F7006881E1 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134BC148AF4F7006881E1 /* SVGDescriptionElement.m */; }; - 66213510148AF4F7006881E1 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134BC148AF4F7006881E1 /* SVGDescriptionElement.m */; }; - 66213511148AF4F7006881E1 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134BD148AF4F7006881E1 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213512148AF4F7006881E1 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134BD148AF4F7006881E1 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213513148AF4F7006881E1 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134BE148AF4F7006881E1 /* SVGDefsElement.m */; }; - 66213514148AF4F7006881E1 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134BE148AF4F7006881E1 /* SVGDefsElement.m */; }; - 66213515148AF4F7006881E1 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134BF148AF4F7006881E1 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213516148AF4F7006881E1 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134BF148AF4F7006881E1 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213517148AF4F7006881E1 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134C0148AF4F7006881E1 /* SVGCircleElement.m */; }; - 66213518148AF4F7006881E1 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134C0148AF4F7006881E1 /* SVGCircleElement.m */; }; - 66213519148AF4F7006881E1 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134C1148AF4F7006881E1 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6621351A148AF4F7006881E1 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 662134C1148AF4F7006881E1 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6621351B148AF4F7006881E1 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134C2148AF4F7006881E1 /* CGPathAdditions.m */; }; - 6621351C148AF4F7006881E1 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 662134C2148AF4F7006881E1 /* CGPathAdditions.m */; }; 66213550148AF80B006881E1 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; 66213552148AF80B006881E1 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; - 66213554148AF80B006881E1 /* SVGDocumentView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354A148AF80A006881E1 /* SVGDocumentView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213555148AF80B006881E1 /* SVGDocumentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354B148AF80A006881E1 /* SVGDocumentView.m */; }; 66213556148AF80B006881E1 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; 66213558148AF80B006881E1 /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354E148AF80A006881E1 /* SVGView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213559148AF80B006881E1 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354F148AF80A006881E1 /* SVGView.m */; }; + 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; }; + 66B79B0A15475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; }; + 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; + 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; + 66B79B0D15475254002F99FF /* SVGBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */; }; + 66B79B0E15475254002F99FF /* SVGBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */; }; + 66B79B0F15475254002F99FF /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */; }; + 66B79B1015475254002F99FF /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */; }; + 66B79B1115475254002F99FF /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD715475254002F99FF /* SVGCircleElement.h */; }; + 66B79B1215475254002F99FF /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD715475254002F99FF /* SVGCircleElement.h */; }; + 66B79B1315475254002F99FF /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD815475254002F99FF /* SVGCircleElement.m */; }; + 66B79B1415475254002F99FF /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD815475254002F99FF /* SVGCircleElement.m */; }; + 66B79B1515475254002F99FF /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD915475254002F99FF /* SVGDefsElement.h */; }; + 66B79B1615475254002F99FF /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD915475254002F99FF /* SVGDefsElement.h */; }; + 66B79B1715475254002F99FF /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADA15475254002F99FF /* SVGDefsElement.m */; }; + 66B79B1815475254002F99FF /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADA15475254002F99FF /* SVGDefsElement.m */; }; + 66B79B1915475254002F99FF /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */; }; + 66B79B1A15475254002F99FF /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */; }; + 66B79B1B15475254002F99FF /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */; }; + 66B79B1C15475254002F99FF /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */; }; + 66B79B1D15475254002F99FF /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGDocument.h */; }; + 66B79B1E15475254002F99FF /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGDocument.h */; }; + 66B79B1F15475254002F99FF /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGDocument.m */; }; + 66B79B2015475254002F99FF /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGDocument.m */; }; + 66B79B2115475254002F99FF /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADF15475254002F99FF /* SVGElement.h */; }; + 66B79B2215475254002F99FF /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADF15475254002F99FF /* SVGElement.h */; }; + 66B79B2315475254002F99FF /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE015475254002F99FF /* SVGElement.m */; }; + 66B79B2415475254002F99FF /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE015475254002F99FF /* SVGElement.m */; }; + 66B79B2515475254002F99FF /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE115475254002F99FF /* SVGEllipseElement.h */; }; + 66B79B2615475254002F99FF /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE115475254002F99FF /* SVGEllipseElement.h */; }; + 66B79B2715475254002F99FF /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE215475254002F99FF /* SVGEllipseElement.m */; }; + 66B79B2815475254002F99FF /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE215475254002F99FF /* SVGEllipseElement.m */; }; + 66B79B2915475254002F99FF /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE315475254002F99FF /* SVGGroupElement.h */; }; + 66B79B2A15475254002F99FF /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE315475254002F99FF /* SVGGroupElement.h */; }; + 66B79B2B15475254002F99FF /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE415475254002F99FF /* SVGGroupElement.m */; }; + 66B79B2C15475254002F99FF /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE415475254002F99FF /* SVGGroupElement.m */; }; + 66B79B2D15475254002F99FF /* SVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGImage.h */; }; + 66B79B2E15475254002F99FF /* SVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGImage.h */; }; + 66B79B2F15475254002F99FF /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGImage.m */; }; + 66B79B3015475254002F99FF /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGImage.m */; }; + 66B79B3115475254002F99FF /* SVGImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGImage+CA.h */; }; + 66B79B3215475254002F99FF /* SVGImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGImage+CA.h */; }; + 66B79B3315475254002F99FF /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGImage+CA.m */; }; + 66B79B3415475254002F99FF /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGImage+CA.m */; }; + 66B79B3515475254002F99FF /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE915475254002F99FF /* SVGImageElement.h */; }; + 66B79B3615475254002F99FF /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE915475254002F99FF /* SVGImageElement.h */; }; + 66B79B3715475254002F99FF /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEA15475254002F99FF /* SVGImageElement.m */; }; + 66B79B3815475254002F99FF /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEA15475254002F99FF /* SVGImageElement.m */; }; + 66B79B3915475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; }; + 66B79B3A15475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; }; + 66B79B3B15475254002F99FF /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEC15475254002F99FF /* SVGLineElement.h */; }; + 66B79B3C15475254002F99FF /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEC15475254002F99FF /* SVGLineElement.h */; }; + 66B79B3D15475254002F99FF /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AED15475254002F99FF /* SVGLineElement.m */; }; + 66B79B3E15475254002F99FF /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AED15475254002F99FF /* SVGLineElement.m */; }; + 66B79B3F15475254002F99FF /* SVGParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGParser.h */; }; + 66B79B4015475254002F99FF /* SVGParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGParser.h */; }; + 66B79B4115475254002F99FF /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGParser.m */; }; + 66B79B4215475254002F99FF /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGParser.m */; }; + 66B79B4315475254002F99FF /* SVGParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF015475254002F99FF /* SVGParserExtension.h */; }; + 66B79B4415475254002F99FF /* SVGParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF015475254002F99FF /* SVGParserExtension.h */; }; + 66B79B4515475254002F99FF /* SVGParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF115475254002F99FF /* SVGParserSVG.h */; }; + 66B79B4615475254002F99FF /* SVGParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF115475254002F99FF /* SVGParserSVG.h */; }; + 66B79B4715475254002F99FF /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF215475254002F99FF /* SVGParserSVG.m */; }; + 66B79B4815475254002F99FF /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF215475254002F99FF /* SVGParserSVG.m */; }; + 66B79B4915475254002F99FF /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF315475254002F99FF /* SVGPathElement.h */; }; + 66B79B4A15475254002F99FF /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF315475254002F99FF /* SVGPathElement.h */; }; + 66B79B4B15475254002F99FF /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF415475254002F99FF /* SVGPathElement.m */; }; + 66B79B4C15475254002F99FF /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF415475254002F99FF /* SVGPathElement.m */; }; + 66B79B4D15475254002F99FF /* SVGPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGPattern.h */; }; + 66B79B4E15475254002F99FF /* SVGPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGPattern.h */; }; + 66B79B4F15475254002F99FF /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGPattern.m */; }; + 66B79B5015475254002F99FF /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGPattern.m */; }; + 66B79B5115475254002F99FF /* SVGPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */; }; + 66B79B5215475254002F99FF /* SVGPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */; }; + 66B79B5315475254002F99FF /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */; }; + 66B79B5415475254002F99FF /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */; }; + 66B79B5515475254002F99FF /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF915475254002F99FF /* SVGPolygonElement.h */; }; + 66B79B5615475254002F99FF /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF915475254002F99FF /* SVGPolygonElement.h */; }; + 66B79B5715475254002F99FF /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFA15475254002F99FF /* SVGPolygonElement.m */; }; + 66B79B5815475254002F99FF /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFA15475254002F99FF /* SVGPolygonElement.m */; }; + 66B79B5915475254002F99FF /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFB15475254002F99FF /* SVGPolylineElement.h */; }; + 66B79B5A15475254002F99FF /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFB15475254002F99FF /* SVGPolylineElement.h */; }; + 66B79B5B15475254002F99FF /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFC15475254002F99FF /* SVGPolylineElement.m */; }; + 66B79B5C15475254002F99FF /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFC15475254002F99FF /* SVGPolylineElement.m */; }; + 66B79B5D15475254002F99FF /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFD15475254002F99FF /* SVGRectElement.h */; }; + 66B79B5E15475254002F99FF /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFD15475254002F99FF /* SVGRectElement.h */; }; + 66B79B5F15475254002F99FF /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFE15475254002F99FF /* SVGRectElement.m */; }; + 66B79B6015475254002F99FF /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFE15475254002F99FF /* SVGRectElement.m */; }; + 66B79B6115475254002F99FF /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFF15475254002F99FF /* SVGShapeElement.h */; }; + 66B79B6215475254002F99FF /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFF15475254002F99FF /* SVGShapeElement.h */; }; + 66B79B6315475254002F99FF /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0015475254002F99FF /* SVGShapeElement.m */; }; + 66B79B6415475254002F99FF /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0015475254002F99FF /* SVGShapeElement.m */; }; + 66B79B6515475254002F99FF /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0115475254002F99FF /* SVGSVGElement.h */; }; + 66B79B6615475254002F99FF /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0115475254002F99FF /* SVGSVGElement.h */; }; + 66B79B6715475254002F99FF /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0215475254002F99FF /* SVGSVGElement.m */; }; + 66B79B6815475254002F99FF /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0215475254002F99FF /* SVGSVGElement.m */; }; + 66B79B6915475254002F99FF /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0315475254002F99FF /* SVGTextElement.h */; }; + 66B79B6A15475254002F99FF /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0315475254002F99FF /* SVGTextElement.h */; }; + 66B79B6B15475254002F99FF /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0415475254002F99FF /* SVGTextElement.m */; }; + 66B79B6C15475254002F99FF /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0415475254002F99FF /* SVGTextElement.m */; }; + 66B79B6D15475254002F99FF /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0515475254002F99FF /* SVGTitleElement.h */; }; + 66B79B6E15475254002F99FF /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0515475254002F99FF /* SVGTitleElement.h */; }; + 66B79B6F15475254002F99FF /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0615475254002F99FF /* SVGTitleElement.m */; }; + 66B79B7015475254002F99FF /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0615475254002F99FF /* SVGTitleElement.m */; }; + 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; }; + 66B79B7215475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; }; + 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; + 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; + 66B79B76154752EB002F99FF /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 66B79B75154752EB002F99FF /* libxml2.dylib */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; C9379C5A12777AEC00B0589E /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = C9379C5812777AEC00B0589E /* SVGView.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -136,72 +144,75 @@ 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 32DBCF5E0370ADEE00C91783 /* SVGKit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit_Prefix.pch; sourceTree = ""; }; - 3BF5039D148C5FBC00CC7D17 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/libxml2.dylib; sourceTree = DEVELOPER_DIR; }; 3BF5039F148C5FC600CC7D17 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 3BF503A1148C5FCE00CC7D17 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; 3BF503A3148C5FD400CC7D17 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; - 6604FCF314A0CDA800B4D2D9 /* SVGPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPointsAndPathsParser.m; sourceTree = ""; }; - 6604FCF414A0CDA800B4D2D9 /* SVGPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPointsAndPathsParser.h; sourceTree = ""; }; - 6604FCF514A0CDA800B4D2D9 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 6604FCF614A0CDA800B4D2D9 /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; 66213432148AF2CF006881E1 /* libSVGKitLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSVGKitLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; }; 66213436148AF2CF006881E1 /* SVGKitLibrary-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SVGKitLibrary-Prefix.pch"; sourceTree = ""; }; - 66213496148AF4F7006881E1 /* SVGPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPattern.h; sourceTree = ""; }; - 66213497148AF4F7006881E1 /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; - 66213498148AF4F7006881E1 /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; - 66213499148AF4F7006881E1 /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; - 6621349A148AF4F7006881E1 /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 6621349B148AF4F7006881E1 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 6621349C148AF4F7006881E1 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 6621349D148AF4F7006881E1 /* SVGShapeElement+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGShapeElement+Private.h"; sourceTree = ""; }; - 6621349E148AF4F7006881E1 /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 6621349F148AF4F7006881E1 /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 662134A0148AF4F7006881E1 /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 662134A1148AF4F7006881E1 /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 662134A2148AF4F7006881E1 /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 662134A3148AF4F7006881E1 /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 662134A4148AF4F7006881E1 /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 662134A5148AF4F7006881E1 /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 662134A6148AF4F7006881E1 /* SVGPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPattern.m; sourceTree = ""; }; - 662134A7148AF4F7006881E1 /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 662134A8148AF4F7006881E1 /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 662134A9148AF4F7006881E1 /* SVGParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParserSVG.m; sourceTree = ""; }; - 662134AA148AF4F7006881E1 /* SVGParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserSVG.h; sourceTree = ""; }; - 662134AB148AF4F7006881E1 /* SVGParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParser.m; sourceTree = ""; }; - 662134AC148AF4F7006881E1 /* SVGParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParser.h; sourceTree = ""; }; - 662134AD148AF4F7006881E1 /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 662134AE148AF4F7006881E1 /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 662134AF148AF4F7006881E1 /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 662134B0148AF4F7006881E1 /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 662134B1148AF4F7006881E1 /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 662134B2148AF4F7006881E1 /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 662134B3148AF4F7006881E1 /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 662134B4148AF4F7006881E1 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 662134B5148AF4F7006881E1 /* SVGElement+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGElement+Private.h"; sourceTree = ""; }; - 662134B6148AF4F7006881E1 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; - 662134B7148AF4F7006881E1 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 662134B8148AF4F7006881E1 /* SVGDocument+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGDocument+CA.m"; sourceTree = ""; }; - 662134B9148AF4F7006881E1 /* SVGDocument+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGDocument+CA.h"; sourceTree = ""; }; - 662134BA148AF4F7006881E1 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; - 662134BB148AF4F7006881E1 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 662134BC148AF4F7006881E1 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 662134BD148AF4F7006881E1 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 662134BE148AF4F7006881E1 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 662134BF148AF4F7006881E1 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 662134C0148AF4F7006881E1 /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 662134C1148AF4F7006881E1 /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 662134C2148AF4F7006881E1 /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CALayerWithChildHitTest.h; path = ../iOS/CALayerWithChildHitTest.h; sourceTree = ""; }; - 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CALayerWithChildHitTest.m; path = ../iOS/CALayerWithChildHitTest.m; sourceTree = ""; }; - 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CAShapeLayerWithHitTest.h; path = ../iOS/CAShapeLayerWithHitTest.h; sourceTree = ""; }; - 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CAShapeLayerWithHitTest.m; path = ../iOS/CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 6621354A148AF80A006881E1 /* SVGDocumentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocumentView.h; sourceTree = ""; }; - 6621354B148AF80A006881E1 /* SVGDocumentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocumentView.m; sourceTree = ""; }; + 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; + 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; + 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; + 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; 6621354C148AF80A006881E1 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; 6621354D148AF80A006881E1 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; 6621354E148AF80A006881E1 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; 6621354F148AF80A006881E1 /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; 66226B53148AEAB100EF4A6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 66B79AD315475254002F99FF /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; + 66B79AD415475254002F99FF /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; + 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; + 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGBasicDataTypes.m; sourceTree = ""; }; + 66B79AD715475254002F99FF /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; + 66B79AD815475254002F99FF /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; + 66B79AD915475254002F99FF /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 66B79ADA15475254002F99FF /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; + 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; + 66B79ADD15475254002F99FF /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; + 66B79ADE15475254002F99FF /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 66B79ADF15475254002F99FF /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; + 66B79AE015475254002F99FF /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 66B79AE115475254002F99FF /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; + 66B79AE215475254002F99FF /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; + 66B79AE315475254002F99FF /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; + 66B79AE415475254002F99FF /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; + 66B79AE515475254002F99FF /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = ""; }; + 66B79AE615475254002F99FF /* SVGImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImage.m; sourceTree = ""; }; + 66B79AE715475254002F99FF /* SVGImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGImage+CA.h"; sourceTree = ""; }; + 66B79AE815475254002F99FF /* SVGImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGImage+CA.m"; sourceTree = ""; }; + 66B79AE915475254002F99FF /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; + 66B79AEA15475254002F99FF /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 66B79AEB15475254002F99FF /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; + 66B79AEC15475254002F99FF /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; + 66B79AED15475254002F99FF /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; + 66B79AEE15475254002F99FF /* SVGParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParser.h; sourceTree = ""; }; + 66B79AEF15475254002F99FF /* SVGParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParser.m; sourceTree = ""; }; + 66B79AF015475254002F99FF /* SVGParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserExtension.h; sourceTree = ""; }; + 66B79AF115475254002F99FF /* SVGParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserSVG.h; sourceTree = ""; }; + 66B79AF215475254002F99FF /* SVGParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParserSVG.m; sourceTree = ""; }; + 66B79AF315475254002F99FF /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; + 66B79AF415475254002F99FF /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; + 66B79AF515475254002F99FF /* SVGPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPattern.h; sourceTree = ""; }; + 66B79AF615475254002F99FF /* SVGPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPattern.m; sourceTree = ""; }; + 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPointsAndPathsParser.h; sourceTree = ""; }; + 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPointsAndPathsParser.m; sourceTree = ""; }; + 66B79AF915475254002F99FF /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; + 66B79AFA15475254002F99FF /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; + 66B79AFB15475254002F99FF /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; + 66B79AFC15475254002F99FF /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; + 66B79AFD15475254002F99FF /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; + 66B79AFE15475254002F99FF /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; + 66B79AFF15475254002F99FF /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; + 66B79B0015475254002F99FF /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; + 66B79B0115475254002F99FF /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 66B79B0215475254002F99FF /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 66B79B0315475254002F99FF /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; + 66B79B0415475254002F99FF /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; + 66B79B0515475254002F99FF /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; + 66B79B0615475254002F99FF /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; + 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; + 66B79B75154752EB002F99FF /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libxml2.dylib; sourceTree = DEVELOPER_DIR; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9379C5812777AEC00B0589E /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; @@ -216,10 +227,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 66B79B76154752EB002F99FF /* libxml2.dylib in Frameworks */, 3BF503A4148C5FD400CC7D17 /* QuartzCore.framework in Frameworks */, 3BF503A2148C5FCE00CC7D17 /* CoreGraphics.framework in Frameworks */, 3BF503A0148C5FC600CC7D17 /* UIKit.framework in Frameworks */, - 3BF5039E148C5FBC00CC7D17 /* libxml2.dylib in Frameworks */, 66213433148AF2CF006881E1 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -249,6 +260,7 @@ 0867D691FE84028FC02AAC07 /* SVGKit */ = { isa = PBXGroup; children = ( + 66B79B75154752EB002F99FF /* libxml2.dylib */, C952623F12711D8600434805 /* Framework */, 66213434148AF2CF006881E1 /* SVGKitLibrary */, ); @@ -320,8 +332,10 @@ 66213545148AF80A006881E1 /* iOS */ = { isa = PBXGroup; children = ( - 6621354A148AF80A006881E1 /* SVGDocumentView.h */, - 6621354B148AF80A006881E1 /* SVGDocumentView.m */, + 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */, + 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */, + 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */, + 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */, 6621354C148AF80A006881E1 /* SVGPathView.h */, 6621354D148AF80A006881E1 /* SVGPathView.m */, 6621354E148AF80A006881E1 /* SVGView.h */, @@ -334,7 +348,6 @@ 66226B52148AEAB100EF4A6D /* Linked Frameworks */ = { isa = PBXGroup; children = ( - 3BF5039D148C5FBC00CC7D17 /* libxml2.dylib */, 3BF503A3148C5FD400CC7D17 /* QuartzCore.framework */, 3BF503A1148C5FCE00CC7D17 /* CoreGraphics.framework */, 3BF5039F148C5FC600CC7D17 /* UIKit.framework */, @@ -361,59 +374,60 @@ C952631B1271225F00434805 /* Core */ = { isa = PBXGroup; children = ( - 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */, - 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */, - 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */, - 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */, - 6604FCF314A0CDA800B4D2D9 /* SVGPointsAndPathsParser.m */, - 6604FCF414A0CDA800B4D2D9 /* SVGPointsAndPathsParser.h */, - 6604FCF514A0CDA800B4D2D9 /* SVGTextElement.m */, - 6604FCF614A0CDA800B4D2D9 /* SVGTextElement.h */, - 66213496148AF4F7006881E1 /* SVGPattern.h */, - 66213497148AF4F7006881E1 /* SVGUtils.h */, - 66213498148AF4F7006881E1 /* SVGImageElement.m */, - 66213499148AF4F7006881E1 /* CGPathAdditions.h */, - 6621349A148AF4F7006881E1 /* SVGUtils.m */, - 6621349B148AF4F7006881E1 /* SVGTitleElement.m */, - 6621349C148AF4F7006881E1 /* SVGTitleElement.h */, - 6621349D148AF4F7006881E1 /* SVGShapeElement+Private.h */, - 6621349E148AF4F7006881E1 /* SVGShapeElement.m */, - 6621349F148AF4F7006881E1 /* SVGShapeElement.h */, - 662134A0148AF4F7006881E1 /* SVGRectElement.m */, - 662134A1148AF4F7006881E1 /* SVGRectElement.h */, - 662134A2148AF4F7006881E1 /* SVGPolylineElement.m */, - 662134A3148AF4F7006881E1 /* SVGPolylineElement.h */, - 662134A4148AF4F7006881E1 /* SVGPolygonElement.m */, - 662134A5148AF4F7006881E1 /* SVGPolygonElement.h */, - 662134A6148AF4F7006881E1 /* SVGPattern.m */, - 662134A7148AF4F7006881E1 /* SVGPathElement.m */, - 662134A8148AF4F7006881E1 /* SVGPathElement.h */, - 662134A9148AF4F7006881E1 /* SVGParserSVG.m */, - 662134AA148AF4F7006881E1 /* SVGParserSVG.h */, - 662134AB148AF4F7006881E1 /* SVGParser.m */, - 662134AC148AF4F7006881E1 /* SVGParser.h */, - 662134AD148AF4F7006881E1 /* SVGLineElement.m */, - 662134AE148AF4F7006881E1 /* SVGLineElement.h */, - 662134AF148AF4F7006881E1 /* SVGKit.h */, - 662134B0148AF4F7006881E1 /* SVGImageElement.h */, - 662134B1148AF4F7006881E1 /* SVGGroupElement.m */, - 662134B2148AF4F7006881E1 /* SVGGroupElement.h */, - 662134B3148AF4F7006881E1 /* SVGEllipseElement.m */, - 662134B4148AF4F7006881E1 /* SVGEllipseElement.h */, - 662134B5148AF4F7006881E1 /* SVGElement+Private.h */, - 662134B6148AF4F7006881E1 /* SVGElement.m */, - 662134B7148AF4F7006881E1 /* SVGElement.h */, - 662134B8148AF4F7006881E1 /* SVGDocument+CA.m */, - 662134B9148AF4F7006881E1 /* SVGDocument+CA.h */, - 662134BA148AF4F7006881E1 /* SVGDocument.m */, - 662134BB148AF4F7006881E1 /* SVGDocument.h */, - 662134BC148AF4F7006881E1 /* SVGDescriptionElement.m */, - 662134BD148AF4F7006881E1 /* SVGDescriptionElement.h */, - 662134BE148AF4F7006881E1 /* SVGDefsElement.m */, - 662134BF148AF4F7006881E1 /* SVGDefsElement.h */, - 662134C0148AF4F7006881E1 /* SVGCircleElement.m */, - 662134C1148AF4F7006881E1 /* SVGCircleElement.h */, - 662134C2148AF4F7006881E1 /* CGPathAdditions.m */, + 66B79AD315475254002F99FF /* CGPathAdditions.h */, + 66B79AD415475254002F99FF /* CGPathAdditions.m */, + 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */, + 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */, + 66B79AD715475254002F99FF /* SVGCircleElement.h */, + 66B79AD815475254002F99FF /* SVGCircleElement.m */, + 66B79AD915475254002F99FF /* SVGDefsElement.h */, + 66B79ADA15475254002F99FF /* SVGDefsElement.m */, + 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */, + 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */, + 66B79ADD15475254002F99FF /* SVGDocument.h */, + 66B79ADE15475254002F99FF /* SVGDocument.m */, + 66B79ADF15475254002F99FF /* SVGElement.h */, + 66B79AE015475254002F99FF /* SVGElement.m */, + 66B79AE115475254002F99FF /* SVGEllipseElement.h */, + 66B79AE215475254002F99FF /* SVGEllipseElement.m */, + 66B79AE315475254002F99FF /* SVGGroupElement.h */, + 66B79AE415475254002F99FF /* SVGGroupElement.m */, + 66B79AE515475254002F99FF /* SVGImage.h */, + 66B79AE615475254002F99FF /* SVGImage.m */, + 66B79AE715475254002F99FF /* SVGImage+CA.h */, + 66B79AE815475254002F99FF /* SVGImage+CA.m */, + 66B79AE915475254002F99FF /* SVGImageElement.h */, + 66B79AEA15475254002F99FF /* SVGImageElement.m */, + 66B79AEB15475254002F99FF /* SVGKit.h */, + 66B79AEC15475254002F99FF /* SVGLineElement.h */, + 66B79AED15475254002F99FF /* SVGLineElement.m */, + 66B79AEE15475254002F99FF /* SVGParser.h */, + 66B79AEF15475254002F99FF /* SVGParser.m */, + 66B79AF015475254002F99FF /* SVGParserExtension.h */, + 66B79AF115475254002F99FF /* SVGParserSVG.h */, + 66B79AF215475254002F99FF /* SVGParserSVG.m */, + 66B79AF315475254002F99FF /* SVGPathElement.h */, + 66B79AF415475254002F99FF /* SVGPathElement.m */, + 66B79AF515475254002F99FF /* SVGPattern.h */, + 66B79AF615475254002F99FF /* SVGPattern.m */, + 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */, + 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */, + 66B79AF915475254002F99FF /* SVGPolygonElement.h */, + 66B79AFA15475254002F99FF /* SVGPolygonElement.m */, + 66B79AFB15475254002F99FF /* SVGPolylineElement.h */, + 66B79AFC15475254002F99FF /* SVGPolylineElement.m */, + 66B79AFD15475254002F99FF /* SVGRectElement.h */, + 66B79AFE15475254002F99FF /* SVGRectElement.m */, + 66B79AFF15475254002F99FF /* SVGShapeElement.h */, + 66B79B0015475254002F99FF /* SVGShapeElement.m */, + 66B79B0115475254002F99FF /* SVGSVGElement.h */, + 66B79B0215475254002F99FF /* SVGSVGElement.m */, + 66B79B0315475254002F99FF /* SVGTextElement.h */, + 66B79B0415475254002F99FF /* SVGTextElement.m */, + 66B79B0515475254002F99FF /* SVGTitleElement.h */, + 66B79B0615475254002F99FF /* SVGTitleElement.m */, + 66B79B0715475254002F99FF /* SVGUtils.h */, + 66B79B0815475254002F99FF /* SVGUtils.m */, ); name = Core; path = ../../Core; @@ -436,37 +450,38 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 662134C4148AF4F7006881E1 /* SVGPattern.h in Headers */, - 662134C6148AF4F7006881E1 /* SVGUtils.h in Headers */, - 662134CA148AF4F7006881E1 /* CGPathAdditions.h in Headers */, - 662134D0148AF4F7006881E1 /* SVGTitleElement.h in Headers */, - 662134D2148AF4F7006881E1 /* SVGShapeElement+Private.h in Headers */, - 662134D6148AF4F7006881E1 /* SVGShapeElement.h in Headers */, - 662134DA148AF4F7006881E1 /* SVGRectElement.h in Headers */, - 662134DE148AF4F7006881E1 /* SVGPolylineElement.h in Headers */, - 662134E2148AF4F7006881E1 /* SVGPolygonElement.h in Headers */, - 662134E8148AF4F7006881E1 /* SVGPathElement.h in Headers */, - 662134EC148AF4F7006881E1 /* SVGParserSVG.h in Headers */, - 662134F0148AF4F7006881E1 /* SVGParser.h in Headers */, - 662134F4148AF4F7006881E1 /* SVGLineElement.h in Headers */, - 662134F6148AF4F7006881E1 /* SVGKit.h in Headers */, - 662134F8148AF4F7006881E1 /* SVGImageElement.h in Headers */, - 662134FC148AF4F7006881E1 /* SVGGroupElement.h in Headers */, - 66213500148AF4F7006881E1 /* SVGEllipseElement.h in Headers */, - 66213502148AF4F7006881E1 /* SVGElement+Private.h in Headers */, - 66213506148AF4F7006881E1 /* SVGElement.h in Headers */, - 6621350A148AF4F7006881E1 /* SVGDocument+CA.h in Headers */, - 6621350E148AF4F7006881E1 /* SVGDocument.h in Headers */, - 66213512148AF4F7006881E1 /* SVGDescriptionElement.h in Headers */, - 66213516148AF4F7006881E1 /* SVGDefsElement.h in Headers */, - 6621351A148AF4F7006881E1 /* SVGCircleElement.h in Headers */, 66213550148AF80B006881E1 /* CALayerWithChildHitTest.h in Headers */, 66213552148AF80B006881E1 /* CAShapeLayerWithHitTest.h in Headers */, - 66213554148AF80B006881E1 /* SVGDocumentView.h in Headers */, 66213556148AF80B006881E1 /* SVGPathView.h in Headers */, 66213558148AF80B006881E1 /* SVGView.h in Headers */, - 6604FCFD14A0CDAE00B4D2D9 /* SVGPointsAndPathsParser.h in Headers */, - 6604FCFF14A0CDAE00B4D2D9 /* SVGTextElement.h in Headers */, + 66B79B0A15475254002F99FF /* CGPathAdditions.h in Headers */, + 66B79B0E15475254002F99FF /* SVGBasicDataTypes.h in Headers */, + 66B79B1215475254002F99FF /* SVGCircleElement.h in Headers */, + 66B79B1615475254002F99FF /* SVGDefsElement.h in Headers */, + 66B79B1A15475254002F99FF /* SVGDescriptionElement.h in Headers */, + 66B79B1E15475254002F99FF /* SVGDocument.h in Headers */, + 66B79B2215475254002F99FF /* SVGElement.h in Headers */, + 66B79B2615475254002F99FF /* SVGEllipseElement.h in Headers */, + 66B79B2A15475254002F99FF /* SVGGroupElement.h in Headers */, + 66B79B2E15475254002F99FF /* SVGImage.h in Headers */, + 66B79B3215475254002F99FF /* SVGImage+CA.h in Headers */, + 66B79B3615475254002F99FF /* SVGImageElement.h in Headers */, + 66B79B3A15475254002F99FF /* SVGKit.h in Headers */, + 66B79B3C15475254002F99FF /* SVGLineElement.h in Headers */, + 66B79B4015475254002F99FF /* SVGParser.h in Headers */, + 66B79B4415475254002F99FF /* SVGParserExtension.h in Headers */, + 66B79B4615475254002F99FF /* SVGParserSVG.h in Headers */, + 66B79B4A15475254002F99FF /* SVGPathElement.h in Headers */, + 66B79B4E15475254002F99FF /* SVGPattern.h in Headers */, + 66B79B5215475254002F99FF /* SVGPointsAndPathsParser.h in Headers */, + 66B79B5615475254002F99FF /* SVGPolygonElement.h in Headers */, + 66B79B5A15475254002F99FF /* SVGPolylineElement.h in Headers */, + 66B79B5E15475254002F99FF /* SVGRectElement.h in Headers */, + 66B79B6215475254002F99FF /* SVGShapeElement.h in Headers */, + 66B79B6615475254002F99FF /* SVGSVGElement.h in Headers */, + 66B79B6A15475254002F99FF /* SVGTextElement.h in Headers */, + 66B79B6E15475254002F99FF /* SVGTitleElement.h in Headers */, + 66B79B7215475254002F99FF /* SVGUtils.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -477,32 +492,34 @@ C9379C5A12777AEC00B0589E /* SVGView.h in Headers */, 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */, 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */, - 662134C3148AF4F7006881E1 /* SVGPattern.h in Headers */, - 662134C5148AF4F7006881E1 /* SVGUtils.h in Headers */, - 662134C9148AF4F7006881E1 /* CGPathAdditions.h in Headers */, - 662134CF148AF4F7006881E1 /* SVGTitleElement.h in Headers */, - 662134D1148AF4F7006881E1 /* SVGShapeElement+Private.h in Headers */, - 662134D5148AF4F7006881E1 /* SVGShapeElement.h in Headers */, - 662134D9148AF4F7006881E1 /* SVGRectElement.h in Headers */, - 662134DD148AF4F7006881E1 /* SVGPolylineElement.h in Headers */, - 662134E1148AF4F7006881E1 /* SVGPolygonElement.h in Headers */, - 662134E7148AF4F7006881E1 /* SVGPathElement.h in Headers */, - 662134EB148AF4F7006881E1 /* SVGParserSVG.h in Headers */, - 662134EF148AF4F7006881E1 /* SVGParser.h in Headers */, - 662134F3148AF4F7006881E1 /* SVGLineElement.h in Headers */, - 662134F7148AF4F7006881E1 /* SVGImageElement.h in Headers */, - 662134FB148AF4F7006881E1 /* SVGGroupElement.h in Headers */, - 662134FF148AF4F7006881E1 /* SVGEllipseElement.h in Headers */, - 66213501148AF4F7006881E1 /* SVGElement+Private.h in Headers */, - 66213505148AF4F7006881E1 /* SVGElement.h in Headers */, - 66213509148AF4F7006881E1 /* SVGDocument+CA.h in Headers */, - 6621350D148AF4F7006881E1 /* SVGDocument.h in Headers */, - 66213511148AF4F7006881E1 /* SVGDescriptionElement.h in Headers */, - 6604FCF814A0CDA800B4D2D9 /* SVGPointsAndPathsParser.h in Headers */, - 6604FCFA14A0CDA800B4D2D9 /* SVGTextElement.h in Headers */, - 66213515148AF4F7006881E1 /* SVGDefsElement.h in Headers */, - 66213519148AF4F7006881E1 /* SVGCircleElement.h in Headers */, - 662134F5148AF4F7006881E1 /* SVGKit.h in Headers */, + 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */, + 66B79B0D15475254002F99FF /* SVGBasicDataTypes.h in Headers */, + 66B79B1115475254002F99FF /* SVGCircleElement.h in Headers */, + 66B79B1515475254002F99FF /* SVGDefsElement.h in Headers */, + 66B79B1915475254002F99FF /* SVGDescriptionElement.h in Headers */, + 66B79B1D15475254002F99FF /* SVGDocument.h in Headers */, + 66B79B2115475254002F99FF /* SVGElement.h in Headers */, + 66B79B2515475254002F99FF /* SVGEllipseElement.h in Headers */, + 66B79B2915475254002F99FF /* SVGGroupElement.h in Headers */, + 66B79B2D15475254002F99FF /* SVGImage.h in Headers */, + 66B79B3115475254002F99FF /* SVGImage+CA.h in Headers */, + 66B79B3515475254002F99FF /* SVGImageElement.h in Headers */, + 66B79B3915475254002F99FF /* SVGKit.h in Headers */, + 66B79B3B15475254002F99FF /* SVGLineElement.h in Headers */, + 66B79B3F15475254002F99FF /* SVGParser.h in Headers */, + 66B79B4315475254002F99FF /* SVGParserExtension.h in Headers */, + 66B79B4515475254002F99FF /* SVGParserSVG.h in Headers */, + 66B79B4915475254002F99FF /* SVGPathElement.h in Headers */, + 66B79B4D15475254002F99FF /* SVGPattern.h in Headers */, + 66B79B5115475254002F99FF /* SVGPointsAndPathsParser.h in Headers */, + 66B79B5515475254002F99FF /* SVGPolygonElement.h in Headers */, + 66B79B5915475254002F99FF /* SVGPolylineElement.h in Headers */, + 66B79B5D15475254002F99FF /* SVGRectElement.h in Headers */, + 66B79B6115475254002F99FF /* SVGShapeElement.h in Headers */, + 66B79B6515475254002F99FF /* SVGSVGElement.h in Headers */, + 66B79B6915475254002F99FF /* SVGTextElement.h in Headers */, + 66B79B6D15475254002F99FF /* SVGTitleElement.h in Headers */, + 66B79B7115475254002F99FF /* SVGUtils.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -607,34 +624,36 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 662134C8148AF4F7006881E1 /* SVGImageElement.m in Sources */, - 662134CC148AF4F7006881E1 /* SVGUtils.m in Sources */, - 662134CE148AF4F7006881E1 /* SVGTitleElement.m in Sources */, - 662134D4148AF4F7006881E1 /* SVGShapeElement.m in Sources */, - 662134D8148AF4F7006881E1 /* SVGRectElement.m in Sources */, - 662134DC148AF4F7006881E1 /* SVGPolylineElement.m in Sources */, - 662134E0148AF4F7006881E1 /* SVGPolygonElement.m in Sources */, - 662134E4148AF4F7006881E1 /* SVGPattern.m in Sources */, - 662134E6148AF4F7006881E1 /* SVGPathElement.m in Sources */, - 662134EA148AF4F7006881E1 /* SVGParserSVG.m in Sources */, - 662134EE148AF4F7006881E1 /* SVGParser.m in Sources */, - 662134F2148AF4F7006881E1 /* SVGLineElement.m in Sources */, - 662134FA148AF4F7006881E1 /* SVGGroupElement.m in Sources */, - 662134FE148AF4F7006881E1 /* SVGEllipseElement.m in Sources */, - 66213504148AF4F7006881E1 /* SVGElement.m in Sources */, - 66213508148AF4F7006881E1 /* SVGDocument+CA.m in Sources */, - 6621350C148AF4F7006881E1 /* SVGDocument.m in Sources */, - 66213510148AF4F7006881E1 /* SVGDescriptionElement.m in Sources */, - 66213514148AF4F7006881E1 /* SVGDefsElement.m in Sources */, - 66213518148AF4F7006881E1 /* SVGCircleElement.m in Sources */, - 6621351C148AF4F7006881E1 /* CGPathAdditions.m in Sources */, 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */, 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */, - 66213555148AF80B006881E1 /* SVGDocumentView.m in Sources */, 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, 66213559148AF80B006881E1 /* SVGView.m in Sources */, - 6604FCFC14A0CDAE00B4D2D9 /* SVGPointsAndPathsParser.m in Sources */, - 6604FCFE14A0CDAE00B4D2D9 /* SVGTextElement.m in Sources */, + 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */, + 66B79B1015475254002F99FF /* SVGBasicDataTypes.m in Sources */, + 66B79B1415475254002F99FF /* SVGCircleElement.m in Sources */, + 66B79B1815475254002F99FF /* SVGDefsElement.m in Sources */, + 66B79B1C15475254002F99FF /* SVGDescriptionElement.m in Sources */, + 66B79B2015475254002F99FF /* SVGDocument.m in Sources */, + 66B79B2415475254002F99FF /* SVGElement.m in Sources */, + 66B79B2815475254002F99FF /* SVGEllipseElement.m in Sources */, + 66B79B2C15475254002F99FF /* SVGGroupElement.m in Sources */, + 66B79B3015475254002F99FF /* SVGImage.m in Sources */, + 66B79B3415475254002F99FF /* SVGImage+CA.m in Sources */, + 66B79B3815475254002F99FF /* SVGImageElement.m in Sources */, + 66B79B3E15475254002F99FF /* SVGLineElement.m in Sources */, + 66B79B4215475254002F99FF /* SVGParser.m in Sources */, + 66B79B4815475254002F99FF /* SVGParserSVG.m in Sources */, + 66B79B4C15475254002F99FF /* SVGPathElement.m in Sources */, + 66B79B5015475254002F99FF /* SVGPattern.m in Sources */, + 66B79B5415475254002F99FF /* SVGPointsAndPathsParser.m in Sources */, + 66B79B5815475254002F99FF /* SVGPolygonElement.m in Sources */, + 66B79B5C15475254002F99FF /* SVGPolylineElement.m in Sources */, + 66B79B6015475254002F99FF /* SVGRectElement.m in Sources */, + 66B79B6415475254002F99FF /* SVGShapeElement.m in Sources */, + 66B79B6815475254002F99FF /* SVGSVGElement.m in Sources */, + 66B79B6C15475254002F99FF /* SVGTextElement.m in Sources */, + 66B79B7015475254002F99FF /* SVGTitleElement.m in Sources */, + 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -645,29 +664,32 @@ 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */, 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, C9379C5B12777AEC00B0589E /* SVGView.m in Sources */, - 662134C7148AF4F7006881E1 /* SVGImageElement.m in Sources */, - 662134CB148AF4F7006881E1 /* SVGUtils.m in Sources */, - 662134CD148AF4F7006881E1 /* SVGTitleElement.m in Sources */, - 662134D3148AF4F7006881E1 /* SVGShapeElement.m in Sources */, - 662134D7148AF4F7006881E1 /* SVGRectElement.m in Sources */, - 662134DB148AF4F7006881E1 /* SVGPolylineElement.m in Sources */, - 662134DF148AF4F7006881E1 /* SVGPolygonElement.m in Sources */, - 662134E3148AF4F7006881E1 /* SVGPattern.m in Sources */, - 662134E5148AF4F7006881E1 /* SVGPathElement.m in Sources */, - 662134E9148AF4F7006881E1 /* SVGParserSVG.m in Sources */, - 662134ED148AF4F7006881E1 /* SVGParser.m in Sources */, - 662134F1148AF4F7006881E1 /* SVGLineElement.m in Sources */, - 662134F9148AF4F7006881E1 /* SVGGroupElement.m in Sources */, - 662134FD148AF4F7006881E1 /* SVGEllipseElement.m in Sources */, - 66213503148AF4F7006881E1 /* SVGElement.m in Sources */, - 66213507148AF4F7006881E1 /* SVGDocument+CA.m in Sources */, - 6621350B148AF4F7006881E1 /* SVGDocument.m in Sources */, - 6621350F148AF4F7006881E1 /* SVGDescriptionElement.m in Sources */, - 66213513148AF4F7006881E1 /* SVGDefsElement.m in Sources */, - 66213517148AF4F7006881E1 /* SVGCircleElement.m in Sources */, - 6621351B148AF4F7006881E1 /* CGPathAdditions.m in Sources */, - 6604FCF714A0CDA800B4D2D9 /* SVGPointsAndPathsParser.m in Sources */, - 6604FCF914A0CDA800B4D2D9 /* SVGTextElement.m in Sources */, + 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */, + 66B79B0F15475254002F99FF /* SVGBasicDataTypes.m in Sources */, + 66B79B1315475254002F99FF /* SVGCircleElement.m in Sources */, + 66B79B1715475254002F99FF /* SVGDefsElement.m in Sources */, + 66B79B1B15475254002F99FF /* SVGDescriptionElement.m in Sources */, + 66B79B1F15475254002F99FF /* SVGDocument.m in Sources */, + 66B79B2315475254002F99FF /* SVGElement.m in Sources */, + 66B79B2715475254002F99FF /* SVGEllipseElement.m in Sources */, + 66B79B2B15475254002F99FF /* SVGGroupElement.m in Sources */, + 66B79B2F15475254002F99FF /* SVGImage.m in Sources */, + 66B79B3315475254002F99FF /* SVGImage+CA.m in Sources */, + 66B79B3715475254002F99FF /* SVGImageElement.m in Sources */, + 66B79B3D15475254002F99FF /* SVGLineElement.m in Sources */, + 66B79B4115475254002F99FF /* SVGParser.m in Sources */, + 66B79B4715475254002F99FF /* SVGParserSVG.m in Sources */, + 66B79B4B15475254002F99FF /* SVGPathElement.m in Sources */, + 66B79B4F15475254002F99FF /* SVGPattern.m in Sources */, + 66B79B5315475254002F99FF /* SVGPointsAndPathsParser.m in Sources */, + 66B79B5715475254002F99FF /* SVGPolygonElement.m in Sources */, + 66B79B5B15475254002F99FF /* SVGPolylineElement.m in Sources */, + 66B79B5F15475254002F99FF /* SVGRectElement.m in Sources */, + 66B79B6315475254002F99FF /* SVGShapeElement.m in Sources */, + 66B79B6715475254002F99FF /* SVGSVGElement.m in Sources */, + 66B79B6B15475254002F99FF /* SVGTextElement.m in Sources */, + 66B79B6F15475254002F99FF /* SVGTitleElement.m in Sources */, + 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m index 3c00d11e8..5ef471249 100644 --- a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m +++ b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m @@ -55,9 +55,9 @@ - (void)loadResource:(NSString *)name { [self.contentView removeFromSuperview]; - SVGDocument *document = [SVGDocument documentNamed:[name stringByAppendingPathExtension:@"svg"]]; - NSLog(@"[%@] Freshly loaded document (name = %@) has width,height = (%.2f, %.2f)", [self class], name, document.width, document.height ); - self.contentView = [[[SVGView alloc] initWithDocument:document] autorelease]; + SVGImage *document = [SVGImage imageNamed:[name stringByAppendingPathExtension:@"svg"]]; + NSLog(@"[%@] Freshly loaded document (name = %@) has size = %@", [self class], name, NSStringFromCGSize(document.size) ); + self.contentView = [[[SVGView alloc] initWithImage:document] autorelease]; if (_name) { [_name release]; @@ -67,8 +67,8 @@ - (void)loadResource:(NSString *)name _name = [name copy]; [self.scrollView addSubview:self.contentView]; - [self.scrollView setContentSize:CGSizeMake(document.width, document.height)]; - [self.scrollView zoomToRect:CGRectMake(0, 0, document.width, document.height) animated:YES]; + [self.scrollView setContentSize: document.size]; + [self.scrollView zoomToRect:CGRectMake(0, 0, document.size.width, document.size.height) animated:YES]; } - (IBAction)animate:(id)sender { @@ -79,7 +79,7 @@ - (IBAction)animate:(id)sender { - (void)shakeHead { - CALayer *layer = [self.contentView.document layerWithIdentifier:@"head"]; + CALayer *layer = [self.contentView.image layerWithIdentifier:@"head"]; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; animation.duration = 0.25f; diff --git a/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h b/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h index 10c937b9a..6ead2d8fc 100644 --- a/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h +++ b/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h @@ -5,6 +5,9 @@ // Copyright Matt Rajca 2010-2011. All rights reserved. // +#import +#import + @class RootViewController, DetailViewController; @interface SVGPadAppDelegate : NSObject < UIApplicationDelegate > { } diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index dc464c48e..f0139ffa9 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -21,8 +21,8 @@ 3BF503FC148C62D900CC7D17 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C4148C62D900CC7D17 /* SVGCircleElement.m */; }; 3BF503FD148C62D900CC7D17 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */; }; 3BF503FE148C62D900CC7D17 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */; }; - 3BF503FF148C62D900CC7D17 /* SVGDocument+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CA148C62D900CC7D17 /* SVGDocument+CA.m */; }; - 3BF50400148C62D900CC7D17 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CC148C62D900CC7D17 /* SVGDocument.m */; }; + 3BF503FF148C62D900CC7D17 /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */; }; + 3BF50400148C62D900CC7D17 /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CC148C62D900CC7D17 /* SVGImage.m */; }; 3BF50401148C62D900CC7D17 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CF148C62D900CC7D17 /* SVGElement.m */; }; 3BF50402148C62D900CC7D17 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503D1148C62D900CC7D17 /* SVGEllipseElement.m */; }; 3BF50403148C62D900CC7D17 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503D3148C62D900CC7D17 /* SVGGroupElement.m */; }; @@ -41,7 +41,6 @@ 3BF50410148C62D900CC7D17 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503EF148C62D900CC7D17 /* SVGUtils.m */; }; 3BF50411148C62D900CC7D17 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */; }; 3BF50412148C62D900CC7D17 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */; }; - 3BF50413148C62D900CC7D17 /* SVGDocumentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F6148C62D900CC7D17 /* SVGDocumentView.m */; }; 3BF50414148C62D900CC7D17 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F8148C62D900CC7D17 /* SVGPathView.m */; }; 3BF50415148C62D900CC7D17 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503FA148C62D900CC7D17 /* SVGView.m */; }; 3BF50422148C63F500CC7D17 /* CurvedDiamond.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */; }; @@ -54,7 +53,10 @@ 663C41C6149E638000F546A3 /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 663C41C5149E638000F546A3 /* SVGPointsAndPathsParser.m */; }; 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */; }; 663DEFEF14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */; }; + 6640BCEB154722FB00AC0AE8 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */; }; + 6640BCEE15472B6F00AC0AE8 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6640BCED15472B6E00AC0AE8 /* SVGDocument.m */; }; 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; + 667DA28415470FDB00BDABCC /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */; }; 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; 66BBD74315028F0A00102FEF /* map-test-australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */; }; @@ -86,10 +88,10 @@ 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; 3BF503C7148C62D900CC7D17 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 3BF503C9148C62D900CC7D17 /* SVGDocument+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGDocument+CA.h"; sourceTree = ""; }; - 3BF503CA148C62D900CC7D17 /* SVGDocument+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGDocument+CA.m"; sourceTree = ""; }; - 3BF503CB148C62D900CC7D17 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 3BF503CC148C62D900CC7D17 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 3BF503C9148C62D900CC7D17 /* SVGImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGImage+CA.h"; sourceTree = ""; }; + 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGImage+CA.m"; sourceTree = ""; }; + 3BF503CB148C62D900CC7D17 /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = ""; }; + 3BF503CC148C62D900CC7D17 /* SVGImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImage.m; sourceTree = ""; }; 3BF503CE148C62D900CC7D17 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; 3BF503CF148C62D900CC7D17 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; @@ -127,8 +129,6 @@ 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; 3BF503F3148C62D900CC7D17 /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 3BF503F5148C62D900CC7D17 /* SVGDocumentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocumentView.h; sourceTree = ""; }; - 3BF503F6148C62D900CC7D17 /* SVGDocumentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocumentView.m; sourceTree = ""; }; 3BF503F7148C62D900CC7D17 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; 3BF503F8148C62D900CC7D17 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; 3BF503F9148C62D900CC7D17 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; @@ -144,8 +144,15 @@ 663C41C5149E638000F546A3 /* SVGPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPointsAndPathsParser.m; sourceTree = ""; }; 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-Location_European_nation_states-ukonly.svg"; sourceTree = ""; }; + 6640BCE9154722FA00AC0AE8 /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 6640BCEC15472B6D00AC0AE8 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; + 6640BCED15472B6E00AC0AE8 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 6640BCEF15472D2700AC0AE8 /* SVGParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserExtension.h; sourceTree = ""; }; 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; 66436E5214A0BCEF001CC769 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; + 667DA28215470FD800BDABCC /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; + 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGBasicDataTypes.m; sourceTree = ""; }; 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-australia_states_blank.svg"; sourceTree = ""; }; @@ -258,10 +265,14 @@ 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */, 3BF503C7148C62D900CC7D17 /* SVGDescriptionElement.h */, 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */, - 3BF503C9148C62D900CC7D17 /* SVGDocument+CA.h */, - 3BF503CA148C62D900CC7D17 /* SVGDocument+CA.m */, - 3BF503CB148C62D900CC7D17 /* SVGDocument.h */, - 3BF503CC148C62D900CC7D17 /* SVGDocument.m */, + 6640BCEC15472B6D00AC0AE8 /* SVGDocument.h */, + 6640BCED15472B6E00AC0AE8 /* SVGDocument.m */, + 3BF503C9148C62D900CC7D17 /* SVGImage+CA.h */, + 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */, + 667DA28215470FD800BDABCC /* SVGBasicDataTypes.h */, + 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */, + 3BF503CB148C62D900CC7D17 /* SVGImage.h */, + 3BF503CC148C62D900CC7D17 /* SVGImage.m */, 3BF503CE148C62D900CC7D17 /* SVGElement.h */, 3BF503CF148C62D900CC7D17 /* SVGElement.m */, 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */, @@ -275,6 +286,7 @@ 3BF503D8148C62D900CC7D17 /* SVGLineElement.m */, 3BF503D9148C62D900CC7D17 /* SVGParser.h */, 3BF503DA148C62D900CC7D17 /* SVGParser.m */, + 6640BCEF15472D2700AC0AE8 /* SVGParserExtension.h */, 3BF503DB148C62D900CC7D17 /* SVGParserSVG.h */, 3BF503DC148C62D900CC7D17 /* SVGParserSVG.m */, 3BF503DD148C62D900CC7D17 /* SVGPathElement.h */, @@ -291,6 +303,8 @@ 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */, 3BF503E8148C62D900CC7D17 /* SVGShapeElement.h */, 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */, + 6640BCE9154722FA00AC0AE8 /* SVGSVGElement.h */, + 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */, 3BF503EA148C62D900CC7D17 /* SVGTextElement.h */, 3BF503EB148C62D900CC7D17 /* SVGTextElement.m */, 3BF503EC148C62D900CC7D17 /* SVGTitleElement.h */, @@ -309,8 +323,6 @@ 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */, 3BF503F3148C62D900CC7D17 /* CAShapeLayerWithHitTest.h */, 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */, - 3BF503F5148C62D900CC7D17 /* SVGDocumentView.h */, - 3BF503F6148C62D900CC7D17 /* SVGDocumentView.m */, 3BF503F7148C62D900CC7D17 /* SVGPathView.h */, 3BF503F8148C62D900CC7D17 /* SVGPathView.m */, 3BF503F9148C62D900CC7D17 /* SVGView.h */, @@ -430,6 +442,7 @@ buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 667DA28415470FDB00BDABCC /* SVGBasicDataTypes.m in Sources */, 1D3623260D0F684500981E51 /* SVGPadAppDelegate.m in Sources */, 2804200B108E984D000629CD /* RootViewController.m in Sources */, 2804200C108E984D000629CD /* DetailViewController.m in Sources */, @@ -437,8 +450,8 @@ 3BF503FC148C62D900CC7D17 /* SVGCircleElement.m in Sources */, 3BF503FD148C62D900CC7D17 /* SVGDefsElement.m in Sources */, 3BF503FE148C62D900CC7D17 /* SVGDescriptionElement.m in Sources */, - 3BF503FF148C62D900CC7D17 /* SVGDocument+CA.m in Sources */, - 3BF50400148C62D900CC7D17 /* SVGDocument.m in Sources */, + 3BF503FF148C62D900CC7D17 /* SVGImage+CA.m in Sources */, + 3BF50400148C62D900CC7D17 /* SVGImage.m in Sources */, 3BF50401148C62D900CC7D17 /* SVGElement.m in Sources */, 3BF50402148C62D900CC7D17 /* SVGEllipseElement.m in Sources */, 3BF50403148C62D900CC7D17 /* SVGGroupElement.m in Sources */, @@ -457,11 +470,12 @@ 3BF50410148C62D900CC7D17 /* SVGUtils.m in Sources */, 3BF50411148C62D900CC7D17 /* CALayerWithChildHitTest.m in Sources */, 3BF50412148C62D900CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, - 3BF50413148C62D900CC7D17 /* SVGDocumentView.m in Sources */, 3BF50414148C62D900CC7D17 /* SVGPathView.m in Sources */, 3BF50415148C62D900CC7D17 /* SVGView.m in Sources */, 663C41C6149E638000F546A3 /* SVGPointsAndPathsParser.m in Sources */, 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */, + 6640BCEB154722FB00AC0AE8 /* SVGSVGElement.m in Sources */, + 6640BCEE15472B6F00AC0AE8 /* SVGDocument.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/iOS/SVGDocumentView.h b/iOS/SVGDocumentView.h deleted file mode 100644 index 70bed23b3..000000000 --- a/iOS/SVGDocumentView.h +++ /dev/null @@ -1,22 +0,0 @@ -#import - -#import "SVGDocument.h" - -/*! - * CALayer can't be stored in NSDictionary as a key. Instead, the SVGParser stores the - * returned layer has - as its "name" property - the "identifier" property of the SVGElement that created it - */ -@interface SVGDocumentView : NSObject -{ - -} - -+(SVGDocumentView*) documentViewWithDocument:(SVGDocument*) d; - --(id) initWithDocument:(SVGDocument*) d; - -@property(nonatomic, retain, readonly) SVGDocument* svg; -@property(nonatomic, retain, readonly) CALayer* rootLayer; -@property(nonatomic, retain, readonly) NSMutableDictionary* layersByElementId; - -@end diff --git a/iOS/SVGDocumentView.m b/iOS/SVGDocumentView.m deleted file mode 100644 index 1427797b0..000000000 --- a/iOS/SVGDocumentView.m +++ /dev/null @@ -1,86 +0,0 @@ -#import "SVGDocumentView.h" - - -#import "SVGElement.h" - -@interface SVGDocumentView() -- (CALayer *)layerWithElement:(SVGElement *)element; - -@property(nonatomic, retain, readwrite) SVGDocument* svg; -@property(nonatomic, retain, readwrite) CALayer* rootLayer; -@property(nonatomic, retain, readwrite) NSMutableDictionary* layersByElementId; - -@end - -@implementation SVGDocumentView - -@synthesize svg; -@synthesize rootLayer; -@synthesize layersByElementId; - -+(SVGDocumentView*) documentViewWithDocument:(SVGDocument*) d -{ - SVGDocumentView* result = [[[SVGDocumentView alloc] initWithDocument:d] autorelease]; - return result; -} - --(id) initWithDocument:(SVGDocument*) d -{ - NSAssert( d != nil, @"Attempted to init with a nil SVGDocument" ); - - self = [super init]; - if (self) { - self.svg = d; - self.rootLayer = [svg newLayer]; - - self.layersByElementId = [NSMutableDictionary dictionary]; - - self.rootLayer = [self layerWithElement:self.svg]; - - [layersByElementId setObject:self.rootLayer forKey:svg.identifier]; - NSLog(@"[%@] ROOT element id: %@ => layer: %@", [self class], svg.identifier, self.rootLayer); - } - return self; -} - -- (void) dealloc -{ - self.svg = nil; - self.rootLayer = nil; - self.layersByElementId = nil; - - [super dealloc]; -} - -- (CALayer *)layerWithElement:(SVGElement *)element { - CALayer *layer = [element newLayer]; - - if (![element.children count]) { - return layer; - } - - for (SVGElement *child in element.children) { - if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - CALayer *sublayer = [self layerWithElement:(id)child]; - - if (!sublayer) { - continue; - } - - [layer addSublayer:sublayer]; - [layersByElementId setObject:sublayer forKey:child.identifier]; - NSLog(@"[%@] element id: %@ => layer: %@", [self class], child.identifier, sublayer); - } - } - - if (element != self.svg) { - [element layoutLayer:layer]; - } - - [layer setNeedsDisplay]; - - return layer; -} - - -@end diff --git a/iOS/SVGPathView.m b/iOS/SVGPathView.m index 7250a1ece..f7bcb2d23 100755 --- a/iOS/SVGPathView.m +++ b/iOS/SVGPathView.m @@ -5,11 +5,10 @@ #import "SVGPathView.h" -#import "SVGElement+Private.h" -#import "SVGDocument.h" +#import "SVGImage.h" #import "SVGPathElement.h" #import "CGPathAdditions.h" -#import "SVGDocument+CA.h" +#import "SVGImage+CA.h" #if ENABLE_SVGPATHVIEW_CLASS @@ -46,7 +45,7 @@ - (id)initWithPathElement:(SVGPathElement*)pathElement translateTowardOrigin:(BO _pathElement = newPathElement; - SVGDocument* doc = [[SVGDocument alloc] initWithFrame:viewRect]; + SVGImage* doc = [[SVGImage alloc] initWithFrame:viewRect]; [doc addChild:newPathElement]; [self setDocument:doc]; diff --git a/iOS/SVGView.h b/iOS/SVGView.h index 43e7a75ef..09cd6258c 100644 --- a/iOS/SVGView.h +++ b/iOS/SVGView.h @@ -7,12 +7,12 @@ #import -@class SVGDocument; +@class SVGImage; @interface SVGView : UIView { } -@property (nonatomic, retain) SVGDocument *document; +@property (nonatomic, retain) SVGImage *image; -- (id)initWithDocument:(SVGDocument *)document; // set frame to position +- (id)initWithImage:(SVGImage *)image; // set frame to position @end diff --git a/iOS/SVGView.m b/iOS/SVGView.m index 2d403c3b5..995b3b182 100644 --- a/iOS/SVGView.m +++ b/iOS/SVGView.m @@ -7,40 +7,40 @@ #import "SVGView.h" -#import "SVGDocument.h" -#import "SVGDocument+CA.h" +#import "SVGImage.h" +#import "SVGImage+CA.h" @implementation SVGView -@synthesize document = _document; +@synthesize image = _image; -- (id)initWithDocument:(SVGDocument *)document { +- (id)initWithImage:(SVGImage *)document { NSParameterAssert(document != nil); - self = [self initWithFrame:CGRectMake(0.0f, 0.0f, document.width, document.height)]; + self = [self initWithFrame:CGRectMake(0.0f, 0.0f, document.size.width, document.size.height)]; if (self) { - self.document = document; + self.image = document; } return self; } - (void)dealloc { - [_document release]; + [_image release]; [super dealloc]; } -- (void)setDocument:(SVGDocument *)aDocument { - if (_document != aDocument) { - [_document release]; - _document = [aDocument retain]; +- (void)setImage:(SVGImage *)aDocument { + if (_image != aDocument) { + [_image release]; + _image = [aDocument retain]; for (NSInteger i = [self.layer.sublayers count] - 1; i >= 0; i--) { CALayer *sublayer = [self.layer.sublayers objectAtIndex:i]; [sublayer removeFromSuperlayer]; } - [self.layer addSublayer:[_document layerTree]]; + [self.layer addSublayer:[_image layerTree]]; } } From 671ae4c3861d1b938a76101a77b66b1dc02f0798 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 24 Apr 2012 23:02:00 +0100 Subject: [PATCH 005/110] ADDED: fixed *all* memory leaks except for the Parser, updated the README to reflect the usage changes. --- Core/SVGDocument.m | 10 ++++++++-- Core/SVGGroupElement.m | 2 +- Core/SVGImage+CA.h | 7 +++++-- Core/SVGImage+CA.m | 17 +++++++++++------ Core/SVGImage.m | 8 ++++---- Core/SVGImageElement.m | 2 +- Core/SVGParser.m | 5 ++++- Core/SVGParserSVG.m | 2 +- Core/SVGPolylineElement.m | 2 +- Core/SVGSVGElement.m | 2 +- Core/SVGShapeElement.m | 2 +- Core/SVGTextElement.m | 2 +- Core/SVGUtils.h | 2 +- Core/SVGUtils.m | 2 +- Mac/SVGView.m | 2 +- README.mdown | 28 ++++++++++++++-------------- iOS/SVGView.m | 2 +- 17 files changed, 57 insertions(+), 40 deletions(-) diff --git a/Core/SVGDocument.m b/Core/SVGDocument.m index 2c6f7721e..1e803e52b 100644 --- a/Core/SVGDocument.m +++ b/Core/SVGDocument.m @@ -9,14 +9,20 @@ @implementation SVGDocument +(SVGDocument*) documentFromFilename:(NSString*) p { - SVGDocument* d; + SVGDocument* d = [[[SVGDocument alloc] init] autorelease]; + + d.hasSourceFile = TRUE; + d.filePath = p; return d; } +(SVGDocument*) documentFromURL:(NSURL*) u { - SVGDocument* d; + SVGDocument* d = [[[SVGDocument alloc] init] autorelease]; + + d.hasSourceURL = TRUE; + d.URL = u; return d; } diff --git a/Core/SVGGroupElement.m b/Core/SVGGroupElement.m index 2f7cd973a..e89bb813f 100644 --- a/Core/SVGGroupElement.m +++ b/Core/SVGGroupElement.m @@ -39,7 +39,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { - (CALayer *)newLayer { - CALayer* _layer = [CALayerWithChildHitTest layer]; + CALayer* _layer = [[CALayerWithChildHitTest layer] retain]; _layer.name = self.identifier; [_layer setValue:self.identifier forKey:kSVGElementIdentifier]; diff --git a/Core/SVGImage+CA.h b/Core/SVGImage+CA.h index eea7d9313..f7587928c 100644 --- a/Core/SVGImage+CA.h +++ b/Core/SVGImage+CA.h @@ -6,11 +6,14 @@ - (CALayer *)layerWithIdentifier:(NSString *)identifier; -- (CALayer *)layerTree; +/*! One and only one instance ever returned */ +- (CALayer *)layerTreeCached; +/*! Creates a new instance each time you call it */ +- (CALayer *)newLayerTree; - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer; -- (CALayer *)layerWithElement:(SVGElement < SVGLayeredElement > *)element; +- (CALayer *)newLayerWithElement:(SVGElement < SVGLayeredElement > *)element; /*! returns all the individual CALayer's in the full layer tree, indexed by the SVG identifier of the SVG node that created that layer */ - (NSDictionary*) dictionaryOfLayers; diff --git a/Core/SVGImage+CA.m b/Core/SVGImage+CA.m index 580597547..34b38a571 100644 --- a/Core/SVGImage+CA.m +++ b/Core/SVGImage+CA.m @@ -7,7 +7,7 @@ @implementation SVGImage (CA) static const char *kLayerTreeKey = "svgkit.layertree"; - (CALayer *)layerWithIdentifier:(NSString *)identifier { - return [self layerWithIdentifier:identifier layer:self.layerTree]; + return [self layerWithIdentifier:identifier layer:self.layerTreeCached]; } - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { @@ -25,18 +25,23 @@ - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { return nil; } -- (CALayer *)layerTree { +- (CALayer *)layerTreeCached { CALayer *cachedLayerTree = objc_getAssociatedObject(self, (void *) kLayerTreeKey); if (!cachedLayerTree) { - cachedLayerTree = [self layerWithElement:self.rootElement]; + cachedLayerTree = [[self newLayerTree] autorelease]; // we're going to associate it using OBJC_ASSOCIATION_RETAIN_NONATOMIC objc_setAssociatedObject(self, (void *) kLayerTreeKey, cachedLayerTree, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } return cachedLayerTree; } -- (CALayer *)layerWithElement:(SVGElement *)element { +-(CALayer *)newLayerTree +{ + return [self newLayerWithElement:self.rootElement]; +} + +- (CALayer *)newLayerWithElement:(SVGElement *)element { CALayer *layer = [element newLayer]; if (![element.children count]) { @@ -45,7 +50,7 @@ - (CALayer *)layerWithElement:(SVGElement *)element { for (SVGElement *child in element.children) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - CALayer *sublayer = [self layerWithElement:(id)child]; + CALayer *sublayer = [self newLayerWithElement:(id)child]; if (!sublayer) { continue; @@ -91,7 +96,7 @@ - (NSDictionary*) dictionaryOfLayers { NSMutableDictionary* layersByElementId = [NSMutableDictionary dictionary]; - CALayer* rootLayer = [self layerTree]; + CALayer* rootLayer = [self layerTreeCached]; [self addSVGLayerTree:rootLayer withIdentifier:self.rootElement.identifier toDictionary:layersByElementId]; diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 13e802a8b..791acd340 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -75,7 +75,7 @@ - (id)initWithContentsOfFile:(NSString *)aPath { self = [super init]; if (self) { - self.rootElement = [[SVGSVGElement alloc] initWithName:@"svg"]; + self.rootElement = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; _width = SVGLengthZero; _height = SVGLengthZero; @@ -95,7 +95,7 @@ - (id)initWithContentsOfURL:(NSURL *)url { self = [super init]; if (self) { - self.rootElement = [[SVGSVGElement alloc] initWithName:@"svg"]; + self.rootElement = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; _width = SVGLengthZero; _height = SVGLengthZero; @@ -113,7 +113,7 @@ - (id) initWithFrame:(CGRect)frame { self = [super init]; if (self) { - self.rootElement = [[SVGSVGElement alloc] initWithName:@"svg"]; + self.rootElement = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; _width = SVGLengthGetWidth(frame); _height = SVGLengthGetHeight(frame); @@ -240,7 +240,7 @@ -(BOOL)parseFileAtURL:(NSURL *)url { - (CALayer *)newLayer { - CALayer* _layer = [CALayer layer]; + CALayer* _layer = [[CALayer layer] retain]; _layer.frame = CGRectMake(0.0f, 0.0f, SVGLengthAsPixels(self.svgWidth), SVGLengthAsPixels(self.svgHeight)); return _layer; diff --git a/Core/SVGImageElement.m b/Core/SVGImageElement.m index 22a68f08e..3954caeac 100644 --- a/Core/SVGImageElement.m +++ b/Core/SVGImageElement.m @@ -83,7 +83,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { } - (CALayer *)newLayer { - __block CALayer *layer = [CALayer layer]; + __block CALayer *layer = [[CALayer layer] retain]; layer.name = self.identifier; [layer setValue:self.identifier forKey:kSVGElementIdentifier]; diff --git a/Core/SVGParser.m b/Core/SVGParser.m index 4e618dcbb..c3ab459e9 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -97,7 +97,7 @@ - (void) addSVGParserExtension:(NSObject*) extension { if( self.parserExtensions == nil ) { - self.parserExtensions = [NSMutableArray new]; + self.parserExtensions = [NSMutableArray array]; } [self.parserExtensions addObject:extension]; @@ -245,10 +245,13 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar NSString *name = NSStringFromLibxmlString(localname); NSMutableDictionary *attrs = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); + /** + Debugging: //NSString *url = NSStringFromLibxmlString(URI); NSString *prefix2 = nil; if( prefix != NULL ) prefix2 = NSStringFromLibxmlString(prefix); + */ NSString *objcURIString = nil; if( URI != NULL ) diff --git a/Core/SVGParserSVG.m b/Core/SVGParserSVG.m index a4735d52f..103c84481 100644 --- a/Core/SVGParserSVG.m +++ b/Core/SVGParserSVG.m @@ -80,7 +80,7 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGDocument*) svgDoc [attributes addEntriesFromDictionary:[SVGParser NSDictionaryFromCSSAttributes:style]]; } - SVGElement *element = [[elementClass alloc] initWithName:name]; + SVGElement *element = [[[elementClass alloc] initWithName:name] autorelease]; [element parseAttributes:attributes]; /** special case: */ diff --git a/Core/SVGPolylineElement.m b/Core/SVGPolylineElement.m index 993cd2cec..717858226 100644 --- a/Core/SVGPolylineElement.m +++ b/Core/SVGPolylineElement.m @@ -17,7 +17,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { id value = nil; if ((value = [attributes objectForKey:@"points"])) { - CGMutablePathRef path = SVGPathFromPointsInString([value UTF8String], NO); + CGMutablePathRef path = createPathFromPointsInString([value UTF8String], NO); [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); diff --git a/Core/SVGSVGElement.m b/Core/SVGSVGElement.m index 53a6c4d5f..68d461abc 100644 --- a/Core/SVGSVGElement.m +++ b/Core/SVGSVGElement.m @@ -50,7 +50,7 @@ - (SVGElement *)findFirstElementOfClass:(Class)class { - (CALayer *)newLayer { - CALayer* _layer = [CALayerWithChildHitTest layer]; + CALayer* _layer = [[CALayerWithChildHitTest layer] retain]; _layer.name = self.identifier; [_layer setValue:self.identifier forKey:kSVGElementIdentifier]; diff --git a/Core/SVGShapeElement.m b/Core/SVGShapeElement.m index 3f30d645d..36ad4c0ec 100644 --- a/Core/SVGShapeElement.m +++ b/Core/SVGShapeElement.m @@ -112,7 +112,7 @@ - (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath { } - (CALayer *) newLayer { - CAShapeLayer* _shapeLayer = [CAShapeLayerWithHitTest layer]; + CAShapeLayer* _shapeLayer = [[CAShapeLayerWithHitTest layer] retain]; _shapeLayer.name = self.identifier; [_shapeLayer setValue:self.identifier forKey:kSVGElementIdentifier]; _shapeLayer.opacity = _opacity; diff --git a/Core/SVGTextElement.m b/Core/SVGTextElement.m index 7ae612f7c..b31100867 100644 --- a/Core/SVGTextElement.m +++ b/Core/SVGTextElement.m @@ -81,7 +81,7 @@ - (CALayer *) newLayer { size:_fontSize]; CGSize sizeOfTextRect = [textToDraw sizeWithFont:fontToDraw]; - CATextLayer *label = [[[CATextLayer alloc] init] autorelease]; + CATextLayer *label = [[CATextLayer alloc] init]; [label setName:self.identifier]; [label setFont:_fontFamily]; [label setFontSize:_fontSize]; diff --git a/Core/SVGUtils.h b/Core/SVGUtils.h index d6ad8e8b8..b0c9919bf 100644 --- a/Core/SVGUtils.h +++ b/Core/SVGUtils.h @@ -27,5 +27,5 @@ SVGColor SVGColorFromString (const char *string); CGFloat SVGPercentageFromString (const char *string); -CGMutablePathRef SVGPathFromPointsInString (const char *string, boolean_t close); +CGMutablePathRef createPathFromPointsInString (const char *string, boolean_t close); CGColorRef CGColorWithSVGColor (SVGColor color); diff --git a/Core/SVGUtils.m b/Core/SVGUtils.m index b71395f46..496cb35af 100644 --- a/Core/SVGUtils.m +++ b/Core/SVGUtils.m @@ -360,7 +360,7 @@ CGFloat SVGPercentageFromString (const char *string) { return atoi(string) / 100.0f; } -CGMutablePathRef SVGPathFromPointsInString (const char *string, boolean_t close) { +CGMutablePathRef createPathFromPointsInString (const char *string, boolean_t close) { CGMutablePathRef path = CGPathCreateMutable(); size_t len = strlen(string); diff --git a/Mac/SVGView.m b/Mac/SVGView.m index 45aec74e7..fb60c0060 100644 --- a/Mac/SVGView.m +++ b/Mac/SVGView.m @@ -42,7 +42,7 @@ - (void)setDocument:(SVGDocument *)aDocument { for (CALayer *sublayer in [self.layer sublayers]) { [sublayer removeFromSuperlayer]; } - [self.layer addSublayer:[_document layerTree]]; + [self.layer addSublayer:[_document layerTreeCached]]; } } diff --git a/README.mdown b/README.mdown index 8d097722f..74acc2ccc 100644 --- a/README.mdown +++ b/README.mdown @@ -3,6 +3,12 @@ SVGKit SVGKit is a Cocoa framework for rendering SVG files as Core Animation layers. All shapes are represented by instances of the `CAShapeLayer` class, and are, by design, animatable. SVGKit is compatible with the latest iOS SDK's. +BRANCH: "transforms" +----- + +This specific branch contains a MASSIVE re-factor of the original SVGKit, aiming to make it easier to use in your apps. Please read the "usage" instructions carefully - they have changed from previous SVGKit versions! + + Installation ----- @@ -30,10 +36,14 @@ Usage - iPhone/iPad ----- To use this, you must: - 1. Load an SVG file, using SVGDocument (this parses the SVG) - 2. Convert the document to CALayer's which Apple can render, using SVGDocumentView + 1. Load an SVG file + 2. Convert the document to CALayer's which Apple can render + +The easiest way to do this is: + 1. SVGImage *im = [SVGImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object + 2. [self.view.layer addSublayer:[im layerTree]]; // SVGImage objects can export themselves as Apple's CALayer's -NB: if you want to render the same SVG in different places on screen, create an additional SVGDocumentView for each instance. That way, you don't have to re-parse the SVG source file each time. +NB: if you want to render the same SVG in different places on screen, you cannot do that right now. This is because the refactored code has gone back to old code that prevented you from doing this. Will be fixed in future! - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { @@ -60,16 +70,6 @@ NB: if you want to render the same SVG in different places on screen, create an Usage - OS X ----- -First, initialize an instance of `SVGDocument`, the model object which encompasses the entire SVG element tree. This can be accomplished using the `initWithContentsOfFile:` initializer. To load a SVG file which resides in your application bundle, use the `documentNamed:` class method and pass in a file name (without the extension). The `SVGDocument` class encapsulates certain document metadata, including width, height, version, title, and description. - - SVGDocument *document = [SVGDocument documentNamed:@"Monkey"]; // located in the application bundle - -On Mac OS X, make sure your instance of `NSView` is layer-backed. The layer tree can be accessed using the `layerTree` method on `SVGDocument`, for example: - - NSView *ourView = ... ; - [ourView setWantsLayer:YES]; - [ourView.layer addSublayer:[document layerTree]]; - -Your SVG file should now be rendered on-screen. You can query for specific layers by using the `layerWithIdentifier:` method, also defined on `SVGDocument`. The identifier corresponds to the `id` attribute defined on elements. Once a reference to a subclass of `CALayer` is returned, its properties can be animated using implicit or explicit [Core Animation](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/AnimatingLayers.html%23//apple_ref/doc/uid/TP40006085-SW1) animations. +UNSUPPORTED: the code exists, but none of the maintainers have used it recently, so we're not even sure if the OS X build still works! Feel free to report any issues or suggest improvements in the issue tracker diff --git a/iOS/SVGView.m b/iOS/SVGView.m index 995b3b182..89ae17152 100644 --- a/iOS/SVGView.m +++ b/iOS/SVGView.m @@ -40,7 +40,7 @@ - (void)setImage:(SVGImage *)aDocument { [sublayer removeFromSuperlayer]; } - [self.layer addSublayer:[_image layerTree]]; + [self.layer addSublayer:[_image layerTreeCached]]; } } From 00d683ca87b1dd2a93c92bfa9a0458dfceae41f3 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 24 Apr 2012 23:36:59 +0100 Subject: [PATCH 006/110] FIXED: now passes ALL unit tests that previously passed for SVGKit (but fails the unit tests that were previously failing) --- Core/SVGImage.m | 53 ++++++++++++++++++++++++++------------------ Core/SVGParser.h | 5 ++++- Core/SVGParser.m | 21 +++++++++++++----- Core/SVGSVGElement.m | 10 +++++++-- 4 files changed, 60 insertions(+), 29 deletions(-) diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 791acd340..60cd085de 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -11,14 +11,17 @@ @interface SVGImage () /*! Only preserved for temporary backwards compatibility */ -- (BOOL)parseFileAtPath:(NSString *)aPath; +- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath; /*! Only preserved for temporary backwards compatibility */ --(BOOL)parseFileAtURL:(NSURL *)url; +-(SVGSVGElement*)parseFileAtURL:(NSURL *)url; -- (BOOL)parseFileAtPath:(NSString *)aPath error:(NSError**) error; -- (BOOL)parseFileAtURL:(NSURL *)url error:(NSError**) error; +- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error; +- (SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error; @property (nonatomic, readwrite) SVGSVGElement* rootElement; +@property (nonatomic, readwrite) SVGLength svgWidth; +@property (nonatomic, readwrite) SVGLength svgHeight; + #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods //NOT DEFINED: what is the scale for a SVGImage? @property(nonatomic,readwrite) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); @@ -75,17 +78,21 @@ - (id)initWithContentsOfFile:(NSString *)aPath { self = [super init]; if (self) { - self.rootElement = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; - _width = SVGLengthZero; - _height = SVGLengthZero; + self.svgWidth = SVGLengthZero; + self.svgHeight = SVGLengthZero; NSError* parseError = nil; - if (![self parseFileAtPath:aPath error:&parseError]) { + self.rootElement = [self parseFileAtPath:aPath error:&parseError]; + if ( self.rootElement == nil ) { NSLog(@"[%@] MISSING OR CORRUPT FILE, OR FILE USES FEATURES THAT SVGKit DOES NOT YET SUPPORT, COULD NOT CREATE DOCUMENT: path = %@, error = %@", [self class], aPath, parseError); [self release]; return nil; } + + self.svgWidth = self.rootElement.documentWidth; + self.svgHeight = self.rootElement.documentHeight; + } return self; } @@ -95,11 +102,11 @@ - (id)initWithContentsOfURL:(NSURL *)url { self = [super init]; if (self) { - self.rootElement = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; _width = SVGLengthZero; _height = SVGLengthZero; - if (![self parseFileAtURL:url]) { + self.rootElement = [self parseFileAtURL:url]; + if ( self.rootElement == nil ) { NSLog(@"[%@] ERROR: COULD NOT FIND SVG AT URL = %@", [self class], url); [self release]; @@ -201,40 +208,44 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) } -- (BOOL)parseFileAtPath:(NSString *)aPath error:(NSError**) error { - SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:[SVGDocument documentFromFilename:aPath] ]; +- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { + + SVGDocument* parsedDocument = [SVGDocument documentFromFilename:aPath]; + SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:parsedDocument]; - if (![defaultParser parse:error]) { + SVGSVGElement* rootNode = (SVGSVGElement*) [defaultParser parse:error]; + if ( rootNode == nil ) { NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); [defaultParser release]; - return NO; + return nil; } - return YES; + return rootNode; } -- (BOOL)parseFileAtPath:(NSString *)aPath { +- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath { return [self parseFileAtPath:aPath error:nil]; } --(BOOL)parseFileAtURL:(NSURL *)url error:(NSError**) error { +-(SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error { SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:[SVGDocument documentFromURL:url]]; - if (![defaultParser parse:error]) { + SVGSVGElement* rootNode = (SVGSVGElement*) [defaultParser parse:error]; + if ( rootNode == nil ) { NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); [defaultParser release]; - return NO; + return nil; } [defaultParser release]; - return YES; + return rootNode; } --(BOOL)parseFileAtURL:(NSURL *)url { +-(SVGSVGElement*)parseFileAtURL:(NSURL *)url { return [self parseFileAtURL:url error:nil]; } diff --git a/Core/SVGParser.h b/Core/SVGParser.h index 8f83bd4f9..4e9e6f4c4 100644 --- a/Core/SVGParser.h +++ b/Core/SVGParser.h @@ -24,6 +24,8 @@ #import "SVGParserExtension.h" +#import "SVGElement.h" + /*! RECOMMENDED: leave this set to 1 to get warnings about "legal, but poorly written" SVG */ #define PARSER_WARN_FOR_ANONYMOUS_SVG_G_TAGS 1 @@ -39,6 +41,7 @@ BOOL _storingChars; NSMutableString *_storedChars; NSMutableArray *_elementStack; + SVGElement *_rootNode; #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR SVGDocument *_document; #else @@ -59,7 +62,7 @@ - (void) addSVGParserExtension:(NSObject*) extension; -- (BOOL)parse:(NSError **)outError; +- (SVGElement*)parse:(NSError **)outError; +(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css; diff --git a/Core/SVGParser.m b/Core/SVGParser.m index c3ab459e9..0a881f7cc 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -103,9 +103,10 @@ - (void) addSVGParserExtension:(NSObject*) extension [self.parserExtensions addObject:extension]; } -- (BOOL)parse:(NSError **)outError { +- (SVGElement*)parse:(NSError **)outError { errorForCurrentParse = nil; [self.parseWarnings removeAllObjects]; + _rootNode = nil; /** Is this file being loaded from disk? @@ -123,7 +124,7 @@ - (BOOL)parse:(NSError **)outError { if( error != nil ) { NSLog( @"[%@] ERROR: failed to parse SVG from URL, because failed to download file at URL = %@, error = %@", [self class], self.sourceURL, error ); - return false; + return nil; } } @@ -134,7 +135,7 @@ - (BOOL)parse:(NSError **)outError { file = fopen(cPath, "r"); if (!file) - return NO; + return nil; } xmlParserCtxtPtr ctx = xmlCreatePushParserCtxt(&SAXHandler, self, NULL, 0, NULL); @@ -143,7 +144,7 @@ - (BOOL)parse:(NSError **)outError { { if (!ctx) { fclose(file); - return NO; + return nil; } } @@ -182,7 +183,10 @@ - (BOOL)parse:(NSError **)outError { _failed = TRUE; } - return !_failed; + if( _failed ) + return nil; + else + return _rootNode; } /** ADAM: use this for a higher-performance, *non-blocking* parse @@ -308,6 +312,7 @@ - (void)handleEndElement:(NSString *)name { NSObject* parserHandlingTheParentItem = parentStackItem.parserForThisItem; + BOOL closingRootTag = FALSE; if( parentStackItem.item == nil ) { /** @@ -318,6 +323,7 @@ - (void)handleEndElement:(NSString *)name { tag has been reached */ + closingRootTag = TRUE; parserHandlingTheParentItem = stackItem.parserForThisItem; } @@ -330,6 +336,11 @@ - (void)handleEndElement:(NSString *)name { [_storedChars setString:@""]; _storingChars = NO; } + + if( closingRootTag ) + { + _rootNode = (SVGElement*) stackItem.item; + } } } diff --git a/Core/SVGSVGElement.m b/Core/SVGSVGElement.m index 68d461abc..6a8ef4f7a 100644 --- a/Core/SVGSVGElement.m +++ b/Core/SVGSVGElement.m @@ -2,6 +2,12 @@ #import "CALayerWithChildHitTest.h" +@interface SVGSVGElement() +@property (nonatomic, readwrite) SVGLength documentWidth; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? +@property (nonatomic, readwrite) SVGLength documentHeight; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? +@property (nonatomic, readwrite) CGRect viewBoxFrame; // FIXME: maybe can be merged with SVGElement ? +@end + @implementation SVGSVGElement @synthesize documentWidth; @@ -23,11 +29,11 @@ - (void)parseAttributes:(NSDictionary *)attributes { id value = nil; if ((value = [attributes objectForKey:@"width"])) { - documentWidth = SVGLengthFromNSString( value ); + self.documentWidth = SVGLengthFromNSString( value ); } if ((value = [attributes objectForKey:@"height"])) { - documentHeight = SVGLengthFromNSString( value ); + self.documentHeight = SVGLengthFromNSString( value ); } if( (value = [attributes objectForKey:@"viewBox"])) { From 78e15ae32b3553f33376d144aaccde7e999fc314 Mon Sep 17 00:00:00 2001 From: james pollock Date: Sun, 6 May 2012 18:32:29 +0100 Subject: [PATCH 007/110] commented out macros macros that were markers for adamgit but were breaking compile on other computers --- Core/SVGImage.h | 6 +++--- Core/SVGImage.m | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Core/SVGImage.h b/Core/SVGImage.h index c7dcdbcf3..cc0e7d293 100644 --- a/Core/SVGImage.h +++ b/Core/SVGImage.h @@ -86,9 +86,9 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * la - (void)drawAsPatternInRect:(CGRect)rect; // draws the image as a CGPattern // animated images. When set as UIImageView.image, animation will play in an infinite loop until removed. Drawing will render the first image -+ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // read sequnce of files with suffix starting at 0 or 1 -+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // squence of files -+ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); ++ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); read sequnce of files with suffix starting at 0 or 1 ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // squence of files ++ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); /** diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 60cd085de..26f9f4a51 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -191,17 +191,17 @@ - (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } -+ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 ++ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) ++ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; From 91463ecdedf3acf92f49d3713edb8a73f050d314 Mon Sep 17 00:00:00 2001 From: james pollock Date: Sun, 6 May 2012 20:14:16 +0100 Subject: [PATCH 008/110] added conditional for SVGBasicDataTypes now only imports UIKit if target os is ios --- Core/SVGBasicDataTypes.h | 5 +++++ Core/SVGImage.m | 6 +++--- XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Core/SVGBasicDataTypes.h b/Core/SVGBasicDataTypes.h index e9bc4fb49..67ecaa093 100644 --- a/Core/SVGBasicDataTypes.h +++ b/Core/SVGBasicDataTypes.h @@ -10,8 +10,13 @@ #import +#if TARGET_OS_IPHONE + #import +#endif + + /** http://www.w3.org/TR/SVG11/types.html#InterfaceSVGLength diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 26f9f4a51..60cd085de 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -191,17 +191,17 @@ - (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } -+ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 ++ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) ++ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index e7da546d4..60e9c5182 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -569,7 +569,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0420; + LastUpgradeCheck = 0430; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "SVGKit" */; compatibilityVersion = "Xcode 3.2"; From 6c4f53079e02444faaa0005081cef9a3d15585dd Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 8 May 2012 15:29:18 +0100 Subject: [PATCH 009/110] Major re-write of the front end to the parser: parser is now cleaner, simpler, and reports Errors in a clearer manner SVGPad demo project has been updated to report fatal errors with a popup STRANGELY, some of our previously-working SVG's are now failing with an error that seems incorrect - bug in the refactoring? --- Core/SVGDocument.m | 30 --- Core/SVGElement.h | 2 - Core/SVGImage.h | 9 +- Core/SVGImage.m | 55 +++-- Core/SVGKit.h | 5 +- Core/SVGParseResult.h | 20 ++ Core/SVGParseResult.m | 49 +++++ Core/SVGParser.h | 40 ++-- Core/SVGParser.m | 200 +++++++----------- Core/SVGParserExtension.h | 6 +- Core/SVGParserSVG.m | 8 +- Core/{SVGDocument.h => SVGSource.h} | 19 +- Core/SVGSource.m | 130 ++++++++++++ Mac/SVGView.h | 6 +- Mac/SVGView.m | 8 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 34 +-- .../SVGPadDemo/Classes/DetailViewController.m | 31 ++- .../SVGPad.xcodeproj/project.pbxproj | 22 +- 18 files changed, 422 insertions(+), 252 deletions(-) delete mode 100644 Core/SVGDocument.m create mode 100644 Core/SVGParseResult.h create mode 100644 Core/SVGParseResult.m rename Core/{SVGDocument.h => SVGSource.h} (65%) create mode 100644 Core/SVGSource.m diff --git a/Core/SVGDocument.m b/Core/SVGDocument.m deleted file mode 100644 index 1e803e52b..000000000 --- a/Core/SVGDocument.m +++ /dev/null @@ -1,30 +0,0 @@ - -#import "SVGDocument.h" - -@implementation SVGDocument - -@synthesize svgLanguageVersion; -@synthesize hasSourceFile, hasSourceURL; -@synthesize filePath, URL; - -+(SVGDocument*) documentFromFilename:(NSString*) p -{ - SVGDocument* d = [[[SVGDocument alloc] init] autorelease]; - - d.hasSourceFile = TRUE; - d.filePath = p; - - return d; -} - -+(SVGDocument*) documentFromURL:(NSURL*) u -{ - SVGDocument* d = [[[SVGDocument alloc] init] autorelease]; - - d.hasSourceURL = TRUE; - d.URL = u; - - return d; -} - -@end diff --git a/Core/SVGElement.h b/Core/SVGElement.h index 4b80a9cf9..be98409d7 100644 --- a/Core/SVGElement.h +++ b/Core/SVGElement.h @@ -11,8 +11,6 @@ */ #import -@class SVGDocument; - #define EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES 1 @interface SVGElement : NSObject { diff --git a/Core/SVGImage.h b/Core/SVGImage.h index c7dcdbcf3..085ddfa57 100644 --- a/Core/SVGImage.h +++ b/Core/SVGImage.h @@ -26,10 +26,10 @@ #import "SVGBasicDataTypes.h" #import "SVGElement.h" #import "SVGSVGElement.h" - #import "SVGGroupElement.h" #import "SVGParser.h" +#import "SVGSource.h" #if NS_BLOCKS_AVAILABLE typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); @@ -37,7 +37,7 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * la @class SVGDefsElement; -@interface SVGImage : NSObject /** Apple made it effectively impossible to extend UIImage: it is immutable */ +@interface SVGImage : NSObject // doesn't extend UIImage because Apple made UIImage immutable { } @@ -47,6 +47,8 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * la @property (nonatomic, readonly) SVGLength svgWidth; @property (nonatomic, readonly) SVGLength svgHeight; +@property (nonatomic, readonly) SVGSource* source; +@property (nonatomic, readonly) SVGParseResult* parseErrorsAndWarnings; // convenience accessors to parsed children @property (nonatomic, readonly) NSString *title; @@ -55,8 +57,9 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * la @property (nonatomic, readonly) SVGSVGElement* rootElement; -+ (SVGImage *)imageNamed:(NSString *)name; // load from main bundle +#pragma mark - methods to quick load an SVG as an image ++ (SVGImage *)imageNamed:(NSString *)name; // load from main bundle + (SVGImage *)imageWithContentsOfFile:(NSString *)path; + (SVGImage *)imageWithData:(NSData *)data; diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 60cd085de..f189cffaf 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -21,6 +21,7 @@ - (SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error; @property (nonatomic, readwrite) SVGSVGElement* rootElement; @property (nonatomic, readwrite) SVGLength svgWidth; @property (nonatomic, readwrite) SVGLength svgHeight; +@property (nonatomic, readwrite) SVGParseResult* parseErrorsAndWarnings; #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods @@ -33,11 +34,12 @@ @implementation SVGImage @synthesize svgWidth = _width; @synthesize svgHeight = _height; +@synthesize source; +@synthesize parseErrorsAndWarnings; @synthesize rootElement = _rootElement; @dynamic title, svgDescription, defs; - + (SVGImage *)imageNamed:(NSString *)name { NSParameterAssert(name != nil); @@ -83,15 +85,15 @@ - (id)initWithContentsOfFile:(NSString *)aPath { NSError* parseError = nil; self.rootElement = [self parseFileAtPath:aPath error:&parseError]; + if ( self.rootElement == nil ) { - NSLog(@"[%@] MISSING OR CORRUPT FILE, OR FILE USES FEATURES THAT SVGKit DOES NOT YET SUPPORT, COULD NOT CREATE DOCUMENT: path = %@, error = %@", [self class], aPath, parseError); - [self release]; - return nil; + } + else { + self.svgWidth = self.rootElement.documentWidth; + self.svgHeight = self.rootElement.documentHeight; } - self.svgWidth = self.rootElement.documentWidth; - self.svgHeight = self.rootElement.documentHeight; } return self; @@ -107,10 +109,12 @@ - (id)initWithContentsOfURL:(NSURL *)url { self.rootElement = [self parseFileAtURL:url]; if ( self.rootElement == nil ) { - NSLog(@"[%@] ERROR: COULD NOT FIND SVG AT URL = %@", [self class], url); - [self release]; - return nil; + } + else + { + self.svgWidth = self.rootElement.documentWidth; + self.svgHeight = self.rootElement.documentHeight; } } return self; @@ -180,7 +184,7 @@ - (void)drawInRect:(CGRect)rect { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } -- (void)drawInRect:(CGRect)rect blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha + - (void)drawInRect:(CGRect)rect blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } @@ -210,18 +214,13 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { - SVGDocument* parsedDocument = [SVGDocument documentFromFilename:aPath]; - SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:parsedDocument]; + SVGSource* parsedDocument = [SVGSource sourceFromFilename:aPath]; + self.parseErrorsAndWarnings = [SVGParser parseSourceUsingDefaultSVGParser:parsedDocument]; - SVGSVGElement* rootNode = (SVGSVGElement*) [defaultParser parse:error]; - if ( rootNode == nil ) { - NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); - [defaultParser release]; - + if( parseErrorsAndWarnings.rootOfSVGTree != nil ) + return (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; + else return nil; - } - - return rootNode; } - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath { @@ -230,19 +229,13 @@ - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath { -(SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error { - SVGParser* defaultParser = [SVGParser parserPlainSVGDocument:[SVGDocument documentFromURL:url]]; + SVGSource* parsedDocument = [SVGSource sourceFromURL:url]; + self.parseErrorsAndWarnings = [SVGParser parseSourceUsingDefaultSVGParser:parsedDocument]; - SVGSVGElement* rootNode = (SVGSVGElement*) [defaultParser parse:error]; - if ( rootNode == nil ) { - NSLog(@"[%@] SVGKit Parse error: %@", [self class], *error); - [defaultParser release]; - + if( parseErrorsAndWarnings.rootOfSVGTree != nil ) + return (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; + else return nil; - } - - [defaultParser release]; - - return rootNode; } -(SVGSVGElement*)parseFileAtURL:(NSURL *)url { diff --git a/Core/SVGKit.h b/Core/SVGKit.h index 669a6f7f5..afdac8d66 100644 --- a/Core/SVGKit.h +++ b/Core/SVGKit.h @@ -23,6 +23,7 @@ #import "SVGPolylineElement.h" #import "SVGRectElement.h" #import "SVGShapeElement.h" +#import "SVGSource.h" #import "SVGTitleElement.h" #import "SVGUtils.h" #import "SVGView.h" @@ -32,8 +33,8 @@ #import #import #import - #import - #import + #import + #import #import #import #import diff --git a/Core/SVGParseResult.h b/Core/SVGParseResult.h new file mode 100644 index 000000000..50dd5db02 --- /dev/null +++ b/Core/SVGParseResult.h @@ -0,0 +1,20 @@ +/** + Reports detailed information from an attempted run of the SVG Parser + */ +#import + +#import "SVGElement.h" + +@interface SVGParseResult : NSObject + +@property(nonatomic, retain) NSMutableArray* warnings, * errorsRecoverable, * errorsFatal; +@property(nonatomic) BOOL libXMLFailed; + +@property(nonatomic,retain) SVGElement* rootOfSVGTree; + +-(void) addSourceError:(NSError*) fatalError; +-(void) addParseWarning:(NSError*) warning; +-(void) addParseErrorRecoverable:(NSError*) recoverableError; +-(void) addParseErrorFatal:(NSError*) fatalError; +-(void) addSAXError:(NSError*) saxError; +@end diff --git a/Core/SVGParseResult.m b/Core/SVGParseResult.m new file mode 100644 index 000000000..b164fe619 --- /dev/null +++ b/Core/SVGParseResult.m @@ -0,0 +1,49 @@ +#import "SVGParseResult.h" + +@implementation SVGParseResult + +@synthesize libXMLFailed; +@synthesize rootOfSVGTree; +@synthesize warnings, errorsRecoverable, errorsFatal; + +- (id)init +{ + self = [super init]; + if (self) { + self.warnings = [NSMutableArray array]; + self.errorsRecoverable = [NSMutableArray array]; + self.errorsFatal = [NSMutableArray array]; + } + return self; +} +-(void) addSourceError:(NSError*) fatalError +{ + NSLog(@"[%@] SVG ERROR: %@", [self class], fatalError); + [self.errorsRecoverable addObject:fatalError]; +} + +-(void) addParseWarning:(NSError*) warning +{ + NSLog(@"[%@] SVG WARNING: %@", [self class], warning); + [self.warnings addObject:warning]; +} + +-(void) addParseErrorRecoverable:(NSError*) recoverableError +{ + NSLog(@"[%@] SVG WARNING (recoverable): %@", [self class], recoverableError); + [self.errorsRecoverable addObject:recoverableError]; +} + +-(void) addParseErrorFatal:(NSError*) fatalError +{ + NSLog(@"[%@] SVG ERROR: %@", [self class], fatalError); + [self.errorsFatal addObject:fatalError]; +} + +-(void) addSAXError:(NSError*) saxError +{ + NSLog(@"[%@] SVG ERROR: %@", [self class], [saxError localizedDescription]); + [self.errorsFatal addObject:saxError]; +} + +@end diff --git a/Core/SVGParser.h b/Core/SVGParser.h index 4e9e6f4c4..b545d9ce5 100644 --- a/Core/SVGParser.h +++ b/Core/SVGParser.h @@ -22,48 +22,64 @@ #import +#import "SVGSource.h" +#import "SVGParseResult.h" + #import "SVGParserExtension.h" #import "SVGElement.h" + + /*! RECOMMENDED: leave this set to 1 to get warnings about "legal, but poorly written" SVG */ #define PARSER_WARN_FOR_ANONYMOUS_SVG_G_TAGS 1 /*! Verbose parser logging - ONLY needed if you have an SVG file that's failing to load / crashing */ #define DEBUG_VERBOSE_LOG_EVERY_TAG 0 -@class SVGDocument; - @interface SVGParser : NSObject { @private - NSString *_path; - BOOL _failed; BOOL _storingChars; NSMutableString *_storedChars; NSMutableArray *_elementStack; + + /* + ADAM OLD - removing? + BOOL _failed; + NSString *_path; + SVGElement *_rootNode; #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR - SVGDocument *_document; + SVGSource *_document; #else - __weak SVGDocument *_document; // TODO: should this still be weak? probably not? + __weak SVGSource *_document; // TODO: should this still be weak? probably not? #endif NSError* errorForCurrentParse; + */ } -@property(nonatomic,retain) NSURL* sourceURL; +@property(nonatomic,retain) SVGSource* source; +@property(nonatomic,retain) SVGParseResult* currentParseRun; + @property(nonatomic,retain) NSMutableArray* parserExtensions; -@property(nonatomic, retain) NSMutableArray* parseWarnings; +#pragma mark - NEW + ++ (SVGParseResult*) parseSourceUsingDefaultSVGParser:(SVGSource*) source; +- (SVGParseResult*) parseSynchronously; + + ++(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css; -+(SVGParser*) parserPlainSVGDocument:(SVGDocument*) document; -- (id)initWithDocument:(SVGDocument *)doc; + +#pragma mark - OLD - POTENTIALLY DELETE THESE ONCE THEY'VE ALL BEEN CHECKED AND CONVERTED + +- (id)initWithSource:(SVGSource *)doc; - (void) addSVGParserExtension:(NSObject*) extension; -- (SVGElement*)parse:(NSError **)outError; -+(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css; @end diff --git a/Core/SVGParser.m b/Core/SVGParser.m index 0a881f7cc..c44974543 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -6,11 +6,8 @@ // #import "SVGParser.h" - #import -#import "SVGDocument.h" - #import "SVGParserSVG.h" @interface SVGParserStackItem : NSObject @@ -34,9 +31,11 @@ - (void) dealloc @implementation SVGParser -@synthesize sourceURL; +@synthesize source; +@synthesize currentParseRun; + + @synthesize parserExtensions; -@synthesize parseWarnings; static xmlSAXHandler SAXHandler; @@ -48,45 +47,38 @@ @implementation SVGParser static NSString *NSStringFromLibxmlString (const xmlChar *string); static NSMutableDictionary *NSDictionaryFromLibxmlAttributes (const xmlChar **attrs, int attr_ct); -+(SVGParser*) parserPlainSVGDocument:(SVGDocument*) document ++ (SVGParseResult*) parseSourceUsingDefaultSVGParser:(SVGSource*) source; { - SVGParser *parser = [[[SVGParser alloc] initWithDocument:document] autorelease]; + SVGParser *parser = [[[SVGParser alloc] initWithSource:source] autorelease]; SVGParserSVG *subParserSVG = [[[SVGParserSVG alloc] init] autorelease]; [parser.parserExtensions addObject:subParserSVG]; - return parser; + SVGParseResult* result = [parser parseSynchronously]; + + return result; } + #define READ_CHUNK_SZ 1024*10 -- (id)initWithDocument:(SVGDocument *)doc { +- (id)initWithSource:(SVGSource *) s { self = [super init]; if (self) { - self.parseWarnings = [NSMutableArray array]; self.parserExtensions = [NSMutableArray array]; - _document = doc; - if( _document.hasSourceFile ) - { - _path = [doc.filePath copy]; - } - else if( _document.hasSourceURL ) - { - self.sourceURL = doc.URL; - } + self.source = s; _storedChars = [NSMutableString new]; _elementStack = [NSMutableArray new]; - _failed = NO; - } return self; } - (void)dealloc { - [_path release]; + self.currentParseRun = nil; + self.source = nil; [_storedChars release]; [_elementStack release]; self.parserExtensions = nil; @@ -103,90 +95,60 @@ - (void) addSVGParserExtension:(NSObject*) extension [self.parserExtensions addObject:extension]; } -- (SVGElement*)parse:(NSError **)outError { - errorForCurrentParse = nil; - [self.parseWarnings removeAllObjects]; - _rootNode = nil; - - /** - Is this file being loaded from disk? - Or from network? - */ - NSURLResponse* response; - NSData* httpData = nil; - if( self.sourceURL != nil ) - { - NSURLRequest* request = [NSURLRequest requestWithURL:self.sourceURL]; - NSError* error = nil; - - httpData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; - - if( error != nil ) - { - NSLog( @"[%@] ERROR: failed to parse SVG from URL, because failed to download file at URL = %@, error = %@", [self class], self.sourceURL, error ); - return nil; - } - } - - FILE *file; - if( self.sourceURL == nil ) +- (SVGParseResult*) parseSynchronously +{ + self.currentParseRun = [[SVGParseResult new] autorelease]; + + /* + // 1. while (source has chunks of BYTES) + // 2. read a chunk from source, send to libxml + // 3. if libxml failed chunk, break + // 4. return result + */ + + NSError* error = nil; + id handle = [source newHandle:&error]; + if( error != nil ) { - const char *cPath = [_path fileSystemRepresentation]; - file = fopen(cPath, "r"); - - if (!file) - return nil; + [currentParseRun addSourceError:error]; + return currentParseRun; } + char buff[READ_CHUNK_SZ]; xmlParserCtxtPtr ctx = xmlCreatePushParserCtxt(&SAXHandler, self, NULL, 0, NULL); - if( self.sourceURL == nil ) - { - if (!ctx) { - fclose(file); - return nil; - } - } - - if( self.sourceURL == nil ) + if( ctx ) // if libxml init succeeds... { - size_t read = 0; - char buff[READ_CHUNK_SZ]; - while ((read = fread(buff, 1, READ_CHUNK_SZ, file)) > 0) { - if (xmlParseChunk(ctx, buff, read, 0) != 0) { - _failed = YES; - NSLog(@"An error occured while parsing the current XML chunk"); + // 1. while (source has chunks of BYTES) + // 2. read a chunk from source, send to libxml + int bytesRead = [source handle:handle readNextChunk:&buff maxBytes:READ_CHUNK_SZ]; + while( bytesRead > 0 ) + { + int libXmlParserParseError = xmlParseChunk(ctx, buff, bytesRead, 0); - break; - } - } - - fclose(file); - } - else - { - if (xmlParseChunk(ctx, (const char*) [httpData bytes], [httpData length], 0) != 0) { - _failed = YES; -// NSLog(@"An error occured while parsing the current XML chunk"); + if( [currentParseRun.errorsFatal count] > 0 ) + { + /** NB this old code is no longer needed - we're doing higher-quality error handling! + if ( (libXmlParserParseError != 0) + {*/ + // 3. if libxml failed chunk, break + NSLog(@"[%@] libXml reported internal parser error with magic libxml code = %i (look this up on http://xmlsoft.org/html/libxml-xmlerror.html#xmlParserErrors)", [self class], libXmlParserParseError ); + currentParseRun.libXMLFailed = YES; + break; + } } } - if (!_failed) + [source closeHandle:handle]; // close the handle NO MATTER WHAT + + if (!currentParseRun.libXMLFailed) xmlParseChunk(ctx, NULL, 0, 1); // EOF xmlFreeParserCtxt(ctx); - if( errorForCurrentParse != nil ) - { - *outError = errorForCurrentParse; - _failed = TRUE; - } - - if( _failed ) - return nil; - else - return _rootNode; + // 4. return result + return currentParseRun; } /** ADAM: use this for a higher-performance, *non-blocking* parse @@ -210,7 +172,7 @@ - (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes: { NSObject* subParserResult = nil; - if( nil != (subParserResult = [subParser handleStartElement:name document:_document xmlns:prefix attributes:attributes]) ) + if( nil != (subParserResult = [subParser handleStartElement:name document:source xmlns:prefix attributes:attributes]) ) { NSLog(@"[%@] tag: <%@:%@> -- handled by subParser: %@", [self class], prefix, name, subParser ); @@ -328,7 +290,7 @@ - (void)handleEndElement:(NSString *)name { } NSLog(@"[%@] DEBUG-PARSER: ended tag (): telling parser (%@) to add that item to tree-parent = %@", [self class], name, parserHandlingTheParentItem, parentStackItem.item ); - [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item inDocument:_document]; + [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item];// inDocument:_document]; if ( [stackItem.parserForThisItem createdItemShouldStoreContent:stackItem.item]) { [stackItem.parserForThisItem parseContent:_storedChars forItem:stackItem.item]; @@ -339,7 +301,7 @@ - (void)handleEndElement:(NSString *)name { if( closingRootTag ) { - _rootNode = (SVGElement*) stackItem.item; + currentParseRun.rootOfSVGTree = (SVGElement*) stackItem.item; } } } @@ -364,23 +326,12 @@ static void charactersFoundSAX (void *ctx, const xmlChar *chars, int len) { [self handleFoundCharacters:chars length:len]; } --(void) setParseError:(NSError*) error -{ - errorForCurrentParse = error; -} - --(void) addParseWarning:(NSError*) error -{ - errorForCurrentParse = error; -} - -- (void)handleError { - _failed = YES; -} - static void errorEncounteredSAX (void *ctx, const char *msg, ...) { NSLog(@"Error encountered during parse: %s", msg); - [ (SVGParser *) ctx handleError]; + SVGParseResult* parseResult = ((SVGParser*) ctx).currentParseRun; + [parseResult addSAXError:[NSError errorWithDomain:@"SVG-SAX" code:1 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + (NSString*) msg, NSLocalizedDescriptionKey, + nil]]]; } static void unparsedEntityDeclaration(void * ctx, @@ -402,24 +353,37 @@ static void structuredError (void * userData, */ xmlErrorLevel errorLevel = error->level; - NSError* objcError = [NSError errorWithDomain:[[NSNumber numberWithInt:error->domain] stringValue] code:error->code userInfo:[NSDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithCString:error->message encoding:NSUTF8StringEncoding], NSLocalizedDescriptionKey, - [NSNumber numberWithInt:error->line], @"lineNumber", - nil] - ]; + NSMutableDictionary* details = [NSMutableDictionary dictionaryWithObjectsAndKeys: + [NSString stringWithCString:error->message encoding:NSUTF8StringEncoding], NSLocalizedDescriptionKey, + [NSNumber numberWithInt:error->line], @"lineNumber", + [NSNumber numberWithInt:error->int2], @"columnNumber", + nil]; + + if( error->str1 ) + [details setValue:[NSString stringWithCString:error->str1 encoding:NSUTF8StringEncoding] forKey:@"bonusInfo1"]; + if( error->str2 ) + [details setValue:[NSString stringWithCString:error->str2 encoding:NSUTF8StringEncoding] forKey:@"bonusInfo2"]; + if( error->str3 ) + [details setValue:[NSString stringWithCString:error->str3 encoding:NSUTF8StringEncoding] forKey:@"bonusInfo3"]; + + NSError* objcError = [NSError errorWithDomain:[[NSNumber numberWithInt:error->domain] stringValue] code:error->code userInfo:details]; + SVGParseResult* parseResult = ((SVGParser*) userData).currentParseRun; switch( errorLevel ) { case XML_ERR_WARNING: { - NSLog(@"Warning: parser reports: %@", objcError ); + [parseResult addParseWarning:objcError]; + }break; + + case XML_ERR_ERROR: + { + [parseResult addParseErrorRecoverable:objcError]; }break; - case XML_ERR_ERROR: /** FIXME: ADAM: "non-fatal" errors should be reported as warnings, but SVGDocument + this class need rewriting to return something better than "TRUE/FALSE" on parse finishing */ case XML_ERR_FATAL: { - NSLog(@"Error: parser reports: %@", objcError ); - [(SVGParser*) userData setParseError:objcError]; + [parseResult addParseErrorFatal:objcError]; } default: break; diff --git a/Core/SVGParserExtension.h b/Core/SVGParserExtension.h index 37f7eda10..211183020 100644 --- a/Core/SVGParserExtension.h +++ b/Core/SVGParserExtension.h @@ -14,7 +14,7 @@ #import -#import "SVGDocument.h" +#import "SVGSource.h" @protocol SVGParserExtension @@ -30,8 +30,8 @@ */ -(NSArray*) supportedTags; -- (NSObject*)handleStartElement:(NSString *)name document:(SVGDocument*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent inDocument:(SVGDocument*) svgDocument; +- (NSObject*)handleStartElement:(NSString *)name document:(SVGSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent;// NOT SURE IF THIS IS NEEDED ANYWHERE ANY MORE: inDocument:(SVGSource*) svgSource; -(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; -(BOOL) createdItemShouldStoreContent:(NSObject*) item; diff --git a/Core/SVGParserSVG.m b/Core/SVGParserSVG.m index 103c84481..4154e4f64 100644 --- a/Core/SVGParserSVG.m +++ b/Core/SVGParserSVG.m @@ -4,7 +4,7 @@ #import "SVGCircleElement.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" -//#import "SVGDocument.h" +//#import "SVGSource.h" #import "SVGEllipseElement.h" #import "SVGGroupElement.h" #import "SVGImageElement.h" @@ -63,7 +63,7 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } -- (NSObject*) handleStartElement:(NSString *)name document:(SVGDocument*) svgDocument xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { +- (NSObject*) handleStartElement:(NSString *)name document:(SVGSource*) svgSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { if( [[self supportedNamespaces] containsObject:prefix] ) { Class elementClass = [elementMap objectForKey:name]; @@ -88,7 +88,7 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGDocument*) svgDoc { NSString* svgVersion = nil; if ((svgVersion = [attributes objectForKey:@"version"])) { - svgDocument.svgLanguageVersion = svgVersion; + svgSource.svgLanguageVersion = svgVersion; } } @@ -114,7 +114,7 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent inDocument:(SVGDocument*) svgDocument +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent// inDocument:(SVGSource*) svgSource { SVGElement *parentElement = (SVGElement*) parent; diff --git a/Core/SVGDocument.h b/Core/SVGSource.h similarity index 65% rename from Core/SVGDocument.h rename to Core/SVGSource.h index 64d76eb61..f87541b25 100644 --- a/Core/SVGDocument.h +++ b/Core/SVGSource.h @@ -1,10 +1,7 @@ /** - SVGDocument.h - - NB: this is NOTHING SIMILAR to the old SVGDocument class that existed in early versions of SVGKit. This is a complete - re-write. - - SVGDocument represents the info about a file that was read from disk or over the web during parsing. + SVGSource.h + + SVGSource represents the info about a file that was read from disk or over the web during parsing. Once it has been parsed / loaded, that info is NOT PART OF the in-memory SVG any more - if you were to save the file, you could save it in a different location, with a different SVG Spec, etc. @@ -18,14 +15,18 @@ #import -@interface SVGDocument : NSObject +@interface SVGSource : NSObject @property(nonatomic,retain) NSString* svgLanguageVersion; /*< */ @property(nonatomic) BOOL hasSourceFile, hasSourceURL; @property(nonatomic,retain) NSString* filePath; @property(nonatomic,retain) NSURL* URL; -+(SVGDocument*) documentFromFilename:(NSString*) p; -+(SVGDocument*) documentFromURL:(NSURL*) u; ++(SVGSource*) sourceFromFilename:(NSString*) p; ++(SVGSource*) sourceFromURL:(NSURL*) u; + +-(id) newHandle:(NSError**) error; +-(void) closeHandle:(id) handle; +-(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ; @end diff --git a/Core/SVGSource.m b/Core/SVGSource.m new file mode 100644 index 000000000..daf9a7b99 --- /dev/null +++ b/Core/SVGSource.m @@ -0,0 +1,130 @@ + +#import "SVGSource.h" + +@implementation SVGSource + +@synthesize svgLanguageVersion; +@synthesize hasSourceFile, hasSourceURL; +@synthesize filePath, URL; + ++(SVGSource*) sourceFromFilename:(NSString*) p +{ + SVGSource* d = [[[SVGSource alloc] init] autorelease]; + + d.hasSourceFile = TRUE; + d.filePath = p; + + return d; +} + ++(SVGSource*) sourceFromURL:(NSURL*) u +{ + SVGSource* d = [[[SVGSource alloc] init] autorelease]; + + d.hasSourceURL = TRUE; + d.URL = u; + + return d; +} + +-(id) newHandle:(NSError**) error +{ + /** + Is this file being loaded from disk? + Or from network? + */ + if( self.hasSourceURL ) + { + /** + NB: + + Currently reads the ENTIRE web file synchronously, holding the entire + thing in memory. + + Not efficient, might crash for 'huge' files (would need to be large numbers of megabytes, though) + + But ... since we want a synchronous parse ... + */ + NSURLResponse* response; + NSData* httpData = nil; + + NSURLRequest* request = [NSURLRequest requestWithURL:self.URL]; + + httpData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error]; + + if( error != nil ) + { + NSLog( @"[%@] ERROR: failed to parse SVG from URL, because failed to download file at URL = %@, error = %@", [self class], self.URL, error ); + return nil; + } + + return httpData; + } + else + { + FILE *file; + const char *cPath = [self.filePath fileSystemRepresentation]; + file = fopen(cPath, "r"); + + if (!file) + *error = [NSError errorWithDomain:@"SVGKit" code:1 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + [NSString stringWithFormat:@"Couldn't open the file %@ for reading", self.filePath], NSLocalizedDescriptionKey, + nil]]; + + return [NSValue valueWithPointer:file]; // objc cannot cope with using C-pointers as pointers, without some help + } + +} + +-(void) closeHandle:(id) handle +{ + /** + Is this file being loaded from disk? + Or from network? + */ + if( self.hasSourceURL ) + { + // nothing needed - the asynch call was already complete + } + else + { + FILE *file = [handle pointerValue]; // objc cannot cope with using C-pointers as pointers, without some help + + fclose(file); + } +} + +-(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ +{ + /** + Is this file being loaded from disk? + Or from network? + */ + if( self.hasSourceURL ) + { + NSData* httpData = handle; + const char* dataAsBytes = [httpData bytes]; + int dataLength = [httpData length]; + + int actualBytesCopied = MIN( dataLength, READ_CHUNK_SZ ); + memcpy( chunk, dataAsBytes, actualBytesCopied); + + /** trim the copied bytes out of the 'handle' NSData object */ + NSRange newRange = { actualBytesCopied, dataLength - actualBytesCopied }; + handle = [httpData subdataWithRange:newRange]; + + return actualBytesCopied; + } + else + { + size_t bytesRead = 0; + FILE *file = [handle pointerValue]; // objc cannot cope with using C-pointers as pointers, without some help + + bytesRead = fread(chunk, 1, READ_CHUNK_SZ, file); + + return bytesRead; + } +} + + +@end diff --git a/Mac/SVGView.h b/Mac/SVGView.h index 46cb81535..2c03a25be 100644 --- a/Mac/SVGView.h +++ b/Mac/SVGView.h @@ -5,12 +5,12 @@ // Copyright Matt Rajca 2010-2011. All rights reserved. // -@class SVGDocument; +@class SVGSource; @interface SVGView : NSView { } -@property (nonatomic, retain) SVGDocument *document; +@property (nonatomic, retain) SVGSource *document; -- (id)initWithDocument:(SVGDocument *)document; // set frame to position +- (id)initWithDocument:(SVGSource *)document; // set frame to position @end diff --git a/Mac/SVGView.m b/Mac/SVGView.m index fb60c0060..4bbed8363 100644 --- a/Mac/SVGView.m +++ b/Mac/SVGView.m @@ -7,14 +7,14 @@ #import "SVGView.h" -#import "SVGDocument.h" -#import "SVGDocument+CA.h" +#import "SVGSource.h" +#import "SVGImage+CA.h" @implementation SVGView @synthesize document = _document; -- (id)initWithDocument:(SVGDocument *)document { +- (id)initWithDocument:(SVGSource *)document { NSParameterAssert(document != nil); self = [self initWithFrame:NSMakeRect(0.0f, 0.0f, document.width, document.height)]; @@ -34,7 +34,7 @@ - (void)dealloc { [super dealloc]; } -- (void)setDocument:(SVGDocument *)aDocument { +- (void)setDocument:(SVGSource *)aDocument { [aDocument retain]; [_document release]; if (_document != nil) { diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index e7da546d4..0a1161005 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -43,10 +43,10 @@ 66B79B1A15475254002F99FF /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */; }; 66B79B1B15475254002F99FF /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */; }; 66B79B1C15475254002F99FF /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */; }; - 66B79B1D15475254002F99FF /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGDocument.h */; }; - 66B79B1E15475254002F99FF /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGDocument.h */; }; - 66B79B1F15475254002F99FF /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGDocument.m */; }; - 66B79B2015475254002F99FF /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGDocument.m */; }; + 66B79B1D15475254002F99FF /* SVGSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGSource.h */; }; + 66B79B1E15475254002F99FF /* SVGSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGSource.h */; }; + 66B79B1F15475254002F99FF /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGSource.m */; }; + 66B79B2015475254002F99FF /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGSource.m */; }; 66B79B2115475254002F99FF /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADF15475254002F99FF /* SVGElement.h */; }; 66B79B2215475254002F99FF /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADF15475254002F99FF /* SVGElement.h */; }; 66B79B2315475254002F99FF /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE015475254002F99FF /* SVGElement.m */; }; @@ -132,6 +132,9 @@ 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B76154752EB002F99FF /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 66B79B75154752EB002F99FF /* libxml2.dylib */; }; + 66EB2218155946A600DE5844 /* SVGParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 66EB2216155946A500DE5844 /* SVGParseResult.h */; }; + 66EB2219155946A600DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; + 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; C9379C5A12777AEC00B0589E /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = C9379C5812777AEC00B0589E /* SVGView.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -168,8 +171,8 @@ 66B79ADA15475254002F99FF /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 66B79ADD15475254002F99FF /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 66B79ADE15475254002F99FF /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 66B79ADD15475254002F99FF /* SVGSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSource.h; sourceTree = ""; }; + 66B79ADE15475254002F99FF /* SVGSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSource.m; sourceTree = ""; }; 66B79ADF15475254002F99FF /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; 66B79AE015475254002F99FF /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; 66B79AE115475254002F99FF /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; @@ -213,6 +216,8 @@ 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; 66B79B75154752EB002F99FF /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libxml2.dylib; sourceTree = DEVELOPER_DIR; }; + 66EB2216155946A500DE5844 /* SVGParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParseResult.h; sourceTree = ""; }; + 66EB2217155946A500DE5844 /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9379C5812777AEC00B0589E /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; @@ -384,8 +389,8 @@ 66B79ADA15475254002F99FF /* SVGDefsElement.m */, 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */, 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */, - 66B79ADD15475254002F99FF /* SVGDocument.h */, - 66B79ADE15475254002F99FF /* SVGDocument.m */, + 66B79ADD15475254002F99FF /* SVGSource.h */, + 66B79ADE15475254002F99FF /* SVGSource.m */, 66B79ADF15475254002F99FF /* SVGElement.h */, 66B79AE015475254002F99FF /* SVGElement.m */, 66B79AE115475254002F99FF /* SVGEllipseElement.h */, @@ -403,6 +408,8 @@ 66B79AED15475254002F99FF /* SVGLineElement.m */, 66B79AEE15475254002F99FF /* SVGParser.h */, 66B79AEF15475254002F99FF /* SVGParser.m */, + 66EB2216155946A500DE5844 /* SVGParseResult.h */, + 66EB2217155946A500DE5844 /* SVGParseResult.m */, 66B79AF015475254002F99FF /* SVGParserExtension.h */, 66B79AF115475254002F99FF /* SVGParserSVG.h */, 66B79AF215475254002F99FF /* SVGParserSVG.m */, @@ -459,7 +466,7 @@ 66B79B1215475254002F99FF /* SVGCircleElement.h in Headers */, 66B79B1615475254002F99FF /* SVGDefsElement.h in Headers */, 66B79B1A15475254002F99FF /* SVGDescriptionElement.h in Headers */, - 66B79B1E15475254002F99FF /* SVGDocument.h in Headers */, + 66B79B1E15475254002F99FF /* SVGSource.h in Headers */, 66B79B2215475254002F99FF /* SVGElement.h in Headers */, 66B79B2615475254002F99FF /* SVGEllipseElement.h in Headers */, 66B79B2A15475254002F99FF /* SVGGroupElement.h in Headers */, @@ -497,7 +504,7 @@ 66B79B1115475254002F99FF /* SVGCircleElement.h in Headers */, 66B79B1515475254002F99FF /* SVGDefsElement.h in Headers */, 66B79B1915475254002F99FF /* SVGDescriptionElement.h in Headers */, - 66B79B1D15475254002F99FF /* SVGDocument.h in Headers */, + 66B79B1D15475254002F99FF /* SVGSource.h in Headers */, 66B79B2115475254002F99FF /* SVGElement.h in Headers */, 66B79B2515475254002F99FF /* SVGEllipseElement.h in Headers */, 66B79B2915475254002F99FF /* SVGGroupElement.h in Headers */, @@ -520,6 +527,7 @@ 66B79B6915475254002F99FF /* SVGTextElement.h in Headers */, 66B79B6D15475254002F99FF /* SVGTitleElement.h in Headers */, 66B79B7115475254002F99FF /* SVGUtils.h in Headers */, + 66EB2218155946A600DE5844 /* SVGParseResult.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -633,7 +641,7 @@ 66B79B1415475254002F99FF /* SVGCircleElement.m in Sources */, 66B79B1815475254002F99FF /* SVGDefsElement.m in Sources */, 66B79B1C15475254002F99FF /* SVGDescriptionElement.m in Sources */, - 66B79B2015475254002F99FF /* SVGDocument.m in Sources */, + 66B79B2015475254002F99FF /* SVGSource.m in Sources */, 66B79B2415475254002F99FF /* SVGElement.m in Sources */, 66B79B2815475254002F99FF /* SVGEllipseElement.m in Sources */, 66B79B2C15475254002F99FF /* SVGGroupElement.m in Sources */, @@ -654,6 +662,7 @@ 66B79B6C15475254002F99FF /* SVGTextElement.m in Sources */, 66B79B7015475254002F99FF /* SVGTitleElement.m in Sources */, 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, + 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -669,7 +678,7 @@ 66B79B1315475254002F99FF /* SVGCircleElement.m in Sources */, 66B79B1715475254002F99FF /* SVGDefsElement.m in Sources */, 66B79B1B15475254002F99FF /* SVGDescriptionElement.m in Sources */, - 66B79B1F15475254002F99FF /* SVGDocument.m in Sources */, + 66B79B1F15475254002F99FF /* SVGSource.m in Sources */, 66B79B2315475254002F99FF /* SVGElement.m in Sources */, 66B79B2715475254002F99FF /* SVGEllipseElement.m in Sources */, 66B79B2B15475254002F99FF /* SVGGroupElement.m in Sources */, @@ -690,6 +699,7 @@ 66B79B6B15475254002F99FF /* SVGTextElement.m in Sources */, 66B79B6F15475254002F99FF /* SVGTitleElement.m in Sources */, 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, + 66EB2219155946A600DE5844 /* SVGParseResult.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m index 5ef471249..c77a0116a 100644 --- a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m +++ b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m @@ -56,19 +56,28 @@ - (void)loadResource:(NSString *)name [self.contentView removeFromSuperview]; SVGImage *document = [SVGImage imageNamed:[name stringByAppendingPathExtension:@"svg"]]; - NSLog(@"[%@] Freshly loaded document (name = %@) has size = %@", [self class], name, NSStringFromCGSize(document.size) ); - self.contentView = [[[SVGView alloc] initWithImage:document] autorelease]; - if (_name) { - [_name release]; - _name = nil; + if( document.parseErrorsAndWarnings.rootOfSVGTree != nil ) + { + NSLog(@"[%@] Freshly loaded document (name = %@) has size = %@", [self class], name, NSStringFromCGSize(document.size) ); + + self.contentView = [[[SVGView alloc] initWithImage:document] autorelease]; + + if (_name) { + [_name release]; + _name = nil; + } + + _name = [name copy]; + + [self.scrollView addSubview:self.contentView]; + [self.scrollView setContentSize: document.size]; + [self.scrollView zoomToRect:CGRectMake(0, 0, document.size.width, document.size.height) animated:YES]; + } + else + { + [[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:[NSString stringWithFormat:@"%i fatal errors, %i warnings. First fatal = %@",[document.parseErrorsAndWarnings.errorsFatal count],[document.parseErrorsAndWarnings.errorsRecoverable count]+[document.parseErrorsAndWarnings.warnings count], ((NSError*)[document.parseErrorsAndWarnings.errorsFatal objectAtIndex:0]).localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; } - - _name = [name copy]; - - [self.scrollView addSubview:self.contentView]; - [self.scrollView setContentSize: document.size]; - [self.scrollView zoomToRect:CGRectMake(0, 0, document.size.width, document.size.height) animated:YES]; } - (IBAction)animate:(id)sender { diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index f0139ffa9..53365168f 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -54,8 +54,9 @@ 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */; }; 663DEFEF14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */; }; 6640BCEB154722FB00AC0AE8 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */; }; - 6640BCEE15472B6F00AC0AE8 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6640BCED15472B6E00AC0AE8 /* SVGDocument.m */; }; 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; + 66799EE715595A9A00DD8BCF /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66799EE315595A9A00DD8BCF /* SVGParseResult.m */; }; + 66799EE815595A9A00DD8BCF /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66799EE515595A9A00DD8BCF /* SVGSource.m */; }; 667DA28415470FDB00BDABCC /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */; }; 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; @@ -146,11 +147,13 @@ 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-Location_European_nation_states-ukonly.svg"; sourceTree = ""; }; 6640BCE9154722FA00AC0AE8 /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 6640BCEC15472B6D00AC0AE8 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 6640BCED15472B6E00AC0AE8 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; 6640BCEF15472D2700AC0AE8 /* SVGParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserExtension.h; sourceTree = ""; }; 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; 66436E5214A0BCEF001CC769 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; + 66799EE315595A9A00DD8BCF /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; + 66799EE415595A9A00DD8BCF /* SVGParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParseResult.h; sourceTree = ""; }; + 66799EE515595A9A00DD8BCF /* SVGSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSource.m; sourceTree = ""; }; + 66799EE615595A9A00DD8BCF /* SVGSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSource.h; sourceTree = ""; }; 667DA28215470FD800BDABCC /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGBasicDataTypes.m; sourceTree = ""; }; 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; @@ -265,20 +268,18 @@ 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */, 3BF503C7148C62D900CC7D17 /* SVGDescriptionElement.h */, 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */, - 6640BCEC15472B6D00AC0AE8 /* SVGDocument.h */, - 6640BCED15472B6E00AC0AE8 /* SVGDocument.m */, 3BF503C9148C62D900CC7D17 /* SVGImage+CA.h */, 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */, 667DA28215470FD800BDABCC /* SVGBasicDataTypes.h */, 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */, - 3BF503CB148C62D900CC7D17 /* SVGImage.h */, - 3BF503CC148C62D900CC7D17 /* SVGImage.m */, 3BF503CE148C62D900CC7D17 /* SVGElement.h */, 3BF503CF148C62D900CC7D17 /* SVGElement.m */, 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */, 3BF503D1148C62D900CC7D17 /* SVGEllipseElement.m */, 3BF503D2148C62D900CC7D17 /* SVGGroupElement.h */, 3BF503D3148C62D900CC7D17 /* SVGGroupElement.m */, + 3BF503CB148C62D900CC7D17 /* SVGImage.h */, + 3BF503CC148C62D900CC7D17 /* SVGImage.m */, 3BF503D4148C62D900CC7D17 /* SVGImageElement.h */, 3BF503D5148C62D900CC7D17 /* SVGImageElement.m */, 3BF503D6148C62D900CC7D17 /* SVGKit.h */, @@ -289,6 +290,8 @@ 6640BCEF15472D2700AC0AE8 /* SVGParserExtension.h */, 3BF503DB148C62D900CC7D17 /* SVGParserSVG.h */, 3BF503DC148C62D900CC7D17 /* SVGParserSVG.m */, + 66799EE315595A9A00DD8BCF /* SVGParseResult.m */, + 66799EE415595A9A00DD8BCF /* SVGParseResult.h */, 3BF503DD148C62D900CC7D17 /* SVGPathElement.h */, 3BF503DE148C62D900CC7D17 /* SVGPathElement.m */, 663C41C4149E638000F546A3 /* SVGPointsAndPathsParser.h */, @@ -303,6 +306,8 @@ 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */, 3BF503E8148C62D900CC7D17 /* SVGShapeElement.h */, 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */, + 66799EE615595A9A00DD8BCF /* SVGSource.h */, + 66799EE515595A9A00DD8BCF /* SVGSource.m */, 6640BCE9154722FA00AC0AE8 /* SVGSVGElement.h */, 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */, 3BF503EA148C62D900CC7D17 /* SVGTextElement.h */, @@ -475,7 +480,8 @@ 663C41C6149E638000F546A3 /* SVGPointsAndPathsParser.m in Sources */, 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */, 6640BCEB154722FB00AC0AE8 /* SVGSVGElement.m in Sources */, - 6640BCEE15472B6F00AC0AE8 /* SVGDocument.m in Sources */, + 66799EE715595A9A00DD8BCF /* SVGParseResult.m in Sources */, + 66799EE815595A9A00DD8BCF /* SVGSource.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 9d607762ed7ff67ed6fafd5a31748eefa68de225 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 8 May 2012 15:42:31 +0100 Subject: [PATCH 010/110] FIXED: bug in last commit. Now all SVGs that previously worked ... work. --- Core/SVGParser.m | 2 ++ Core/SVGSource.m | 1 + 2 files changed, 3 insertions(+) diff --git a/Core/SVGParser.m b/Core/SVGParser.m index c44974543..8c0e7fba0 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -137,6 +137,8 @@ - (SVGParseResult*) parseSynchronously break; } + + bytesRead = [source handle:handle readNextChunk:&buff maxBytes:READ_CHUNK_SZ]; } } diff --git a/Core/SVGSource.m b/Core/SVGSource.m index daf9a7b99..5da0e64aa 100644 --- a/Core/SVGSource.m +++ b/Core/SVGSource.m @@ -121,6 +121,7 @@ -(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK FILE *file = [handle pointerValue]; // objc cannot cope with using C-pointers as pointers, without some help bytesRead = fread(chunk, 1, READ_CHUNK_SZ, file); + NSLog(@"Read %i bytes from file", bytesRead); return bytesRead; } From 475aa7160e0dd6d8a2dc4b7e770b7b88fcd25e2a Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 8 May 2012 15:57:40 +0100 Subject: [PATCH 011/110] UPDATED the README Added some minor fixes to remove warnings that were in previous commit --- Core/SVGParser.h | 18 ++-------- Core/SVGParser.m | 5 +++ Core/SVGSource.m | 1 - README.mdown | 85 +++++++++++++++++++++++------------------------- 4 files changed, 47 insertions(+), 62 deletions(-) diff --git a/Core/SVGParser.h b/Core/SVGParser.h index b545d9ce5..766afb462 100644 --- a/Core/SVGParser.h +++ b/Core/SVGParser.h @@ -42,24 +42,10 @@ BOOL _storingChars; NSMutableString *_storedChars; NSMutableArray *_elementStack; - - /* - ADAM OLD - removing? - BOOL _failed; - NSString *_path; - - SVGElement *_rootNode; -#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR - SVGSource *_document; -#else - __weak SVGSource *_document; // TODO: should this still be weak? probably not? -#endif - NSError* errorForCurrentParse; - */ } -@property(nonatomic,retain) SVGSource* source; -@property(nonatomic,retain) SVGParseResult* currentParseRun; +@property(nonatomic,readonly) SVGSource* source; +@property(nonatomic,readonly) SVGParseResult* currentParseRun; @property(nonatomic,retain) NSMutableArray* parserExtensions; diff --git a/Core/SVGParser.m b/Core/SVGParser.m index 8c0e7fba0..5c5e051e5 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -29,6 +29,11 @@ - (void) dealloc @end +@interface SVGParser(privateProperties) +@property(nonatomic,retain, readwrite) SVGSource* source; +@property(nonatomic,retain, readwrite) SVGParseResult* currentParseRun; +@end + @implementation SVGParser @synthesize source; diff --git a/Core/SVGSource.m b/Core/SVGSource.m index 5da0e64aa..daf9a7b99 100644 --- a/Core/SVGSource.m +++ b/Core/SVGSource.m @@ -121,7 +121,6 @@ -(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK FILE *file = [handle pointerValue]; // objc cannot cope with using C-pointers as pointers, without some help bytesRead = fread(chunk, 1, READ_CHUNK_SZ, file); - NSLog(@"Read %i bytes from file", bytesRead); return bytesRead; } diff --git a/README.mdown b/README.mdown index 74acc2ccc..6b24088f1 100644 --- a/README.mdown +++ b/README.mdown @@ -4,11 +4,49 @@ SVGKit SVGKit is a Cocoa framework for rendering SVG files as Core Animation layers. All shapes are represented by instances of the `CAShapeLayer` class, and are, by design, animatable. SVGKit is compatible with the latest iOS SDK's. BRANCH: "transforms" ------ +====== This specific branch contains a MASSIVE re-factor of the original SVGKit, aiming to make it easier to use in your apps. Please read the "usage" instructions carefully - they have changed from previous SVGKit versions! +Usage - Basic (iPhone/iPad) +----- + +To use this, you must: + 1. Load an SVG file + 2. Convert the document to CALayer's which Apple can render + +The easiest way to do this is: + 1. SVGImage *im = [SVGImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object + 2. [self.view.layer addSublayer:[im layerTree]]; // SVGImage objects can export themselves as Apple's CALayer's + +NB: if you want to render the same SVG in different places on screen, you cannot do that right now. This is because the refactored code has gone back to old code that prevented you from doing this. Will be fixed in future! + + +Usage - Advanced (iPHone/iPad) +----- + +The big change with this branch, apart from requiring fewer lines of code, is that you can now do easy loading of different files. e.g. + + - [SVGParser parse: (SVGSource*)]; // anything that's an "SVGSource" can be parsed + + - [SVGSource sourceWithFile:@"monkey.svg"]; // create a source from disk... + - [SVGSource sourceWithURL:@"http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg"]; // create a source from disk... + + - (SVGParser*).currentParseRun.warnings; // array of NSError objects, each one a "WARNING" from the parser + - (SVGParser*).currentParseRun.errorsFatal; // array of NSError objects, each one a "FATAL ERROR" from the parser - if your SVG didn't render at all, this is why! + - (SVGParser*).currentParseRun.errorsRecoverable; // array of NSError objects, each one a "RECOVERABLE ERROR" from the parser - if your SVG didn't render correctly, this is why! (although you probably still got to see something) + + - (SVGImage*).parseErrorsAndWarnings; // this is a convenience pointer to (SVGParder*).currentParseRun used above + +Usage - OS X +----- + +UNSUPPORTED: the code exists, but none of the maintainers have used it recently, so we're not even sure if the OS X build still works! + +Feel free to report any issues or suggest improvements in the issue tracker + + Installation ----- @@ -29,47 +67,4 @@ iOS (iPhone/iPad): 8. (Optional but recommended): Edit your build settings and add "Header Search Paths" = "/usr/include/libxml2" 9. (Optional but recommended): Add the framework "libxml2.dylib" -OS X: ...this needs updating; some minor code changes are needed to "fix" this project. The OS X framework currently DOES NOT BUILD because iOS classes are being referenced in a couple of places. - - -Usage - iPhone/iPad ------ - -To use this, you must: - 1. Load an SVG file - 2. Convert the document to CALayer's which Apple can render - -The easiest way to do this is: - 1. SVGImage *im = [SVGImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object - 2. [self.view.layer addSublayer:[im layerTree]]; // SVGImage objects can export themselves as Apple's CALayer's - -NB: if you want to render the same SVG in different places on screen, you cannot do that right now. This is because the refactored code has gone back to old code that prevented you from doing this. Will be fixed in future! - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Override point for customization after application launch. - [self.window makeKeyAndVisible]; - - NSString* svgFilename = @"Monkey"; - - NSLog( @"[%@] Loading SVG document, filename = %@", [self class], svgFilename ); - - /** Optional: if you're using the parser extensions, add them here - [SVGDocument addSVGParserExtension:[[SVGParserConquest alloc] init]]; - */ - - SVGDocument* svgDocument = [SVGDocument documentNamed:svgFilename]; - - SVGDocumentView* docView = [SVGDocumentView documentViewWithDocument:svgDocument]; - - [self.window.layer addSublayer:docView.rootLayer]; - - return YES; -} - -Usage - OS X ------ - -UNSUPPORTED: the code exists, but none of the maintainers have used it recently, so we're not even sure if the OS X build still works! - -Feel free to report any issues or suggest improvements in the issue tracker +OS X: ...this needs updating; some minor code changes are needed to "fix" this project. The OS X framework currently DOES NOT BUILD because iOS classes are being referenced in a couple of places. \ No newline at end of file From dabaf04bdaeaef34e11149124f8be1194c11541d Mon Sep 17 00:00:00 2001 From: james pollock Date: Tue, 8 May 2012 20:35:00 +0100 Subject: [PATCH 012/110] fixed more UIKit referances fixed some more iOS references making sure they are only called when building the iOS library. however an issue has come up regarding the change from the SVGDocument to using SVGImage. the entire SVGView class is under the assumption we are still using the SVGDocument and SVGDocument+CA classes. throughout the class we refer to a synthesised property called document that uses functions from the now no longer existing SVGDocument. document.width, document.height ect. i attempted to change these to use the new class of SVGImage but the new functions (svgheight, svgwidth act) are incompatible data types. most likely the SVGView class will need a rewrite in order to use the new SVGImage class --- Core/SVGImage.h | 5 +++++ Core/SVGImage.m | 12 +++++++++++- Core/SVGSVGElement.m | 11 ++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Core/SVGImage.h b/Core/SVGImage.h index cc0e7d293..150071b9f 100644 --- a/Core/SVGImage.h +++ b/Core/SVGImage.h @@ -85,11 +85,16 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * la - (void)drawAsPatternInRect:(CGRect)rect; // draws the image as a CGPattern // animated images. When set as UIImageView.image, animation will play in an infinite loop until removed. Drawing will render the first image +#if TARGET_OS_IPHONE + + + + (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); read sequnce of files with suffix starting at 0 or 1 + (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // squence of files + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); +#endif /** TODO: From UIImage. Not needed, I think? diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 60cd085de..22cf16a3b 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -133,11 +133,15 @@ - (void)dealloc { [super dealloc]; } +//TODO mac alternatives to UIKit functions + +#if TARGET_OS_IPHONE + (UIImage *)imageWithData:(NSData *)data { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } +#endif - (id)initWithData:(NSData *)data { @@ -158,11 +162,14 @@ -(CGFloat)scale return 0.0; } +//TODO mac alternatives to UIKit functions +#if TARGET_OS_IPHONE -(UIImage *)uiImage { NSAssert( FALSE, @"Auto-converting SVGImage to a rasterized UIImage is not yet implemented by SVGKit" ); return nil; } +#endif // the these draw the image 'right side up' in the usual coordinate system with 'point' being the top-left. @@ -190,13 +197,15 @@ - (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } +//TODO mac alternatives to UIKit functions +#if TARGET_OS_IPHONE + (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; @@ -206,6 +215,7 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } +#endif - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { diff --git a/Core/SVGSVGElement.m b/Core/SVGSVGElement.m index 6a8ef4f7a..c00160e57 100644 --- a/Core/SVGSVGElement.m +++ b/Core/SVGSVGElement.m @@ -40,7 +40,16 @@ - (void)parseAttributes:(NSDictionary *)attributes { NSArray* boxElements = [(NSString*) value componentsSeparatedByString:@" "]; _viewBoxFrame = CGRectMake([[boxElements objectAtIndex:0] floatValue], [[boxElements objectAtIndex:1] floatValue], [[boxElements objectAtIndex:2] floatValue], [[boxElements objectAtIndex:3] floatValue]); - NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromCGRect(self.viewBoxFrame)); + + //osx logging +#if TARGET_OS_IPHONE + NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromCGRect(self.viewBoxFrame)); +#endif + //mac logging +#if TARGET_OS_MAC + NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromRect(self.viewBoxFrame)); +#endif + } } From ebb78694f142981d14b2cf2e9bc1cf28bfb1ca11 Mon Sep 17 00:00:00 2001 From: james pollock Date: Tue, 8 May 2012 20:43:11 +0100 Subject: [PATCH 013/110] reverted changes that broke iOS build --- Core/SVGImage.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/SVGImage.m b/Core/SVGImage.m index 22cf16a3b..d713f1f46 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -162,7 +162,6 @@ -(CGFloat)scale return 0.0; } -//TODO mac alternatives to UIKit functions #if TARGET_OS_IPHONE -(UIImage *)uiImage { @@ -197,15 +196,14 @@ - (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } -//TODO mac alternatives to UIKit functions -#if TARGET_OS_IPHONE + + (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; @@ -215,7 +213,6 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -#endif - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { From a2bd1d045752e0240ed7f2b45ce9111f45cc9f13 Mon Sep 17 00:00:00 2001 From: james pollock Date: Tue, 8 May 2012 20:59:35 +0100 Subject: [PATCH 014/110] fixes issue that caused previous change to break iOS build LOL no idea what happened --- Core/SVGImage.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/SVGImage.m b/Core/SVGImage.m index d713f1f46..3e4eb7e37 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -197,7 +197,7 @@ - (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); } - +#if TARGET_OS_IPHONE + (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); @@ -213,7 +213,7 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } - +#endif - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { From 93d9ecaeb49f01ff036696c320861607eae559e1 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 19:34:06 +0100 Subject: [PATCH 015/110] TARGET_OS_MAC doesn't do what you think it does --- Core/SVGSVGElement.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/SVGSVGElement.m b/Core/SVGSVGElement.m index c00160e57..56b0b5f35 100644 --- a/Core/SVGSVGElement.m +++ b/Core/SVGSVGElement.m @@ -44,9 +44,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { //osx logging #if TARGET_OS_IPHONE NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromCGRect(self.viewBoxFrame)); -#endif +#elif //mac logging -#if TARGET_OS_MAC NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromRect(self.viewBoxFrame)); #endif From 96e4d025da70a52e863afc15cebc26f206dfd88f Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 19:34:37 +0100 Subject: [PATCH 016/110] Deleting missing dylib file - not sure how this got in there? --- XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 99f513b6f..d8877dc17 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -131,7 +131,6 @@ 66B79B7215475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; }; 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; - 66B79B76154752EB002F99FF /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 66B79B75154752EB002F99FF /* libxml2.dylib */; }; 66EB2218155946A600DE5844 /* SVGParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 66EB2216155946A500DE5844 /* SVGParseResult.h */; }; 66EB2219155946A600DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; @@ -215,7 +214,6 @@ 66B79B0615475254002F99FF /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 66B79B75154752EB002F99FF /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/libxml2.dylib; sourceTree = DEVELOPER_DIR; }; 66EB2216155946A500DE5844 /* SVGParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParseResult.h; sourceTree = ""; }; 66EB2217155946A500DE5844 /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -232,7 +230,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 66B79B76154752EB002F99FF /* libxml2.dylib in Frameworks */, 3BF503A4148C5FD400CC7D17 /* QuartzCore.framework in Frameworks */, 3BF503A2148C5FCE00CC7D17 /* CoreGraphics.framework in Frameworks */, 3BF503A0148C5FC600CC7D17 /* UIKit.framework in Frameworks */, @@ -265,7 +262,6 @@ 0867D691FE84028FC02AAC07 /* SVGKit */ = { isa = PBXGroup; children = ( - 66B79B75154752EB002F99FF /* libxml2.dylib */, C952623F12711D8600434805 /* Framework */, 66213434148AF2CF006881E1 /* SVGKitLibrary */, ); From e86623fd512238b28a312a510f7c7670a66c2329 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 19:35:00 +0100 Subject: [PATCH 017/110] Removing compiler warnings over ultra safe C. Would prefer to make it ultra safe, but not sure how --- Core/SVGParser.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/SVGParser.m b/Core/SVGParser.m index 5c5e051e5..358d1eb56 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -126,7 +126,7 @@ - (SVGParseResult*) parseSynchronously { // 1. while (source has chunks of BYTES) // 2. read a chunk from source, send to libxml - int bytesRead = [source handle:handle readNextChunk:&buff maxBytes:READ_CHUNK_SZ]; + int bytesRead = [source handle:handle readNextChunk:(char *)&buff maxBytes:READ_CHUNK_SZ]; while( bytesRead > 0 ) { int libXmlParserParseError = xmlParseChunk(ctx, buff, bytesRead, 0); @@ -143,7 +143,7 @@ - (SVGParseResult*) parseSynchronously break; } - bytesRead = [source handle:handle readNextChunk:&buff maxBytes:READ_CHUNK_SZ]; + bytesRead = [source handle:handle readNextChunk:(char *)&buff maxBytes:READ_CHUNK_SZ]; } } From c6f7ea444f2b33c9a568529979f60ec4e83d7bc5 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 19:58:27 +0100 Subject: [PATCH 018/110] Moved some stuff out of SVGImage that shouldnt be there. Now in separate category --- Core/SVGImage+SVGPathView.h | 23 +++++++++++ Core/SVGImage+SVGPathView.m | 33 +++++++++++++++ Core/SVGImage.h | 9 ----- Core/SVGImage.m | 28 ------------- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 40 +++++++++++-------- iOS/SVGPathView.m | 1 + 6 files changed, 81 insertions(+), 53 deletions(-) create mode 100644 Core/SVGImage+SVGPathView.h create mode 100644 Core/SVGImage+SVGPathView.m diff --git a/Core/SVGImage+SVGPathView.h b/Core/SVGImage+SVGPathView.h new file mode 100644 index 000000000..8e7cd567c --- /dev/null +++ b/Core/SVGImage+SVGPathView.h @@ -0,0 +1,23 @@ +#import "SVGImage.h" + +/*! + This extension is used by SVGPathView to make a call recurse down the whole document stack + + It is *probably* better to re-factor this somehow, to somewhere - but for backwards compatibility, + I'm leaving it in, and enabled by default. All the code is encapsulated in this one category, so + it's pretty clean at the moment + */ + +#if NS_BLOCKS_AVAILABLE +typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); +#endif + +@interface SVGImage (SVGPathView) + +#if NS_BLOCKS_AVAILABLE + +- (void) applyAggregator:(SVGElementAggregationBlock)aggregator; + +#endif + +@end diff --git a/Core/SVGImage+SVGPathView.m b/Core/SVGImage+SVGPathView.m new file mode 100644 index 000000000..3dbe33103 --- /dev/null +++ b/Core/SVGImage+SVGPathView.m @@ -0,0 +1,33 @@ +#import "SVGImage+SVGPathView.h" + +@implementation SVGImage (SVGPathView) + +#if NS_BLOCKS_AVAILABLE + +- (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGElement < SVGLayeredElement > *)element +{ + if (![element.children count]) { + return; + } + + for (SVGElement *child in element.children) { + if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { + SVGElement* layeredElement = (SVGElement*)child; + if (layeredElement) { + aggregator(layeredElement); + + [self applyAggregator:aggregator + toElement:layeredElement]; + } + } + } +} + +- (void) applyAggregator:(SVGElementAggregationBlock)aggregator +{ + [self applyAggregator:aggregator toElement:self.rootElement]; +} + +#endif + +@end diff --git a/Core/SVGImage.h b/Core/SVGImage.h index 541e18470..8ca71df7a 100644 --- a/Core/SVGImage.h +++ b/Core/SVGImage.h @@ -31,10 +31,6 @@ #import "SVGParser.h" #import "SVGSource.h" -#if NS_BLOCKS_AVAILABLE -typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); -#endif - @class SVGDefsElement; @interface SVGImage : NSObject // doesn't extend UIImage because Apple made UIImage immutable @@ -114,11 +110,6 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * la #pragma mark - utility methods -#if NS_BLOCKS_AVAILABLE - -- (void) applyAggregator:(SVGElementAggregationBlock)aggregator; - -#endif @end diff --git a/Core/SVGImage.m b/Core/SVGImage.m index c82dec624..764c1dbb2 100644 --- a/Core/SVGImage.m +++ b/Core/SVGImage.m @@ -271,32 +271,4 @@ - (SVGDefsElement *)defs { return (SVGDefsElement *) [self.rootElement findFirstElementOfClass:[SVGDefsElement class]]; } -#if NS_BLOCKS_AVAILABLE - -- (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGElement < SVGLayeredElement > *)element -{ - if (![element.children count]) { - return; - } - - for (SVGElement *child in element.children) { - if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - SVGElement* layeredElement = (SVGElement*)child; - if (layeredElement) { - aggregator(layeredElement); - - [self applyAggregator:aggregator - toElement:layeredElement]; - } - } - } -} - -- (void) applyAggregator:(SVGElementAggregationBlock)aggregator -{ - [self applyAggregator:aggregator toElement:self.rootElement]; -} - -#endif - @end diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index d8877dc17..b7adea9ac 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -21,8 +21,14 @@ 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; 66213556148AF80B006881E1 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; - 66213558148AF80B006881E1 /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354E148AF80A006881E1 /* SVGView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213559148AF80B006881E1 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354F148AF80A006881E1 /* SVGView.m */; }; + 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; }; + 6684CD461566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; }; + 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; + 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; + 6684CD4B1566D07400A46247 /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGView.h */; }; + 6684CD4C1566D07400A46247 /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGView.h */; }; + 6684CD4D1566D07400A46247 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGView.m */; }; + 6684CD4E1566D07400A46247 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGView.m */; }; 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; }; 66B79B0A15475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; }; 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; @@ -136,8 +142,6 @@ 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; - C9379C5A12777AEC00B0589E /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = C9379C5812777AEC00B0589E /* SVGView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C9379C5B12777AEC00B0589E /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = C9379C5912777AEC00B0589E /* SVGView.m */; }; C996E4BC1336CBC200EC3F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */; }; /* End PBXBuildFile section */ @@ -157,9 +161,11 @@ 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; 6621354C148AF80A006881E1 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; 6621354D148AF80A006881E1 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; - 6621354E148AF80A006881E1 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; - 6621354F148AF80A006881E1 /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; 66226B53148AEAB100EF4A6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGImage+SVGPathView.h"; path = "../../Core/SVGImage+SVGPathView.h"; sourceTree = ""; }; + 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGImage+SVGPathView.m"; path = "../../Core/SVGImage+SVGPathView.m"; sourceTree = ""; }; + 6684CD491566D07400A46247 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; + 6684CD4A1566D07400A46247 /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; 66B79AD315475254002F99FF /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; 66B79AD415475254002F99FF /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; @@ -218,8 +224,6 @@ 66EB2217155946A500DE5844 /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C9379C5812777AEC00B0589E /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; - C9379C5912777AEC00B0589E /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; C95263281271228F00434805 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; @@ -262,6 +266,8 @@ 0867D691FE84028FC02AAC07 /* SVGKit */ = { isa = PBXGroup; children = ( + 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */, + 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */, C952623F12711D8600434805 /* Framework */, 66213434148AF2CF006881E1 /* SVGKitLibrary */, ); @@ -339,8 +345,6 @@ 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */, 6621354C148AF80A006881E1 /* SVGPathView.h */, 6621354D148AF80A006881E1 /* SVGPathView.m */, - 6621354E148AF80A006881E1 /* SVGView.h */, - 6621354F148AF80A006881E1 /* SVGView.m */, ); name = iOS; path = ../../iOS; @@ -431,6 +435,8 @@ 66B79B0615475254002F99FF /* SVGTitleElement.m */, 66B79B0715475254002F99FF /* SVGUtils.h */, 66B79B0815475254002F99FF /* SVGUtils.m */, + 6684CD491566D07400A46247 /* SVGView.h */, + 6684CD4A1566D07400A46247 /* SVGView.m */, ); name = Core; path = ../../Core; @@ -439,8 +445,6 @@ C9DA5C5E1273D26A000CB487 /* Mac */ = { isa = PBXGroup; children = ( - C9379C5812777AEC00B0589E /* SVGView.h */, - C9379C5912777AEC00B0589E /* SVGView.m */, ); name = Mac; path = ../../Mac; @@ -456,7 +460,6 @@ 66213550148AF80B006881E1 /* CALayerWithChildHitTest.h in Headers */, 66213552148AF80B006881E1 /* CAShapeLayerWithHitTest.h in Headers */, 66213556148AF80B006881E1 /* SVGPathView.h in Headers */, - 66213558148AF80B006881E1 /* SVGView.h in Headers */, 66B79B0A15475254002F99FF /* CGPathAdditions.h in Headers */, 66B79B0E15475254002F99FF /* SVGBasicDataTypes.h in Headers */, 66B79B1215475254002F99FF /* SVGCircleElement.h in Headers */, @@ -485,6 +488,8 @@ 66B79B6A15475254002F99FF /* SVGTextElement.h in Headers */, 66B79B6E15475254002F99FF /* SVGTitleElement.h in Headers */, 66B79B7215475254002F99FF /* SVGUtils.h in Headers */, + 6684CD461566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */, + 6684CD4C1566D07400A46247 /* SVGView.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -492,7 +497,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C9379C5A12777AEC00B0589E /* SVGView.h in Headers */, 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */, 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */, 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */, @@ -524,6 +528,8 @@ 66B79B6D15475254002F99FF /* SVGTitleElement.h in Headers */, 66B79B7115475254002F99FF /* SVGUtils.h in Headers */, 66EB2218155946A600DE5844 /* SVGParseResult.h in Headers */, + 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */, + 6684CD4B1566D07400A46247 /* SVGView.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -631,7 +637,6 @@ 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */, 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */, 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, - 66213559148AF80B006881E1 /* SVGView.m in Sources */, 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */, 66B79B1015475254002F99FF /* SVGBasicDataTypes.m in Sources */, 66B79B1415475254002F99FF /* SVGCircleElement.m in Sources */, @@ -659,6 +664,8 @@ 66B79B7015475254002F99FF /* SVGTitleElement.m in Sources */, 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */, + 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */, + 6684CD4E1566D07400A46247 /* SVGView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -668,7 +675,6 @@ files = ( 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */, 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, - C9379C5B12777AEC00B0589E /* SVGView.m in Sources */, 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */, 66B79B0F15475254002F99FF /* SVGBasicDataTypes.m in Sources */, 66B79B1315475254002F99FF /* SVGCircleElement.m in Sources */, @@ -696,6 +702,8 @@ 66B79B6F15475254002F99FF /* SVGTitleElement.m in Sources */, 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, 66EB2219155946A600DE5844 /* SVGParseResult.m in Sources */, + 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */, + 6684CD4D1566D07400A46247 /* SVGView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/iOS/SVGPathView.m b/iOS/SVGPathView.m index f7bcb2d23..722df74af 100755 --- a/iOS/SVGPathView.m +++ b/iOS/SVGPathView.m @@ -5,6 +5,7 @@ #import "SVGPathView.h" +#import "SVGImage+SVGPathView.h" #import "SVGImage.h" #import "SVGPathElement.h" #import "CGPathAdditions.h" From 210ecd1f157c2d95a592896e0c9b29794275b35e Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 19:58:43 +0100 Subject: [PATCH 019/110] Merged the two SVGView implementations --- {iOS => Core}/SVGView.h | 0 Core/SVGView.m | 64 +++++++++++++++++++++++++++++++++++++++++ Mac/SVGView.h | 16 ----------- Mac/SVGView.m | 49 ------------------------------- iOS/SVGView.m | 47 ------------------------------ 5 files changed, 64 insertions(+), 112 deletions(-) rename {iOS => Core}/SVGView.h (100%) create mode 100644 Core/SVGView.m delete mode 100644 Mac/SVGView.h delete mode 100644 Mac/SVGView.m delete mode 100644 iOS/SVGView.m diff --git a/iOS/SVGView.h b/Core/SVGView.h similarity index 100% rename from iOS/SVGView.h rename to Core/SVGView.h diff --git a/Core/SVGView.m b/Core/SVGView.m new file mode 100644 index 000000000..d6eb24de1 --- /dev/null +++ b/Core/SVGView.m @@ -0,0 +1,64 @@ +// +// SVGView.m +// SVGKit +// +// + +#import "SVGView.h" + +#import "SVGImage.h" +#import "SVGImage+CA.h" + +@implementation SVGView + +@synthesize image = _image; + +- (id)initWithImage:(SVGImage *) im { + NSAssert( im != nil, @"Cannot init with a nil SVGImage; this class requires a pre-loaded SVGImage instance" ); + + self = [self initWithFrame:CGRectMake(0.0f, 0.0f, im.size.width, im.size.height)]; + if (self) { + self.image = im; + } + return self; +} + +- (void)dealloc { + [_image release]; + + [super dealloc]; +} + +#if TARGET_OS_IPHONE +#else +/*! Mac only: Mac uses a flipped render system */ +- (BOOL)isFlipped { + return YES; +} +#endif + + +- (void)setImage:(SVGImage *) newImage { + if (_image != newImage) { + [_image release]; + _image = [newImage retain]; + + /** + ADAM: this old code seems pointless. It looks like someone's trying to do a minor compiler + optimization by doing a reverse loop, but ... that would be massive overkill? + + REMOVED for now, replaced with the obvious normal loop (below) + + for (NSInteger i = [self.layer.sublayers count] - 1; i >= 0; i--) { + CALayer *sublayer = [self.layer.sublayers objectAtIndex:i]; + [sublayer removeFromSuperlayer]; + }*/ + for (CALayer *sublayer in [self.layer sublayers]) { + [sublayer removeFromSuperlayer]; + } + + [self.layer addSublayer:[_image layerTreeCached]]; + } +} + +@end \ No newline at end of file diff --git a/Mac/SVGView.h b/Mac/SVGView.h deleted file mode 100644 index 2c03a25be..000000000 --- a/Mac/SVGView.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// SVGView.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -@class SVGSource; - -@interface SVGView : NSView { } - -@property (nonatomic, retain) SVGSource *document; - -- (id)initWithDocument:(SVGSource *)document; // set frame to position - -@end diff --git a/Mac/SVGView.m b/Mac/SVGView.m deleted file mode 100644 index 4bbed8363..000000000 --- a/Mac/SVGView.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// SVGView.m -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGView.h" - -#import "SVGSource.h" -#import "SVGImage+CA.h" - -@implementation SVGView - -@synthesize document = _document; - -- (id)initWithDocument:(SVGSource *)document { - NSParameterAssert(document != nil); - - self = [self initWithFrame:NSMakeRect(0.0f, 0.0f, document.width, document.height)]; - if (self) { - self.document = document; - } - return self; -} - -- (BOOL)isFlipped { - return YES; -} - -- (void)dealloc { - self.document = nil; - - [super dealloc]; -} - -- (void)setDocument:(SVGSource *)aDocument { - [aDocument retain]; - [_document release]; - if (_document != nil) { - _document = aDocument; - for (CALayer *sublayer in [self.layer sublayers]) { - [sublayer removeFromSuperlayer]; - } - [self.layer addSublayer:[_document layerTreeCached]]; - } -} - -@end diff --git a/iOS/SVGView.m b/iOS/SVGView.m deleted file mode 100644 index 89ae17152..000000000 --- a/iOS/SVGView.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// SVGView.m -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGView.h" - -#import "SVGImage.h" -#import "SVGImage+CA.h" - -@implementation SVGView - -@synthesize image = _image; - -- (id)initWithImage:(SVGImage *)document { - NSParameterAssert(document != nil); - - self = [self initWithFrame:CGRectMake(0.0f, 0.0f, document.size.width, document.size.height)]; - if (self) { - self.image = document; - } - return self; -} - -- (void)dealloc { - [_image release]; - - [super dealloc]; -} - -- (void)setImage:(SVGImage *)aDocument { - if (_image != aDocument) { - [_image release]; - _image = [aDocument retain]; - - for (NSInteger i = [self.layer.sublayers count] - 1; i >= 0; i--) { - CALayer *sublayer = [self.layer.sublayers objectAtIndex:i]; - [sublayer removeFromSuperlayer]; - } - - [self.layer addSublayer:[_image layerTreeCached]]; - } -} - -@end From d40cbd848a1f317264ef48ee3a16b53c3494fda5 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 20:26:49 +0100 Subject: [PATCH 020/110] FIXED: bug where Apple Compiler sometimes failed to generate some private properties on SVGParser --- Core/SVGParser.h | 4 +- Core/SVGParser.m | 2 +- .../SVGPad.xcodeproj/project.pbxproj | 350 +++++++++--------- 3 files changed, 181 insertions(+), 175 deletions(-) diff --git a/Core/SVGParser.h b/Core/SVGParser.h index 766afb462..a43e6c9a3 100644 --- a/Core/SVGParser.h +++ b/Core/SVGParser.h @@ -44,8 +44,8 @@ NSMutableArray *_elementStack; } -@property(nonatomic,readonly) SVGSource* source; -@property(nonatomic,readonly) SVGParseResult* currentParseRun; +@property(nonatomic,retain,readonly) SVGSource* source; +@property(nonatomic,retain,readonly) SVGParseResult* currentParseRun; @property(nonatomic,retain) NSMutableArray* parserExtensions; diff --git a/Core/SVGParser.m b/Core/SVGParser.m index 358d1eb56..5450bf957 100644 --- a/Core/SVGParser.m +++ b/Core/SVGParser.m @@ -29,7 +29,7 @@ - (void) dealloc @end -@interface SVGParser(privateProperties) +@interface SVGParser() @property(nonatomic,retain, readwrite) SVGSource* source; @property(nonatomic,retain, readwrite) SVGParseResult* currentParseRun; @end diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index 53365168f..d5e31e9bb 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -17,32 +17,9 @@ 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; 3BC23F071488686900FC74CE /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC23F061488686900FC74CE /* libxml2.dylib */; }; - 3BF503FB148C62D900CC7D17 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C2148C62D900CC7D17 /* CGPathAdditions.m */; }; - 3BF503FC148C62D900CC7D17 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C4148C62D900CC7D17 /* SVGCircleElement.m */; }; - 3BF503FD148C62D900CC7D17 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */; }; - 3BF503FE148C62D900CC7D17 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */; }; - 3BF503FF148C62D900CC7D17 /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */; }; - 3BF50400148C62D900CC7D17 /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CC148C62D900CC7D17 /* SVGImage.m */; }; - 3BF50401148C62D900CC7D17 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503CF148C62D900CC7D17 /* SVGElement.m */; }; - 3BF50402148C62D900CC7D17 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503D1148C62D900CC7D17 /* SVGEllipseElement.m */; }; - 3BF50403148C62D900CC7D17 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503D3148C62D900CC7D17 /* SVGGroupElement.m */; }; - 3BF50404148C62D900CC7D17 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503D5148C62D900CC7D17 /* SVGImageElement.m */; }; - 3BF50405148C62D900CC7D17 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503D8148C62D900CC7D17 /* SVGLineElement.m */; }; - 3BF50406148C62D900CC7D17 /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503DA148C62D900CC7D17 /* SVGParser.m */; }; - 3BF50407148C62D900CC7D17 /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503DC148C62D900CC7D17 /* SVGParserSVG.m */; }; - 3BF50408148C62D900CC7D17 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503DE148C62D900CC7D17 /* SVGPathElement.m */; }; - 3BF50409148C62D900CC7D17 /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503E0148C62D900CC7D17 /* SVGPattern.m */; }; - 3BF5040A148C62D900CC7D17 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503E2148C62D900CC7D17 /* SVGPolygonElement.m */; }; - 3BF5040B148C62D900CC7D17 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503E4148C62D900CC7D17 /* SVGPolylineElement.m */; }; - 3BF5040C148C62D900CC7D17 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */; }; - 3BF5040D148C62D900CC7D17 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */; }; - 3BF5040E148C62D900CC7D17 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503EB148C62D900CC7D17 /* SVGTextElement.m */; }; - 3BF5040F148C62D900CC7D17 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503ED148C62D900CC7D17 /* SVGTitleElement.m */; }; - 3BF50410148C62D900CC7D17 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503EF148C62D900CC7D17 /* SVGUtils.m */; }; 3BF50411148C62D900CC7D17 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */; }; 3BF50412148C62D900CC7D17 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */; }; 3BF50414148C62D900CC7D17 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F8148C62D900CC7D17 /* SVGPathView.m */; }; - 3BF50415148C62D900CC7D17 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503FA148C62D900CC7D17 /* SVGView.m */; }; 3BF50422148C63F500CC7D17 /* CurvedDiamond.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */; }; 3BF50423148C63F500CC7D17 /* Lion.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041C148C63F500CC7D17 /* Lion.svg */; }; 3BF50424148C63F500CC7D17 /* Map.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041D148C63F500CC7D17 /* Map.svg */; }; @@ -50,16 +27,40 @@ 3BF50426148C63F500CC7D17 /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041F148C63F500CC7D17 /* Note.svg */; }; 3BF50427148C63F500CC7D17 /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50420148C63F500CC7D17 /* test-wave-1.svg */; }; 3BF50428148C63F500CC7D17 /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50421148C63F500CC7D17 /* Text.svg */; }; - 663C41C6149E638000F546A3 /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 663C41C5149E638000F546A3 /* SVGPointsAndPathsParser.m */; }; 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */; }; 663DEFEF14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */; }; - 6640BCEB154722FB00AC0AE8 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */; }; 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; - 66799EE715595A9A00DD8BCF /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66799EE315595A9A00DD8BCF /* SVGParseResult.m */; }; - 66799EE815595A9A00DD8BCF /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66799EE515595A9A00DD8BCF /* SVGSource.m */; }; - 667DA28415470FDB00BDABCC /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */; }; 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; + 6684CDE91566D3EA00A46247 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */; }; + 6684CDEA1566D3EA00A46247 /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDB01566D3EA00A46247 /* SVGBasicDataTypes.m */; }; + 6684CDEB1566D3EA00A46247 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDB21566D3EA00A46247 /* SVGCircleElement.m */; }; + 6684CDEC1566D3EA00A46247 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDB41566D3EA00A46247 /* SVGDefsElement.m */; }; + 6684CDED1566D3EA00A46247 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDB61566D3EA00A46247 /* SVGDescriptionElement.m */; }; + 6684CDEE1566D3EA00A46247 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDB81566D3EA00A46247 /* SVGElement.m */; }; + 6684CDEF1566D3EA00A46247 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDBA1566D3EA00A46247 /* SVGEllipseElement.m */; }; + 6684CDF01566D3EA00A46247 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDBC1566D3EA00A46247 /* SVGGroupElement.m */; }; + 6684CDF11566D3EA00A46247 /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDBE1566D3EA00A46247 /* SVGImage.m */; }; + 6684CDF21566D3EA00A46247 /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDC01566D3EA00A46247 /* SVGImage+CA.m */; }; + 6684CDF31566D3EA00A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDC21566D3EA00A46247 /* SVGImage+SVGPathView.m */; }; + 6684CDF41566D3EA00A46247 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDC41566D3EA00A46247 /* SVGImageElement.m */; }; + 6684CDF51566D3EA00A46247 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDC71566D3EA00A46247 /* SVGLineElement.m */; }; + 6684CDF61566D3EA00A46247 /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDC91566D3EA00A46247 /* SVGParser.m */; }; + 6684CDF71566D3EA00A46247 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDCB1566D3EA00A46247 /* SVGParseResult.m */; }; + 6684CDF81566D3EA00A46247 /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDCE1566D3EA00A46247 /* SVGParserSVG.m */; }; + 6684CDF91566D3EA00A46247 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDD01566D3EA00A46247 /* SVGPathElement.m */; }; + 6684CDFA1566D3EA00A46247 /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDD21566D3EA00A46247 /* SVGPattern.m */; }; + 6684CDFB1566D3EA00A46247 /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDD41566D3EA00A46247 /* SVGPointsAndPathsParser.m */; }; + 6684CDFC1566D3EA00A46247 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDD61566D3EA00A46247 /* SVGPolygonElement.m */; }; + 6684CDFD1566D3EA00A46247 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDD81566D3EA00A46247 /* SVGPolylineElement.m */; }; + 6684CDFE1566D3EA00A46247 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDDA1566D3EA00A46247 /* SVGRectElement.m */; }; + 6684CDFF1566D3EA00A46247 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDDC1566D3EA00A46247 /* SVGShapeElement.m */; }; + 6684CE001566D3EA00A46247 /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDDE1566D3EA00A46247 /* SVGSource.m */; }; + 6684CE011566D3EA00A46247 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE01566D3EA00A46247 /* SVGSVGElement.m */; }; + 6684CE021566D3EA00A46247 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE21566D3EA00A46247 /* SVGTextElement.m */; }; + 6684CE031566D3EA00A46247 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE41566D3EA00A46247 /* SVGTitleElement.m */; }; + 6684CE041566D3EA00A46247 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE61566D3EA00A46247 /* SVGUtils.m */; }; + 6684CE051566D3EA00A46247 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE81566D3EA00A46247 /* SVGView.m */; }; 66BBD74315028F0A00102FEF /* map-test-australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */; }; 66BBD7461502A4EE00102FEF /* map-test-Location_European_nation_states-adam1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD7451502A4EE00102FEF /* map-test-Location_European_nation_states-adam1.svg */; }; C94B6C5D1274BBFC00B456EB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */; }; @@ -81,59 +82,12 @@ 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 3BC23F061488686900FC74CE /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - 3BF503C1148C62D900CC7D17 /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; - 3BF503C2148C62D900CC7D17 /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 3BF503C3148C62D900CC7D17 /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 3BF503C4148C62D900CC7D17 /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 3BF503C5148C62D900CC7D17 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 3BF503C7148C62D900CC7D17 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 3BF503C9148C62D900CC7D17 /* SVGImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGImage+CA.h"; sourceTree = ""; }; - 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGImage+CA.m"; sourceTree = ""; }; - 3BF503CB148C62D900CC7D17 /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = ""; }; - 3BF503CC148C62D900CC7D17 /* SVGImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImage.m; sourceTree = ""; }; - 3BF503CE148C62D900CC7D17 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 3BF503CF148C62D900CC7D17 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; - 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 3BF503D1148C62D900CC7D17 /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 3BF503D2148C62D900CC7D17 /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 3BF503D3148C62D900CC7D17 /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 3BF503D4148C62D900CC7D17 /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 3BF503D5148C62D900CC7D17 /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; - 3BF503D6148C62D900CC7D17 /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 3BF503D7148C62D900CC7D17 /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 3BF503D8148C62D900CC7D17 /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 3BF503D9148C62D900CC7D17 /* SVGParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParser.h; sourceTree = ""; }; - 3BF503DA148C62D900CC7D17 /* SVGParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParser.m; sourceTree = ""; }; - 3BF503DB148C62D900CC7D17 /* SVGParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserSVG.h; sourceTree = ""; }; - 3BF503DC148C62D900CC7D17 /* SVGParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParserSVG.m; sourceTree = ""; }; - 3BF503DD148C62D900CC7D17 /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 3BF503DE148C62D900CC7D17 /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 3BF503DF148C62D900CC7D17 /* SVGPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPattern.h; sourceTree = ""; }; - 3BF503E0148C62D900CC7D17 /* SVGPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPattern.m; sourceTree = ""; }; - 3BF503E1148C62D900CC7D17 /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 3BF503E2148C62D900CC7D17 /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 3BF503E3148C62D900CC7D17 /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 3BF503E4148C62D900CC7D17 /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 3BF503E5148C62D900CC7D17 /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 3BF503E8148C62D900CC7D17 /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 3BF503EA148C62D900CC7D17 /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; - 3BF503EB148C62D900CC7D17 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 3BF503EC148C62D900CC7D17 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 3BF503ED148C62D900CC7D17 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 3BF503EE148C62D900CC7D17 /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; - 3BF503EF148C62D900CC7D17 /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; 3BF503F1148C62D900CC7D17 /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; 3BF503F3148C62D900CC7D17 /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; 3BF503F7148C62D900CC7D17 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; 3BF503F8148C62D900CC7D17 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; - 3BF503F9148C62D900CC7D17 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; - 3BF503FA148C62D900CC7D17 /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; 3BF5041C148C63F500CC7D17 /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; 3BF5041D148C63F500CC7D17 /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; @@ -141,23 +95,72 @@ 3BF5041F148C63F500CC7D17 /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; 3BF50420148C63F500CC7D17 /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; 3BF50421148C63F500CC7D17 /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; - 663C41C4149E638000F546A3 /* SVGPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPointsAndPathsParser.h; sourceTree = ""; }; - 663C41C5149E638000F546A3 /* SVGPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPointsAndPathsParser.m; sourceTree = ""; }; 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-Location_European_nation_states-ukonly.svg"; sourceTree = ""; }; - 6640BCE9154722FA00AC0AE8 /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; - 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 6640BCEF15472D2700AC0AE8 /* SVGParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserExtension.h; sourceTree = ""; }; 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; 66436E5214A0BCEF001CC769 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; - 66799EE315595A9A00DD8BCF /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; - 66799EE415595A9A00DD8BCF /* SVGParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParseResult.h; sourceTree = ""; }; - 66799EE515595A9A00DD8BCF /* SVGSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSource.m; sourceTree = ""; }; - 66799EE615595A9A00DD8BCF /* SVGSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSource.h; sourceTree = ""; }; - 667DA28215470FD800BDABCC /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; - 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGBasicDataTypes.m; sourceTree = ""; }; 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; + 6684CDAD1566D3EA00A46247 /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; + 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; + 6684CDAF1566D3EA00A46247 /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; + 6684CDB01566D3EA00A46247 /* SVGBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGBasicDataTypes.m; sourceTree = ""; }; + 6684CDB11566D3EA00A46247 /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; + 6684CDB21566D3EA00A46247 /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; + 6684CDB31566D3EA00A46247 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 6684CDB41566D3EA00A46247 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 6684CDB51566D3EA00A46247 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; + 6684CDB61566D3EA00A46247 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; + 6684CDB71566D3EA00A46247 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; + 6684CDB81566D3EA00A46247 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 6684CDB91566D3EA00A46247 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; + 6684CDBA1566D3EA00A46247 /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; + 6684CDBB1566D3EA00A46247 /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; + 6684CDBC1566D3EA00A46247 /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; + 6684CDBD1566D3EA00A46247 /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = ""; }; + 6684CDBE1566D3EA00A46247 /* SVGImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImage.m; sourceTree = ""; }; + 6684CDBF1566D3EA00A46247 /* SVGImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGImage+CA.h"; sourceTree = ""; }; + 6684CDC01566D3EA00A46247 /* SVGImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGImage+CA.m"; sourceTree = ""; }; + 6684CDC11566D3EA00A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGImage+SVGPathView.h"; sourceTree = ""; }; + 6684CDC21566D3EA00A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGImage+SVGPathView.m"; sourceTree = ""; }; + 6684CDC31566D3EA00A46247 /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; + 6684CDC41566D3EA00A46247 /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 6684CDC51566D3EA00A46247 /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; + 6684CDC61566D3EA00A46247 /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; + 6684CDC71566D3EA00A46247 /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; + 6684CDC81566D3EA00A46247 /* SVGParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParser.h; sourceTree = ""; }; + 6684CDC91566D3EA00A46247 /* SVGParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParser.m; sourceTree = ""; }; + 6684CDCA1566D3EA00A46247 /* SVGParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParseResult.h; sourceTree = ""; }; + 6684CDCB1566D3EA00A46247 /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; + 6684CDCC1566D3EA00A46247 /* SVGParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserExtension.h; sourceTree = ""; }; + 6684CDCD1566D3EA00A46247 /* SVGParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserSVG.h; sourceTree = ""; }; + 6684CDCE1566D3EA00A46247 /* SVGParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParserSVG.m; sourceTree = ""; }; + 6684CDCF1566D3EA00A46247 /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; + 6684CDD01566D3EA00A46247 /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; + 6684CDD11566D3EA00A46247 /* SVGPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPattern.h; sourceTree = ""; }; + 6684CDD21566D3EA00A46247 /* SVGPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPattern.m; sourceTree = ""; }; + 6684CDD31566D3EA00A46247 /* SVGPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPointsAndPathsParser.h; sourceTree = ""; }; + 6684CDD41566D3EA00A46247 /* SVGPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPointsAndPathsParser.m; sourceTree = ""; }; + 6684CDD51566D3EA00A46247 /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; + 6684CDD61566D3EA00A46247 /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; + 6684CDD71566D3EA00A46247 /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; + 6684CDD81566D3EA00A46247 /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; + 6684CDD91566D3EA00A46247 /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; + 6684CDDA1566D3EA00A46247 /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; + 6684CDDB1566D3EA00A46247 /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; + 6684CDDC1566D3EA00A46247 /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; + 6684CDDD1566D3EA00A46247 /* SVGSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSource.h; sourceTree = ""; }; + 6684CDDE1566D3EA00A46247 /* SVGSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSource.m; sourceTree = ""; }; + 6684CDDF1566D3EA00A46247 /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 6684CDE01566D3EA00A46247 /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 6684CDE11566D3EA00A46247 /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; + 6684CDE21566D3EA00A46247 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; + 6684CDE31566D3EA00A46247 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; + 6684CDE41566D3EA00A46247 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 6684CDE51566D3EA00A46247 /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; + 6684CDE61566D3EA00A46247 /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; + 6684CDE71566D3EA00A46247 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; + 6684CDE81566D3EA00A46247 /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-australia_states_blank.svg"; sourceTree = ""; }; 66BBD7451502A4EE00102FEF /* map-test-Location_European_nation_states-adam1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-Location_European_nation_states-adam1.svg"; sourceTree = ""; }; 8D1107310486CEB800E47090 /* SVGPad-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SVGPad-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; @@ -260,62 +263,66 @@ 3BF503C0148C62D900CC7D17 /* Core */ = { isa = PBXGroup; children = ( - 3BF503C1148C62D900CC7D17 /* CGPathAdditions.h */, - 3BF503C2148C62D900CC7D17 /* CGPathAdditions.m */, - 3BF503C3148C62D900CC7D17 /* SVGCircleElement.h */, - 3BF503C4148C62D900CC7D17 /* SVGCircleElement.m */, - 3BF503C5148C62D900CC7D17 /* SVGDefsElement.h */, - 3BF503C6148C62D900CC7D17 /* SVGDefsElement.m */, - 3BF503C7148C62D900CC7D17 /* SVGDescriptionElement.h */, - 3BF503C8148C62D900CC7D17 /* SVGDescriptionElement.m */, - 3BF503C9148C62D900CC7D17 /* SVGImage+CA.h */, - 3BF503CA148C62D900CC7D17 /* SVGImage+CA.m */, - 667DA28215470FD800BDABCC /* SVGBasicDataTypes.h */, - 667DA28315470FD900BDABCC /* SVGBasicDataTypes.m */, - 3BF503CE148C62D900CC7D17 /* SVGElement.h */, - 3BF503CF148C62D900CC7D17 /* SVGElement.m */, - 3BF503D0148C62D900CC7D17 /* SVGEllipseElement.h */, - 3BF503D1148C62D900CC7D17 /* SVGEllipseElement.m */, - 3BF503D2148C62D900CC7D17 /* SVGGroupElement.h */, - 3BF503D3148C62D900CC7D17 /* SVGGroupElement.m */, - 3BF503CB148C62D900CC7D17 /* SVGImage.h */, - 3BF503CC148C62D900CC7D17 /* SVGImage.m */, - 3BF503D4148C62D900CC7D17 /* SVGImageElement.h */, - 3BF503D5148C62D900CC7D17 /* SVGImageElement.m */, - 3BF503D6148C62D900CC7D17 /* SVGKit.h */, - 3BF503D7148C62D900CC7D17 /* SVGLineElement.h */, - 3BF503D8148C62D900CC7D17 /* SVGLineElement.m */, - 3BF503D9148C62D900CC7D17 /* SVGParser.h */, - 3BF503DA148C62D900CC7D17 /* SVGParser.m */, - 6640BCEF15472D2700AC0AE8 /* SVGParserExtension.h */, - 3BF503DB148C62D900CC7D17 /* SVGParserSVG.h */, - 3BF503DC148C62D900CC7D17 /* SVGParserSVG.m */, - 66799EE315595A9A00DD8BCF /* SVGParseResult.m */, - 66799EE415595A9A00DD8BCF /* SVGParseResult.h */, - 3BF503DD148C62D900CC7D17 /* SVGPathElement.h */, - 3BF503DE148C62D900CC7D17 /* SVGPathElement.m */, - 663C41C4149E638000F546A3 /* SVGPointsAndPathsParser.h */, - 663C41C5149E638000F546A3 /* SVGPointsAndPathsParser.m */, - 3BF503DF148C62D900CC7D17 /* SVGPattern.h */, - 3BF503E0148C62D900CC7D17 /* SVGPattern.m */, - 3BF503E1148C62D900CC7D17 /* SVGPolygonElement.h */, - 3BF503E2148C62D900CC7D17 /* SVGPolygonElement.m */, - 3BF503E3148C62D900CC7D17 /* SVGPolylineElement.h */, - 3BF503E4148C62D900CC7D17 /* SVGPolylineElement.m */, - 3BF503E5148C62D900CC7D17 /* SVGRectElement.h */, - 3BF503E6148C62D900CC7D17 /* SVGRectElement.m */, - 3BF503E8148C62D900CC7D17 /* SVGShapeElement.h */, - 3BF503E9148C62D900CC7D17 /* SVGShapeElement.m */, - 66799EE615595A9A00DD8BCF /* SVGSource.h */, - 66799EE515595A9A00DD8BCF /* SVGSource.m */, - 6640BCE9154722FA00AC0AE8 /* SVGSVGElement.h */, - 6640BCEA154722FB00AC0AE8 /* SVGSVGElement.m */, - 3BF503EA148C62D900CC7D17 /* SVGTextElement.h */, - 3BF503EB148C62D900CC7D17 /* SVGTextElement.m */, - 3BF503EC148C62D900CC7D17 /* SVGTitleElement.h */, - 3BF503ED148C62D900CC7D17 /* SVGTitleElement.m */, - 3BF503EE148C62D900CC7D17 /* SVGUtils.h */, - 3BF503EF148C62D900CC7D17 /* SVGUtils.m */, + 6684CDAD1566D3EA00A46247 /* CGPathAdditions.h */, + 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */, + 6684CDAF1566D3EA00A46247 /* SVGBasicDataTypes.h */, + 6684CDB01566D3EA00A46247 /* SVGBasicDataTypes.m */, + 6684CDB11566D3EA00A46247 /* SVGCircleElement.h */, + 6684CDB21566D3EA00A46247 /* SVGCircleElement.m */, + 6684CDB31566D3EA00A46247 /* SVGDefsElement.h */, + 6684CDB41566D3EA00A46247 /* SVGDefsElement.m */, + 6684CDB51566D3EA00A46247 /* SVGDescriptionElement.h */, + 6684CDB61566D3EA00A46247 /* SVGDescriptionElement.m */, + 6684CDB71566D3EA00A46247 /* SVGElement.h */, + 6684CDB81566D3EA00A46247 /* SVGElement.m */, + 6684CDB91566D3EA00A46247 /* SVGEllipseElement.h */, + 6684CDBA1566D3EA00A46247 /* SVGEllipseElement.m */, + 6684CDBB1566D3EA00A46247 /* SVGGroupElement.h */, + 6684CDBC1566D3EA00A46247 /* SVGGroupElement.m */, + 6684CDBD1566D3EA00A46247 /* SVGImage.h */, + 6684CDBE1566D3EA00A46247 /* SVGImage.m */, + 6684CDBF1566D3EA00A46247 /* SVGImage+CA.h */, + 6684CDC01566D3EA00A46247 /* SVGImage+CA.m */, + 6684CDC11566D3EA00A46247 /* SVGImage+SVGPathView.h */, + 6684CDC21566D3EA00A46247 /* SVGImage+SVGPathView.m */, + 6684CDC31566D3EA00A46247 /* SVGImageElement.h */, + 6684CDC41566D3EA00A46247 /* SVGImageElement.m */, + 6684CDC51566D3EA00A46247 /* SVGKit.h */, + 6684CDC61566D3EA00A46247 /* SVGLineElement.h */, + 6684CDC71566D3EA00A46247 /* SVGLineElement.m */, + 6684CDC81566D3EA00A46247 /* SVGParser.h */, + 6684CDC91566D3EA00A46247 /* SVGParser.m */, + 6684CDCA1566D3EA00A46247 /* SVGParseResult.h */, + 6684CDCB1566D3EA00A46247 /* SVGParseResult.m */, + 6684CDCC1566D3EA00A46247 /* SVGParserExtension.h */, + 6684CDCD1566D3EA00A46247 /* SVGParserSVG.h */, + 6684CDCE1566D3EA00A46247 /* SVGParserSVG.m */, + 6684CDCF1566D3EA00A46247 /* SVGPathElement.h */, + 6684CDD01566D3EA00A46247 /* SVGPathElement.m */, + 6684CDD11566D3EA00A46247 /* SVGPattern.h */, + 6684CDD21566D3EA00A46247 /* SVGPattern.m */, + 6684CDD31566D3EA00A46247 /* SVGPointsAndPathsParser.h */, + 6684CDD41566D3EA00A46247 /* SVGPointsAndPathsParser.m */, + 6684CDD51566D3EA00A46247 /* SVGPolygonElement.h */, + 6684CDD61566D3EA00A46247 /* SVGPolygonElement.m */, + 6684CDD71566D3EA00A46247 /* SVGPolylineElement.h */, + 6684CDD81566D3EA00A46247 /* SVGPolylineElement.m */, + 6684CDD91566D3EA00A46247 /* SVGRectElement.h */, + 6684CDDA1566D3EA00A46247 /* SVGRectElement.m */, + 6684CDDB1566D3EA00A46247 /* SVGShapeElement.h */, + 6684CDDC1566D3EA00A46247 /* SVGShapeElement.m */, + 6684CDDD1566D3EA00A46247 /* SVGSource.h */, + 6684CDDE1566D3EA00A46247 /* SVGSource.m */, + 6684CDDF1566D3EA00A46247 /* SVGSVGElement.h */, + 6684CDE01566D3EA00A46247 /* SVGSVGElement.m */, + 6684CDE11566D3EA00A46247 /* SVGTextElement.h */, + 6684CDE21566D3EA00A46247 /* SVGTextElement.m */, + 6684CDE31566D3EA00A46247 /* SVGTitleElement.h */, + 6684CDE41566D3EA00A46247 /* SVGTitleElement.m */, + 6684CDE51566D3EA00A46247 /* SVGUtils.h */, + 6684CDE61566D3EA00A46247 /* SVGUtils.m */, + 6684CDE71566D3EA00A46247 /* SVGView.h */, + 6684CDE81566D3EA00A46247 /* SVGView.m */, ); name = Core; path = ../../Core; @@ -330,8 +337,6 @@ 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */, 3BF503F7148C62D900CC7D17 /* SVGPathView.h */, 3BF503F8148C62D900CC7D17 /* SVGPathView.m */, - 3BF503F9148C62D900CC7D17 /* SVGView.h */, - 3BF503FA148C62D900CC7D17 /* SVGView.m */, ); name = iOS; path = ../../iOS; @@ -447,41 +452,42 @@ buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 667DA28415470FDB00BDABCC /* SVGBasicDataTypes.m in Sources */, 1D3623260D0F684500981E51 /* SVGPadAppDelegate.m in Sources */, 2804200B108E984D000629CD /* RootViewController.m in Sources */, 2804200C108E984D000629CD /* DetailViewController.m in Sources */, - 3BF503FB148C62D900CC7D17 /* CGPathAdditions.m in Sources */, - 3BF503FC148C62D900CC7D17 /* SVGCircleElement.m in Sources */, - 3BF503FD148C62D900CC7D17 /* SVGDefsElement.m in Sources */, - 3BF503FE148C62D900CC7D17 /* SVGDescriptionElement.m in Sources */, - 3BF503FF148C62D900CC7D17 /* SVGImage+CA.m in Sources */, - 3BF50400148C62D900CC7D17 /* SVGImage.m in Sources */, - 3BF50401148C62D900CC7D17 /* SVGElement.m in Sources */, - 3BF50402148C62D900CC7D17 /* SVGEllipseElement.m in Sources */, - 3BF50403148C62D900CC7D17 /* SVGGroupElement.m in Sources */, - 3BF50404148C62D900CC7D17 /* SVGImageElement.m in Sources */, - 3BF50405148C62D900CC7D17 /* SVGLineElement.m in Sources */, - 3BF50406148C62D900CC7D17 /* SVGParser.m in Sources */, - 3BF50407148C62D900CC7D17 /* SVGParserSVG.m in Sources */, - 3BF50408148C62D900CC7D17 /* SVGPathElement.m in Sources */, - 3BF50409148C62D900CC7D17 /* SVGPattern.m in Sources */, - 3BF5040A148C62D900CC7D17 /* SVGPolygonElement.m in Sources */, - 3BF5040B148C62D900CC7D17 /* SVGPolylineElement.m in Sources */, - 3BF5040C148C62D900CC7D17 /* SVGRectElement.m in Sources */, - 3BF5040D148C62D900CC7D17 /* SVGShapeElement.m in Sources */, - 3BF5040E148C62D900CC7D17 /* SVGTextElement.m in Sources */, - 3BF5040F148C62D900CC7D17 /* SVGTitleElement.m in Sources */, - 3BF50410148C62D900CC7D17 /* SVGUtils.m in Sources */, 3BF50411148C62D900CC7D17 /* CALayerWithChildHitTest.m in Sources */, 3BF50412148C62D900CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, 3BF50414148C62D900CC7D17 /* SVGPathView.m in Sources */, - 3BF50415148C62D900CC7D17 /* SVGView.m in Sources */, - 663C41C6149E638000F546A3 /* SVGPointsAndPathsParser.m in Sources */, 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */, - 6640BCEB154722FB00AC0AE8 /* SVGSVGElement.m in Sources */, - 66799EE715595A9A00DD8BCF /* SVGParseResult.m in Sources */, - 66799EE815595A9A00DD8BCF /* SVGSource.m in Sources */, + 6684CDE91566D3EA00A46247 /* CGPathAdditions.m in Sources */, + 6684CDEA1566D3EA00A46247 /* SVGBasicDataTypes.m in Sources */, + 6684CDEB1566D3EA00A46247 /* SVGCircleElement.m in Sources */, + 6684CDEC1566D3EA00A46247 /* SVGDefsElement.m in Sources */, + 6684CDED1566D3EA00A46247 /* SVGDescriptionElement.m in Sources */, + 6684CDEE1566D3EA00A46247 /* SVGElement.m in Sources */, + 6684CDEF1566D3EA00A46247 /* SVGEllipseElement.m in Sources */, + 6684CDF01566D3EA00A46247 /* SVGGroupElement.m in Sources */, + 6684CDF11566D3EA00A46247 /* SVGImage.m in Sources */, + 6684CDF21566D3EA00A46247 /* SVGImage+CA.m in Sources */, + 6684CDF31566D3EA00A46247 /* SVGImage+SVGPathView.m in Sources */, + 6684CDF41566D3EA00A46247 /* SVGImageElement.m in Sources */, + 6684CDF51566D3EA00A46247 /* SVGLineElement.m in Sources */, + 6684CDF61566D3EA00A46247 /* SVGParser.m in Sources */, + 6684CDF71566D3EA00A46247 /* SVGParseResult.m in Sources */, + 6684CDF81566D3EA00A46247 /* SVGParserSVG.m in Sources */, + 6684CDF91566D3EA00A46247 /* SVGPathElement.m in Sources */, + 6684CDFA1566D3EA00A46247 /* SVGPattern.m in Sources */, + 6684CDFB1566D3EA00A46247 /* SVGPointsAndPathsParser.m in Sources */, + 6684CDFC1566D3EA00A46247 /* SVGPolygonElement.m in Sources */, + 6684CDFD1566D3EA00A46247 /* SVGPolylineElement.m in Sources */, + 6684CDFE1566D3EA00A46247 /* SVGRectElement.m in Sources */, + 6684CDFF1566D3EA00A46247 /* SVGShapeElement.m in Sources */, + 6684CE001566D3EA00A46247 /* SVGSource.m in Sources */, + 6684CE011566D3EA00A46247 /* SVGSVGElement.m in Sources */, + 6684CE021566D3EA00A46247 /* SVGTextElement.m in Sources */, + 6684CE031566D3EA00A46247 /* SVGTitleElement.m in Sources */, + 6684CE041566D3EA00A46247 /* SVGUtils.m in Sources */, + 6684CE051566D3EA00A46247 /* SVGView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 53fd32f6a98ee619bc19537758bdb2578abcfdfc Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 18 May 2012 20:27:17 +0100 Subject: [PATCH 021/110] FIXED: hit-test for layers was slightly incorrect vs Apple spec - MAY BREAK SOME EXISTING APPS THAT DEPEND ON THE OLD INCORRECT IMPLEMENTATION --- iOS/CALayerWithChildHitTest.m | 10 ++++++---- iOS/CAShapeLayerWithHitTest.m | 15 +++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/iOS/CALayerWithChildHitTest.m b/iOS/CALayerWithChildHitTest.m index 2419b8dd5..a35d20f83 100644 --- a/iOS/CALayerWithChildHitTest.m +++ b/iOS/CALayerWithChildHitTest.m @@ -2,8 +2,6 @@ // CALayerWithChildHitTest.m // SVGKit // -// Created by adam on 27/11/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. // #import "CALayerWithChildHitTest.h" @@ -12,7 +10,7 @@ @implementation CALayerWithChildHitTest - (BOOL) containsPoint:(CGPoint)p { - BOOL boundsContains = CGRectContainsPoint(self.bounds, p); + BOOL boundsContains = CGRectContainsPoint(self.bounds, p); // must be BOUNDS because Apple pre-converts the point to local co-ords before running the test if( boundsContains ) { @@ -20,7 +18,11 @@ - (BOOL) containsPoint:(CGPoint)p for( CALayer* subLayer in self.sublayers ) { - if( [subLayer containsPoint:p] ) + // must pre-convert the point to local co-ords before running the test because Apple defines "containsPoint" in that fashion + + CGPoint pointInSubLayer = [self convertPoint:p toLayer:subLayer]; + + if( [subLayer containsPoint:pointInSubLayer] ) { atLeastOneChildContainsPoint = TRUE; break; diff --git a/iOS/CAShapeLayerWithHitTest.m b/iOS/CAShapeLayerWithHitTest.m index 7787c66d5..a6326a5aa 100644 --- a/iOS/CAShapeLayerWithHitTest.m +++ b/iOS/CAShapeLayerWithHitTest.m @@ -9,19 +9,22 @@ @implementation CAShapeLayerWithHitTest - (BOOL) containsPoint:(CGPoint)p { - //BOOL frameContains = CGRectContainsPoint(self.frame, p); - BOOL boundsContains = CGRectContainsPoint(self.bounds, p); - BOOL pathContains = CGPathContainsPoint(self.path, NULL, p, false); + BOOL boundsContains = CGRectContainsPoint(self.bounds, p); // must be BOUNDS because Apple pre-converts the point to local co-ords before running the test - if( boundsContains && pathContains ) + if( boundsContains ) { + BOOL pathContains = CGPathContainsPoint(self.path, NULL, p, false); + + if( pathContains ) + { for( CALayer* subLayer in self.sublayers ) { NSLog(@"...contains point, Apple will now check sublayer: %@", subLayer); } - return TRUE; + return TRUE; + } } - return NO; + return FALSE; } @end From fbc28f9e9921dd97989ee86fd3d90c4e8167191e Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 19 May 2012 21:35:15 +0100 Subject: [PATCH 022/110] ADDED: backwards compatible with OS X 10.6 (previously was 10.7 only), zero build warnings on OS X and zero on iOS --- Core/SVGElement.m | 4 ++++ Core/SVGImage.h | 2 ++ Core/SVGSVGElement.m | 2 +- Core/SVGView.h | 8 ++++++-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Core/SVGElement.m b/Core/SVGElement.m index 50a2ff8eb..0e38ff4d9 100644 --- a/Core/SVGElement.m +++ b/Core/SVGElement.m @@ -131,6 +131,9 @@ - (void)parseAttributes:(NSDictionary *)attributes { The individual transform definitions are separated by whitespace and/or a comma. */ +#if !(TARGET_OS_IPHONE) && ( !defined( __MAC_10_7 ) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6_7 ) + NSLog(@"[%@] WARNING: the transform attribute requires OS X 10.7 or above. Ignoring TRANSFORMs in SVG!", [self class] ); +#else NSError* error = nil; NSRegularExpression* regexpTransformListItem = [NSRegularExpression regularExpressionWithPattern:@"[^\\(,]*\\([^\\)]*\\)" options:0 error:&error]; @@ -160,6 +163,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { }]; NSLog(@"[%@] Set local / relative transform = (%2.2f, %2.2f // %2.2f, %2.2f) + (%2.2f, %2.2f translate)", [self class], self.transformRelative.a, self.transformRelative.b, self.transformRelative.c, self.transformRelative.d, self.transformRelative.tx, self.transformRelative.ty ); +#endif } #endif } diff --git a/Core/SVGImage.h b/Core/SVGImage.h index 8ca71df7a..e8ce1a77c 100644 --- a/Core/SVGImage.h +++ b/Core/SVGImage.h @@ -57,7 +57,9 @@ #pragma mark - methods to quick load an SVG as an image + (SVGImage *)imageNamed:(NSString *)name; // load from main bundle + (SVGImage *)imageWithContentsOfFile:(NSString *)path; +#if TARGET_OS_IPHONE // doesn't exist on OS X's Image class + (SVGImage *)imageWithData:(NSData *)data; +#endif - (id)initWithContentsOfFile:(NSString *)path; - (id)initWithData:(NSData *)data; diff --git a/Core/SVGSVGElement.m b/Core/SVGSVGElement.m index 56b0b5f35..b7eefc0cd 100644 --- a/Core/SVGSVGElement.m +++ b/Core/SVGSVGElement.m @@ -44,7 +44,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { //osx logging #if TARGET_OS_IPHONE NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromCGRect(self.viewBoxFrame)); -#elif +#else //mac logging NSLog(@"[%@] DEBUG INFO: set document viewBox = %@", [self class], NSStringFromRect(self.viewBoxFrame)); #endif diff --git a/Core/SVGView.h b/Core/SVGView.h index 09cd6258c..3c65260e6 100644 --- a/Core/SVGView.h +++ b/Core/SVGView.h @@ -5,11 +5,15 @@ // Copyright Matt Rajca 2010-2011. All rights reserved. // -#import @class SVGImage; -@interface SVGView : UIView { } +#if TARGET_OS_IPHONE +#import +@interface SVGView :UIView { } +#else +@interface SVGView : NSView { } +#endif @property (nonatomic, retain) SVGImage *image; From e2c8c2866a4ff4cf937d9c10680a27f308f7136c Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 22 May 2012 23:18:09 +0100 Subject: [PATCH 023/110] SPECIAL COMMIT: for others to look at the Core DOM changes I'm proposing --- Core/DOM classes/Core DOM/Attr.h | 32 + Core/DOM classes/Core DOM/Attr.m | 13 + Core/DOM classes/Core DOM/CDATASection.h | 16 + Core/DOM classes/Core DOM/CDATASection.m | 13 + Core/DOM classes/Core DOM/CharacterData.h | 48 + Core/DOM classes/Core DOM/CharacterData.m | 13 + Core/DOM classes/Core DOM/Comment.h | 14 + Core/DOM classes/Core DOM/Comment.m | 13 + Core/DOM classes/Core DOM/Document.h | 100 ++ Core/DOM classes/Core DOM/Document.m | 5 + Core/DOM classes/Core DOM/DocumentFragment.h | 17 + Core/DOM classes/Core DOM/DocumentFragment.m | 13 + Core/DOM classes/Core DOM/Element.h | 94 ++ Core/DOM classes/Core DOM/Element.m | 4 + Core/DOM classes/Core DOM/EntityReference.h | 16 + Core/DOM classes/Core DOM/EntityReference.m | 13 + Core/DOM classes/Core DOM/NamedNodeMap.h | 51 ++ Core/DOM classes/Core DOM/NamedNodeMap.m | 13 + Core/DOM classes/Core DOM/Node.h | 138 +++ Core/DOM classes/Core DOM/Node.m | 13 + Core/DOM classes/Core DOM/NodeList.h | 25 + Core/DOM classes/Core DOM/NodeList.m | 28 + .../Core DOM/ProcessingInstruction.h | 23 + .../Core DOM/ProcessingInstruction.m | 13 + Core/DOM classes/Core DOM/Text.h | 21 + Core/DOM classes/Core DOM/Text.m | 13 + Core/{ => DOM classes}/SVGCircleElement.h | 0 Core/{ => DOM classes}/SVGCircleElement.m | 0 Core/{ => DOM classes}/SVGDefsElement.h | 0 Core/{ => DOM classes}/SVGDefsElement.m | 0 .../{ => DOM classes}/SVGDescriptionElement.h | 0 .../{ => DOM classes}/SVGDescriptionElement.m | 0 Core/DOM classes/SVGDocument.h | 13 + Core/DOM classes/SVGDocument.m | 22 + Core/{ => DOM classes}/SVGElement.h | 11 +- Core/{ => DOM classes}/SVGElement.m | 0 Core/{ => DOM classes}/SVGEllipseElement.h | 0 Core/{ => DOM classes}/SVGEllipseElement.m | 0 Core/{ => DOM classes}/SVGGroupElement.h | 0 Core/{ => DOM classes}/SVGGroupElement.m | 0 Core/{ => DOM classes}/SVGImageElement.h | 0 Core/{ => DOM classes}/SVGImageElement.m | 0 Core/{ => DOM classes}/SVGLineElement.h | 0 Core/{ => DOM classes}/SVGLineElement.m | 0 Core/{ => DOM classes}/SVGPathElement.h | 0 Core/{ => DOM classes}/SVGPathElement.m | 0 Core/{ => DOM classes}/SVGPolygonElement.h | 0 Core/{ => DOM classes}/SVGPolygonElement.m | 0 Core/{ => DOM classes}/SVGPolylineElement.h | 0 Core/{ => DOM classes}/SVGPolylineElement.m | 0 Core/{ => DOM classes}/SVGRectElement.h | 0 Core/{ => DOM classes}/SVGRectElement.m | 0 Core/{ => DOM classes}/SVGSVGElement.h | 0 Core/{ => DOM classes}/SVGSVGElement.m | 0 Core/{ => DOM classes}/SVGShapeElement.h | 0 Core/{ => DOM classes}/SVGShapeElement.m | 0 Core/{ => DOM classes}/SVGTextElement.h | 0 Core/{ => DOM classes}/SVGTextElement.m | 0 Core/{ => DOM classes}/SVGTitleElement.h | 0 Core/{ => DOM classes}/SVGTitleElement.m | 0 ...SVGBasicDataTypes.h => SKBasicDataTypes.h} | 0 ...SVGBasicDataTypes.m => SKBasicDataTypes.m} | 0 Core/{SVGParser.h => SKParser.h} | 0 Core/{SVGParser.m => SKParser.m} | 0 Core/{SVGPattern.h => SKPattern.h} | 11 +- Core/{SVGPattern.m => SKPattern.m} | 15 +- Core/{SVGImage+CA.h => SKSvgImage+CA.h} | 0 Core/{SVGImage+CA.m => SKSvgImage+CA.m} | 2 + Core/{SVGImage.h => SKSvgImage.h} | 14 +- Core/{SVGImage.m => SKSvgImage.m} | 23 +- Core/{SVGSource.h => SKSvgSource.h} | 10 +- Core/{SVGSource.m => SKSvgSource.m} | 12 +- Core/SKSvgView.h | 14 + Core/{SVGView.m => SKSvgView.m} | 0 Core/SVGParseResult.h | 20 - Core/SVGParseResult.m | 49 - Core/SVGParserExtension.h | 38 - Core/SVGParserSVG.h | 10 - Core/SVGParserSVG.m | 188 ---- Core/SVGPointsAndPathsParser.h | 59 -- Core/SVGPointsAndPathsParser.m | 589 ------------ Core/SVGView.h | 22 - .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 860 +++++++++++------- 83 files changed, 1385 insertions(+), 1359 deletions(-) create mode 100644 Core/DOM classes/Core DOM/Attr.h create mode 100644 Core/DOM classes/Core DOM/Attr.m create mode 100644 Core/DOM classes/Core DOM/CDATASection.h create mode 100644 Core/DOM classes/Core DOM/CDATASection.m create mode 100644 Core/DOM classes/Core DOM/CharacterData.h create mode 100644 Core/DOM classes/Core DOM/CharacterData.m create mode 100644 Core/DOM classes/Core DOM/Comment.h create mode 100644 Core/DOM classes/Core DOM/Comment.m create mode 100644 Core/DOM classes/Core DOM/Document.h create mode 100644 Core/DOM classes/Core DOM/Document.m create mode 100644 Core/DOM classes/Core DOM/DocumentFragment.h create mode 100644 Core/DOM classes/Core DOM/DocumentFragment.m create mode 100644 Core/DOM classes/Core DOM/Element.h create mode 100644 Core/DOM classes/Core DOM/Element.m create mode 100644 Core/DOM classes/Core DOM/EntityReference.h create mode 100644 Core/DOM classes/Core DOM/EntityReference.m create mode 100644 Core/DOM classes/Core DOM/NamedNodeMap.h create mode 100644 Core/DOM classes/Core DOM/NamedNodeMap.m create mode 100644 Core/DOM classes/Core DOM/Node.h create mode 100644 Core/DOM classes/Core DOM/Node.m create mode 100644 Core/DOM classes/Core DOM/NodeList.h create mode 100644 Core/DOM classes/Core DOM/NodeList.m create mode 100644 Core/DOM classes/Core DOM/ProcessingInstruction.h create mode 100644 Core/DOM classes/Core DOM/ProcessingInstruction.m create mode 100644 Core/DOM classes/Core DOM/Text.h create mode 100644 Core/DOM classes/Core DOM/Text.m rename Core/{ => DOM classes}/SVGCircleElement.h (100%) rename Core/{ => DOM classes}/SVGCircleElement.m (100%) rename Core/{ => DOM classes}/SVGDefsElement.h (100%) rename Core/{ => DOM classes}/SVGDefsElement.m (100%) rename Core/{ => DOM classes}/SVGDescriptionElement.h (100%) rename Core/{ => DOM classes}/SVGDescriptionElement.m (100%) create mode 100644 Core/DOM classes/SVGDocument.h create mode 100644 Core/DOM classes/SVGDocument.m rename Core/{ => DOM classes}/SVGElement.h (86%) rename Core/{ => DOM classes}/SVGElement.m (100%) rename Core/{ => DOM classes}/SVGEllipseElement.h (100%) rename Core/{ => DOM classes}/SVGEllipseElement.m (100%) rename Core/{ => DOM classes}/SVGGroupElement.h (100%) rename Core/{ => DOM classes}/SVGGroupElement.m (100%) rename Core/{ => DOM classes}/SVGImageElement.h (100%) rename Core/{ => DOM classes}/SVGImageElement.m (100%) rename Core/{ => DOM classes}/SVGLineElement.h (100%) rename Core/{ => DOM classes}/SVGLineElement.m (100%) rename Core/{ => DOM classes}/SVGPathElement.h (100%) rename Core/{ => DOM classes}/SVGPathElement.m (100%) rename Core/{ => DOM classes}/SVGPolygonElement.h (100%) rename Core/{ => DOM classes}/SVGPolygonElement.m (100%) rename Core/{ => DOM classes}/SVGPolylineElement.h (100%) rename Core/{ => DOM classes}/SVGPolylineElement.m (100%) rename Core/{ => DOM classes}/SVGRectElement.h (100%) rename Core/{ => DOM classes}/SVGRectElement.m (100%) rename Core/{ => DOM classes}/SVGSVGElement.h (100%) rename Core/{ => DOM classes}/SVGSVGElement.m (100%) rename Core/{ => DOM classes}/SVGShapeElement.h (100%) rename Core/{ => DOM classes}/SVGShapeElement.m (100%) rename Core/{ => DOM classes}/SVGTextElement.h (100%) rename Core/{ => DOM classes}/SVGTextElement.m (100%) rename Core/{ => DOM classes}/SVGTitleElement.h (100%) rename Core/{ => DOM classes}/SVGTitleElement.m (100%) rename Core/{SVGBasicDataTypes.h => SKBasicDataTypes.h} (100%) rename Core/{SVGBasicDataTypes.m => SKBasicDataTypes.m} (100%) rename Core/{SVGParser.h => SKParser.h} (100%) rename Core/{SVGParser.m => SKParser.m} (100%) rename Core/{SVGPattern.h => SKPattern.h} (63%) rename Core/{SVGPattern.m => SKPattern.m} (57%) rename Core/{SVGImage+CA.h => SKSvgImage+CA.h} (100%) rename Core/{SVGImage+CA.m => SKSvgImage+CA.m} (93%) rename Core/{SVGImage.h => SKSvgImage.h} (92%) rename Core/{SVGImage.m => SKSvgImage.m} (90%) rename Core/{SVGSource.h => SKSvgSource.h} (78%) rename Core/{SVGSource.m => SKSvgSource.m} (91%) create mode 100644 Core/SKSvgView.h rename Core/{SVGView.m => SKSvgView.m} (100%) delete mode 100644 Core/SVGParseResult.h delete mode 100644 Core/SVGParseResult.m delete mode 100644 Core/SVGParserExtension.h delete mode 100644 Core/SVGParserSVG.h delete mode 100644 Core/SVGParserSVG.m delete mode 100644 Core/SVGPointsAndPathsParser.h delete mode 100644 Core/SVGPointsAndPathsParser.m delete mode 100644 Core/SVGView.h diff --git a/Core/DOM classes/Core DOM/Attr.h b/Core/DOM classes/Core DOM/Attr.h new file mode 100644 index 000000000..a3230cddb --- /dev/null +++ b/Core/DOM classes/Core DOM/Attr.h @@ -0,0 +1,32 @@ +/* + SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-637646024 + + interface Attr : Node { + readonly attribute DOMString name; + readonly attribute boolean specified; + attribute DOMString value; + // raises(DOMException) on setting + + // Introduced in DOM Level 2: + readonly attribute Element ownerElement; + }; +*/ +#import + +@class Node; +#import "Node.h" +@class Element; +#import "Element.h" + +@interface Attr : Node +@property(nonatomic,retain,readonly) NSString* name; +@property(nonatomic,readonly) BOOL specified; +@property(nonatomic,retain,readonly) NSString* value; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) Element* ownerElement; +}; + +@end diff --git a/Core/DOM classes/Core DOM/Attr.m b/Core/DOM classes/Core DOM/Attr.m new file mode 100644 index 000000000..913b82670 --- /dev/null +++ b/Core/DOM classes/Core DOM/Attr.m @@ -0,0 +1,13 @@ +// +// Attr.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "Attr.h" + +@implementation Attr + +@end diff --git a/Core/DOM classes/Core DOM/CDATASection.h b/Core/DOM classes/Core DOM/CDATASection.h new file mode 100644 index 000000000..3aeac6952 --- /dev/null +++ b/Core/DOM classes/Core DOM/CDATASection.h @@ -0,0 +1,16 @@ +/* + From SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-667469212 + + interface CDATASection : Text { + }; + */ +#import + +@class Text; +#import "Text.h" + +@interface CDATASection : Text + +@end diff --git a/Core/DOM classes/Core DOM/CDATASection.m b/Core/DOM classes/Core DOM/CDATASection.m new file mode 100644 index 000000000..2c2adc448 --- /dev/null +++ b/Core/DOM classes/Core DOM/CDATASection.m @@ -0,0 +1,13 @@ +// +// CDATASection.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "CDATASection.h" + +@implementation CDATASection + +@end diff --git a/Core/DOM classes/Core DOM/CharacterData.h b/Core/DOM classes/Core DOM/CharacterData.h new file mode 100644 index 000000000..41f0a9e52 --- /dev/null +++ b/Core/DOM classes/Core DOM/CharacterData.h @@ -0,0 +1,48 @@ +/* + From SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-FF21A306 + + interface CharacterData : Node { + attribute DOMString data; + // raises(DOMException) on setting + // raises(DOMException) on retrieval + + readonly attribute unsigned long length; + DOMString substringData(in unsigned long offset, + in unsigned long count) + raises(DOMException); + void appendData(in DOMString arg) + raises(DOMException); + void insertData(in unsigned long offset, + in DOMString arg) + raises(DOMException); + void deleteData(in unsigned long offset, + in unsigned long count) + raises(DOMException); + void replaceData(in unsigned long offset, + in unsigned long count, + in DOMString arg) + raises(DOMException); + }; + + */ + +#import + +@class Node; +#import "Node.h" + +@interface CharacterData : Node + +@property(nonatomic,retain,readonly) NSString* data; + +@property(nonatomic,readonly) unsigned long length; + +-(NSString*) substringData:(unsigned long) offset count:(unsigned long) count; +-(void) appendData:(NSString*) arg; +-(void) insertData:(unsigned long) offset arg:(NSString*) arg; +-(void) deleteData:(unsigned long) offset count:(unsigned long) count; +-(void) replaceData:(unsigned long) offset count:(unsigned long) count arg:(NSString*) arg; + +@end diff --git a/Core/DOM classes/Core DOM/CharacterData.m b/Core/DOM classes/Core DOM/CharacterData.m new file mode 100644 index 000000000..2135c8de1 --- /dev/null +++ b/Core/DOM classes/Core DOM/CharacterData.m @@ -0,0 +1,13 @@ +// +// CharacterData.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "CharacterData.h" + +@implementation CharacterData + +@end diff --git a/Core/DOM classes/Core DOM/Comment.h b/Core/DOM classes/Core DOM/Comment.h new file mode 100644 index 000000000..73a6ec8bd --- /dev/null +++ b/Core/DOM classes/Core DOM/Comment.h @@ -0,0 +1,14 @@ +/* + From SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1728279322 + + interface Comment : CharacterData { + }; +*/ + +#import + +@interface Comment : CharacterData + +@end diff --git a/Core/DOM classes/Core DOM/Comment.m b/Core/DOM classes/Core DOM/Comment.m new file mode 100644 index 000000000..493871056 --- /dev/null +++ b/Core/DOM classes/Core DOM/Comment.m @@ -0,0 +1,13 @@ +// +// Comment.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "Comment.h" + +@implementation Comment + +@end diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h new file mode 100644 index 000000000..df40c3746 --- /dev/null +++ b/Core/DOM classes/Core DOM/Document.h @@ -0,0 +1,100 @@ +/* +// Document.h + + NOT a Cocoa / Apple document, + NOT an SVG document, + BUT INSTEAD: a DOM document (blame w3.org for the too-generic name). + + Required for SVG-DOM + + c.f.: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document + + interface Document : Node { + readonly attribute DocumentType doctype; + readonly attribute DOMImplementation implementation; + readonly attribute Element documentElement; + Element createElement(in DOMString tagName) + raises(DOMException); + DocumentFragment createDocumentFragment(); + Text createTextNode(in DOMString data); + Comment createComment(in DOMString data); + CDATASection createCDATASection(in DOMString data) + raises(DOMException); + ProcessingInstruction createProcessingInstruction(in DOMString target, + in DOMString data) + raises(DOMException); + Attr createAttribute(in DOMString name) + raises(DOMException); + EntityReference createEntityReference(in DOMString name) + raises(DOMException); + NodeList getElementsByTagName(in DOMString tagname); + // Introduced in DOM Level 2: + Node importNode(in Node importedNode, + in boolean deep) + raises(DOMException); + // Introduced in DOM Level 2: + Element createElementNS(in DOMString namespaceURI, + in DOMString qualifiedName) + raises(DOMException); + // Introduced in DOM Level 2: + Attr createAttributeNS(in DOMString namespaceURI, + in DOMString qualifiedName) + raises(DOMException); + // Introduced in DOM Level 2: + NodeList getElementsByTagNameNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + Element getElementById(in DOMString elementId); + }; + + + */ + +#import + +@class Node; +#import "Node.h" +@class Element; +#import "Element.h" +@class Comment; +#import "Comment.h" +@class CDATASection; +#import "CDATASection.h" +@class NodeList; +#import "NodeList.h" + +@interface Document : Node + +@property(nonatomic,retain,readonly) DocumentType doctype; +@property(nonatomic,retain,readonly) DOMImplementation implementation; +@property(nonatomic,retain,readonly) Element documentElement; + + +-(Element*) createElement:(NSString*) tagName; +-(DocumentFragment*) createDocumentFragment; +-(Text*) createTextNode:(NSString*) data; +-(Comment*) createComment:(NSString*) data; +-(CDATASection*) createCDATASection:(NSString*) data; +-(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(NSString*) data; +-(Attr*) createAttribute:(NSString*) data; +-(EntityReference*) createEntityReference:(NSString*) data; +-(NodeList*) getElementsByTagName:(NSString*) data; + +// Introduced in DOM Level 2: +-(Node*) importNode:(Node*) importedNode deep:(BOOL) deep; + +// Introduced in DOM Level 2: +-(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName; + +// Introduced in DOM Level 2: +-(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName; + +// Introduced in DOM Level 2: +-(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI qualifiedName:(NSString*) localName; + +// Introduced in DOM Level 2: +-(Element*) getElementById:(NSString*) elementId; + +@end diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m new file mode 100644 index 000000000..2f2fc077c --- /dev/null +++ b/Core/DOM classes/Core DOM/Document.m @@ -0,0 +1,5 @@ +#import "Document.h" + +@implementation Document + +@end diff --git a/Core/DOM classes/Core DOM/DocumentFragment.h b/Core/DOM classes/Core DOM/DocumentFragment.h new file mode 100644 index 000000000..27f22831b --- /dev/null +++ b/Core/DOM classes/Core DOM/DocumentFragment.h @@ -0,0 +1,17 @@ +/* + From SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-B63ED1A3 + + interface DocumentFragment : Node { + }; +*/ + +#import + +@class Node; +#import "Node.h" + +@interface DocumentFragment : Node + +@end diff --git a/Core/DOM classes/Core DOM/DocumentFragment.m b/Core/DOM classes/Core DOM/DocumentFragment.m new file mode 100644 index 000000000..d7497ed55 --- /dev/null +++ b/Core/DOM classes/Core DOM/DocumentFragment.m @@ -0,0 +1,13 @@ +// +// DocumentFragment.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "DocumentFragment.h" + +@implementation DocumentFragment + +@end diff --git a/Core/DOM classes/Core DOM/Element.h b/Core/DOM classes/Core DOM/Element.h new file mode 100644 index 000000000..580aa2559 --- /dev/null +++ b/Core/DOM classes/Core DOM/Element.h @@ -0,0 +1,94 @@ +/* + From SVG-DOM, via Core-DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-745549614 + + interface Element : Node { + readonly attribute DOMString tagName; + DOMString getAttribute(in DOMString name); + void setAttribute(in DOMString name, + in DOMString value) + raises(DOMException); + void removeAttribute(in DOMString name) + raises(DOMException); + Attr getAttributeNode(in DOMString name); + Attr setAttributeNode(in Attr newAttr) + raises(DOMException); + Attr removeAttributeNode(in Attr oldAttr) + raises(DOMException); + NodeList getElementsByTagName(in DOMString name); + // Introduced in DOM Level 2: + DOMString getAttributeNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + void setAttributeNS(in DOMString namespaceURI, + in DOMString qualifiedName, + in DOMString value) + raises(DOMException); + // Introduced in DOM Level 2: + void removeAttributeNS(in DOMString namespaceURI, + in DOMString localName) + raises(DOMException); + // Introduced in DOM Level 2: + Attr getAttributeNodeNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + Attr setAttributeNodeNS(in Attr newAttr) + raises(DOMException); + // Introduced in DOM Level 2: + NodeList getElementsByTagNameNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + boolean hasAttribute(in DOMString name); + // Introduced in DOM Level 2: + boolean hasAttributeNS(in DOMString namespaceURI, + in DOMString localName); + }; + */ + +#import + +@class Node; +#import "Node.h" +@class Attr; +#import "Attr.h" +@class NodeList; +#import "NodeList.h" + +@interface Element : Node + +@property(nonatomic,retain,readonly) NSString* tagName; + +-(NSString*) getAttribute:(NSString*) name; +-(void) setAttribute:(NSString*) name value:(NSString*) value; +-(void) removeAttribute:(NSString*) name; +-(Attr*) getAttributeNode:(NSString*) name; +-(Attr*) setAttributeNode:(Attr*) newAttr; +-(Attr*) removeAttributeNode:(Attr*) oldAttr; +-(NodeList*) getElementsByTagName:(NSString*) name; + +// Introduced in DOM Level 2: +-(NSString*) getAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName; + +// Introduced in DOM Level 2: +-(void) setAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName value:(NSString*) value; + +// Introduced in DOM Level 2: +-(void) removeAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName; + +// Introduced in DOM Level 2: +-(Attr*) getAttributeNodeNS:(NSString*) namespaceURI localName:(NSString*) localName; + +// Introduced in DOM Level 2: +-(Attr*) setAttributeNodeNS:(Attr*) newAttr; + +// Introduced in DOM Level 2: +-(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName; + +// Introduced in DOM Level 2: +-(BOOL) hasAttribute:(NSString*) name; + +// Introduced in DOM Level 2: +-(BOOL) hasAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName; + +@end diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m new file mode 100644 index 000000000..37cc78f10 --- /dev/null +++ b/Core/DOM classes/Core DOM/Element.m @@ -0,0 +1,4 @@ +#import "Element.h" + +@implementation Element +@end diff --git a/Core/DOM classes/Core DOM/EntityReference.h b/Core/DOM classes/Core DOM/EntityReference.h new file mode 100644 index 000000000..a5f668499 --- /dev/null +++ b/Core/DOM classes/Core DOM/EntityReference.h @@ -0,0 +1,16 @@ +/* + From SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-11C98490 + + interface EntityReference : Node { + }; + */ +#import + +@class Node; +#import "Node.h" + +@interface EntityReference : Node + +@end diff --git a/Core/DOM classes/Core DOM/EntityReference.m b/Core/DOM classes/Core DOM/EntityReference.m new file mode 100644 index 000000000..161bea906 --- /dev/null +++ b/Core/DOM classes/Core DOM/EntityReference.m @@ -0,0 +1,13 @@ +// +// EntityReference.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "EntityReference.h" + +@implementation EntityReference + +@end diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.h b/Core/DOM classes/Core DOM/NamedNodeMap.h new file mode 100644 index 000000000..c1d9f1b30 --- /dev/null +++ b/Core/DOM classes/Core DOM/NamedNodeMap.h @@ -0,0 +1,51 @@ +/* + From SVG-DOM, via Core-DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1780488922 + + interface NamedNodeMap { + Node getNamedItem(in DOMString name); + Node setNamedItem(in Node arg) + raises(DOMException); + Node removeNamedItem(in DOMString name) + raises(DOMException); + Node item(in unsigned long index); + readonly attribute unsigned long length; + // Introduced in DOM Level 2: + Node getNamedItemNS(in DOMString namespaceURI, + in DOMString localName); + // Introduced in DOM Level 2: + Node setNamedItemNS(in Node arg) + raises(DOMException); + // Introduced in DOM Level 2: + Node removeNamedItemNS(in DOMString namespaceURI, + in DOMString localName) + raises(DOMException); + }; + + */ + +#import + +@class Node; +#import "Node.h" + +@interface NamedNodeMap : NSObject + +-(Node*) getNamedItem(in DOMString name); +-(Node*) setNamedItem(in Node arg) +-(Node*) removeNamedItem(in DOMString name) +-(Node*) item(in unsigned long index); + +@property(readonly) unsigned long length; + +// Introduced in DOM Level 2: +-(Node*) getNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName; + +// Introduced in DOM Level 2: +-(Node*) setNamedItemNS:(Node*) arg; + +// Introduced in DOM Level 2: +-(Node*) removeNamedItemNS(NSString*) namespaceURI localName:(NSString*) localName; + +@end diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.m b/Core/DOM classes/Core DOM/NamedNodeMap.m new file mode 100644 index 000000000..3907e02e6 --- /dev/null +++ b/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -0,0 +1,13 @@ +// +// NamedNodeMap.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "NamedNodeMap.h" + +@implementation NamedNodeMap + +@end diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h new file mode 100644 index 000000000..dc4752d0c --- /dev/null +++ b/Core/DOM classes/Core DOM/Node.h @@ -0,0 +1,138 @@ +/* +// Node.h +* + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + + interface Node { + + // NodeType + const unsigned short ELEMENT_NODE = 1; + const unsigned short ATTRIBUTE_NODE = 2; + const unsigned short TEXT_NODE = 3; + const unsigned short CDATA_SECTION_NODE = 4; + const unsigned short ENTITY_REFERENCE_NODE = 5; + const unsigned short ENTITY_NODE = 6; + const unsigned short PROCESSING_INSTRUCTION_NODE = 7; + const unsigned short COMMENT_NODE = 8; + const unsigned short DOCUMENT_NODE = 9; + const unsigned short DOCUMENT_TYPE_NODE = 10; + const unsigned short DOCUMENT_FRAGMENT_NODE = 11; + const unsigned short NOTATION_NODE = 12; + + readonly attribute DOMString nodeName; + attribute DOMString nodeValue; + // raises(DOMException) on setting + // raises(DOMException) on retrieval + + readonly attribute unsigned short nodeType; + readonly attribute Node parentNode; + readonly attribute NodeList childNodes; + readonly attribute Node firstChild; + readonly attribute Node lastChild; + readonly attribute Node previousSibling; + readonly attribute Node nextSibling; + readonly attribute NamedNodeMap attributes; + // Modified in DOM Level 2: + readonly attribute Document ownerDocument; + Node insertBefore(in Node newChild, + in Node refChild) + raises(DOMException); + Node replaceChild(in Node newChild, + in Node oldChild) + raises(DOMException); + Node removeChild(in Node oldChild) + raises(DOMException); + Node appendChild(in Node newChild) + raises(DOMException); + boolean hasChildNodes(); + Node cloneNode(in boolean deep); + // Modified in DOM Level 2: + void normalize(); + // Introduced in DOM Level 2: + boolean isSupported(in DOMString feature, + in DOMString version); + // Introduced in DOM Level 2: + readonly attribute DOMString namespaceURI; + // Introduced in DOM Level 2: + attribute DOMString prefix; + // raises(DOMException) on setting + + // Introduced in DOM Level 2: + readonly attribute DOMString localName; + // Introduced in DOM Level 2: + boolean hasAttributes(); + }; + +*/ + +#import + +@class NodeList; +#import "NodeList.h" + +@class NamedNodeMap; +#import "NamedNodeMap.h" + +typedef enum SKNodeType +{ + SKNodeType_ELEMENT_NODE = 1; + SKNodeType_ATTRIBUTE_NODE = 2; + SKNodeType_TEXT_NODE = 3; + SKNodeType_CDATA_SECTION_NODE = 4; + SKNodeType_ENTITY_REFERENCE_NODE = 5; + SKNodeType_ENTITY_NODE = 6; + SKNodeType_PROCESSING_INSTRUCTION_NODE = 7; + SKNodeType_COMMENT_NODE = 8; + SKNodeType_DOCUMENT_NODE = 9; + SKNodeType_DOCUMENT_TYPE_NODE = 10; + SKNodeType_DOCUMENT_FRAGMENT_NODE = 11; + SKNodeType_NOTATION_NODE = 12; +} +SKNodeType; + +@interface Node : NSObject + +@property(nonatomic,retain,readonly) NSString* nodeName; +@property(nonatomic,retain,readonly) NSString* nodeValue; + +@property(nonatomic,retain,readonly) SKNodeType nodeType; +@property(nonatomic,retain,readonly) Node* parentNode; +@property(nonatomic,retain,readonly) NodeList* childNodes; +@property(nonatomic,retain,readonly) Node* firstChild; +@property(nonatomic,retain,readonly) Node* lastChild; +@property(nonatomic,retain,readonly) Node* previousSibling; +@property(nonatomic,retain,readonly) Node* nextSibling; +@property(nonatomic,retain,readonly) NamedNodeMap* attributes; + +// Modified in DOM Level 2: +@property(nonatomic,retain,readonly) Document* ownerDocument; + +-(Node*) insertBefore:(Node*) newChild refChild:(Node*) refChild; + +-(Node*) replaceChild:(Node*) newChild oldChild:(Node*) oldChild; +-(Node*) removeChild:(Node*) oldChild; +-(Node*) appendChild:(Node*) newChild; + +@property(nonatomic) BOOL hasChildNodes; + +-(Node*) cloneNode:(BOOL) deep; + +// Modified in DOM Level 2: +-(void) normalize; + +// Introduced in DOM Level 2: +-(BOOL) isSupportedFeature:(NSString*) feature version:(NSString*) version; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) NSString* namespaceURI; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) NSString* prefix; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) NSString* localName; + +// Introduced in DOM Level 2: +@property(nonatomic) BOOL hasAttributes; + +@end diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m new file mode 100644 index 000000000..4bffe935c --- /dev/null +++ b/Core/DOM classes/Core DOM/Node.m @@ -0,0 +1,13 @@ +// +// Node.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "Node.h" + +@implementation Node + +@end diff --git a/Core/DOM classes/Core DOM/NodeList.h b/Core/DOM classes/Core DOM/NodeList.h new file mode 100644 index 000000000..21d7d4377 --- /dev/null +++ b/Core/DOM classes/Core DOM/NodeList.h @@ -0,0 +1,25 @@ +/* + Implemented internally via an NSArray + + From SVG DOM, via CoreDOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177 + + interface NodeList { + Node item(in unsigned long index); + readonly attribute unsigned long length; + }; + + */ +#import + +@class Node; +#import "Node.h" + +@interface NodeList : NSObject + +@property(readonly) long length; + +-(Node*) item:(int) index; + +@end diff --git a/Core/DOM classes/Core DOM/NodeList.m b/Core/DOM classes/Core DOM/NodeList.m new file mode 100644 index 000000000..b299e0d58 --- /dev/null +++ b/Core/DOM classes/Core DOM/NodeList.m @@ -0,0 +1,28 @@ +#import "NodeList.h" + +@interface NodeList() +@property(nonatomic,retain) NSMutableArray* internalArray; +@end + +@implementation NodeList + +- (id)init { + self = [super init]; + + if (self) { + self.internalArray = [NSMutableArray array]; + } + return self; +} + +-(Node*) item:(int) index +{ + return [self.internalArray objectAtIndex:index]; +} + +-(long)length +{ + return [self.internalArray count]; +} + +@end diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.h b/Core/DOM classes/Core DOM/ProcessingInstruction.h new file mode 100644 index 000000000..8f53092b6 --- /dev/null +++ b/Core/DOM classes/Core DOM/ProcessingInstruction.h @@ -0,0 +1,23 @@ +/* + SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1004215813 + + interface ProcessingInstruction : Node { + readonly attribute DOMString target; + attribute DOMString data; + // raises(DOMException) on setting + + }; +*/ + +#import + +@class Node; +#import "Node.h" + +@interface ProcessingInstruction : Node +@property(nonatomic,retain,readonly) NSString* target; +@property(nonatomic,retain,readonly) NSString* data; + +@end diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.m b/Core/DOM classes/Core DOM/ProcessingInstruction.m new file mode 100644 index 000000000..e129d801a --- /dev/null +++ b/Core/DOM classes/Core DOM/ProcessingInstruction.m @@ -0,0 +1,13 @@ +// +// ProcessingInstruction.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "ProcessingInstruction.h" + +@implementation ProcessingInstruction + +@end diff --git a/Core/DOM classes/Core DOM/Text.h b/Core/DOM classes/Core DOM/Text.h new file mode 100644 index 000000000..bde7f9dd1 --- /dev/null +++ b/Core/DOM classes/Core DOM/Text.h @@ -0,0 +1,21 @@ +/* + SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1312295772 + + interface Text : CharacterData { + Text splitText(in unsigned long offset) + raises(DOMException); + }; +*/ + +#import + +@class CharacterData; +#import "CharacterData.h" + +@interface Text : CharacterData + +-(Text) splitText:(unsigned long) offset; + +@end diff --git a/Core/DOM classes/Core DOM/Text.m b/Core/DOM classes/Core DOM/Text.m new file mode 100644 index 000000000..465282450 --- /dev/null +++ b/Core/DOM classes/Core DOM/Text.m @@ -0,0 +1,13 @@ +// +// Text.m +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "Text.h" + +@implementation Text + +@end diff --git a/Core/SVGCircleElement.h b/Core/DOM classes/SVGCircleElement.h similarity index 100% rename from Core/SVGCircleElement.h rename to Core/DOM classes/SVGCircleElement.h diff --git a/Core/SVGCircleElement.m b/Core/DOM classes/SVGCircleElement.m similarity index 100% rename from Core/SVGCircleElement.m rename to Core/DOM classes/SVGCircleElement.m diff --git a/Core/SVGDefsElement.h b/Core/DOM classes/SVGDefsElement.h similarity index 100% rename from Core/SVGDefsElement.h rename to Core/DOM classes/SVGDefsElement.h diff --git a/Core/SVGDefsElement.m b/Core/DOM classes/SVGDefsElement.m similarity index 100% rename from Core/SVGDefsElement.m rename to Core/DOM classes/SVGDefsElement.m diff --git a/Core/SVGDescriptionElement.h b/Core/DOM classes/SVGDescriptionElement.h similarity index 100% rename from Core/SVGDescriptionElement.h rename to Core/DOM classes/SVGDescriptionElement.h diff --git a/Core/SVGDescriptionElement.m b/Core/DOM classes/SVGDescriptionElement.m similarity index 100% rename from Core/SVGDescriptionElement.m rename to Core/DOM classes/SVGDescriptionElement.m diff --git a/Core/DOM classes/SVGDocument.h b/Core/DOM classes/SVGDocument.h new file mode 100644 index 000000000..b34187f9b --- /dev/null +++ b/Core/DOM classes/SVGDocument.h @@ -0,0 +1,13 @@ +// +// SVGDocument.h +// SVGKit +// +// Created by adam on 22/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface SVGDocument : NSObject + +@end diff --git a/Core/DOM classes/SVGDocument.m b/Core/DOM classes/SVGDocument.m new file mode 100644 index 000000000..87cc18a5e --- /dev/null +++ b/Core/DOM classes/SVGDocument.m @@ -0,0 +1,22 @@ +/** + SVGDocument + + SVG spec defines this as part of the DOM version of SVG: + + http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGDocument + */ + +#import "SVGDocument.h" + +#import "SVGBasicDataTypes.h" + +@implementation SVGDocument : Document + + +@property (nonatomic, retain, readonly) NSString* title; +@property (nonatomic, retain, readonly) NSString* referrer; +@property (nonatomic, retain, readonly) NSString* domain; +@property (nonatomic, retain, readonly) NSString* URL; +@property (nonatomic, retain, readonly) SVGSVGElement* rootElement; + +@end diff --git a/Core/SVGElement.h b/Core/DOM classes/SVGElement.h similarity index 86% rename from Core/SVGElement.h rename to Core/DOM classes/SVGElement.h index be98409d7..b206f1ad4 100644 --- a/Core/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -1,8 +1,15 @@ /** SVGElement - Data: - - "children": child elements (SVG is a tree: every element can have chidren) + This class is WRONG: most of the properties and methods should NOT be implemented here, but instead in the + superclass "Node". + + c.f. official definition of "Node" in SVG: + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + + + Documenting the actual data in this class (even though it's incorrect): + - "children": nb: the correct name would be "childNodes", according to SVG spec ... child elements (SVG is a tree: every element can have chidren) - "localName": the final part of the SVG tag (e.g. in " #if TARGET_OS_IPHONE @@ -12,14 +7,14 @@ #endif /** lightweight wrapper for UIColor so that we can draw with fill patterns */ -@interface SVGPattern : NSObject +@interface SKPattern : NSObject { } #if TARGET_OS_IPHONE -+ (SVGPattern*) patternWithUIColor:(UIColor*)color; -+ (SVGPattern*) patternWithImage:(UIImage*)image; ++ (SKPattern*) patternWithUIColor:(UIColor*)color; ++ (SKPattern*) patternWithImage:(UIImage*)image; @property (readwrite,nonatomic,retain) UIColor* color; diff --git a/Core/SVGPattern.m b/Core/SKPattern.m similarity index 57% rename from Core/SVGPattern.m rename to Core/SKPattern.m index 6adb817fa..b09ee2e13 100644 --- a/Core/SVGPattern.m +++ b/Core/SKPattern.m @@ -1,24 +1,19 @@ -// -// SVGPattern.m -// SVGKit -// +#import "SKPattern.h" -#import "SVGPattern.h" - -@implementation SVGPattern +@implementation SKPattern #if TARGET_OS_IPHONE @synthesize color; -+ (SVGPattern *)patternWithUIColor:(UIColor *)color ++ (SKPattern *)patternWithUIColor:(UIColor *)color { - SVGPattern* p = [[[SVGPattern alloc] init] autorelease]; + SKPattern* p = [[[SKPattern alloc] init] autorelease]; p.color = color; return p; } -+ (SVGPattern*)patternWithImage:(UIImage*)image ++ (SKPattern*)patternWithImage:(UIImage*)image { UIColor* patternImage = [UIColor colorWithPatternImage:image]; return [self patternWithUIColor:patternImage]; diff --git a/Core/SVGImage+CA.h b/Core/SKSvgImage+CA.h similarity index 100% rename from Core/SVGImage+CA.h rename to Core/SKSvgImage+CA.h diff --git a/Core/SVGImage+CA.m b/Core/SKSvgImage+CA.m similarity index 93% rename from Core/SVGImage+CA.m rename to Core/SKSvgImage+CA.m index 34b38a571..302e70b3c 100644 --- a/Core/SVGImage+CA.m +++ b/Core/SKSvgImage+CA.m @@ -44,6 +44,8 @@ -(CALayer *)newLayerTree - (CALayer *)newLayerWithElement:(SVGElement *)element { CALayer *layer = [element newLayer]; + NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), element.identifier); + if (![element.children count]) { return layer; } diff --git a/Core/SVGImage.h b/Core/SKSvgImage.h similarity index 92% rename from Core/SVGImage.h rename to Core/SKSvgImage.h index e8ce1a77c..c246e24d7 100644 --- a/Core/SVGImage.h +++ b/Core/SKSvgImage.h @@ -38,7 +38,7 @@ } #if TARGET_OS_IPHONE -@property (nonatomic, readonly) UIImage* uiImage; /** generates an image on the fly */ +@property (nonatomic, readonly) UIImage* UIImage; /** generates an image on the fly */ #endif @property (nonatomic, readonly) SVGLength svgWidth; @@ -49,9 +49,10 @@ // convenience accessors to parsed children @property (nonatomic, readonly) NSString *title; @property (nonatomic, readonly) NSString *svgDescription; // 'description' is reserved by NSObject -@property (nonatomic, readonly) SVGDefsElement *defs; +@property (nonatomic, readonly) SVGDefsElement *defs; // needs renaming + (possibly) refactoring -@property (nonatomic, readonly) SVGSVGElement* rootElement; +@property (nonatomic, retain, readonly) SVGSVGElement* DOMTree; +@property (nonatomic, retain, readonly) CALayer* CALayerTree; #pragma mark - methods to quick load an SVG as an image @@ -110,9 +111,6 @@ - (id)initWithContentsOfFile:(NSString *)aPath; - (id)initWithFrame:(CGRect)frame; -#pragma mark - utility methods - - -@end - +#pragma mark - core methods for interacting with an SVG image usefully (not from UIImage) +@end \ No newline at end of file diff --git a/Core/SVGImage.m b/Core/SKSvgImage.m similarity index 90% rename from Core/SVGImage.m rename to Core/SKSvgImage.m index 764c1dbb2..2dd6affc1 100644 --- a/Core/SVGImage.m +++ b/Core/SKSvgImage.m @@ -23,6 +23,8 @@ - (SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error; @property (nonatomic, readwrite) SVGLength svgHeight; @property (nonatomic, readwrite) SVGParseResult* parseErrorsAndWarnings; +@property (nonatomic, retain, readwrite) SVGSVGElement* DOMTree; // needs renaming + (possibly) refactoring +@property (nonatomic, retain, readwrite) CALayer* CALayerTree; #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods //NOT DEFINED: what is the scale for a SVGImage? @property(nonatomic,readwrite) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); @@ -36,7 +38,6 @@ @implementation SVGImage @synthesize svgHeight = _height; @synthesize source; @synthesize parseErrorsAndWarnings; -@synthesize rootElement = _rootElement; @dynamic title, svgDescription, defs; @@ -84,9 +85,9 @@ - (id)initWithContentsOfFile:(NSString *)aPath { self.svgHeight = SVGLengthZero; NSError* parseError = nil; - self.rootElement = [self parseFileAtPath:aPath error:&parseError]; + self.DOMTree = [self parseFileAtPath:aPath error:&parseError]; - if ( self.rootElement == nil ) { + if ( self.DOMTree == nil ) { } else { @@ -107,8 +108,8 @@ - (id)initWithContentsOfURL:(NSURL *)url { _width = SVGLengthZero; _height = SVGLengthZero; - self.rootElement = [self parseFileAtURL:url]; - if ( self.rootElement == nil ) { + self.DOMTree = [self parseFileAtURL:url]; + if ( self.DOMTree == nil ) { } else @@ -124,7 +125,7 @@ - (id) initWithFrame:(CGRect)frame { self = [super init]; if (self) { - self.rootElement = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; + self.DOMTree = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; _width = SVGLengthGetWidth(frame); _height = SVGLengthGetHeight(frame); @@ -133,7 +134,7 @@ - (id) initWithFrame:(CGRect)frame } - (void)dealloc { - self.rootElement = nil; + self.DOMTree = nil; [super dealloc]; } @@ -167,7 +168,7 @@ -(CGFloat)scale } #if TARGET_OS_IPHONE --(UIImage *)uiImage +-(UIImage *)UIImage { NSAssert( FALSE, @"Auto-converting SVGImage to a rasterized UIImage is not yet implemented by SVGKit" ); return nil; @@ -260,15 +261,15 @@ - (CALayer *)newLayer { - (void)layoutLayer:(CALayer *)layer { } - (NSString *)title { - return [self.rootElement findFirstElementOfClass:[SVGTitleElement class]].stringValue; + return [self.DOMTree findFirstElementOfClass:[SVGTitleElement class]].stringValue; } - (NSString *)desc { - return [self.rootElement findFirstElementOfClass:[SVGDescriptionElement class]].stringValue; + return [self.DOMTree findFirstElementOfClass:[SVGDescriptionElement class]].stringValue; } - (SVGDefsElement *)defs { - return (SVGDefsElement *) [self.rootElement findFirstElementOfClass:[SVGDefsElement class]]; + return (SVGDefsElement *) [self.DOMTree findFirstElementOfClass:[SVGDefsElement class]]; } @end diff --git a/Core/SVGSource.h b/Core/SKSvgSource.h similarity index 78% rename from Core/SVGSource.h rename to Core/SKSvgSource.h index f87541b25..c1f367697 100644 --- a/Core/SVGSource.h +++ b/Core/SKSvgSource.h @@ -1,7 +1,7 @@ /** - SVGSource.h + SKSvgSource.h - SVGSource represents the info about a file that was read from disk or over the web during parsing. + SKSvgSource represents the info about a file that was read from disk or over the web during parsing. Once it has been parsed / loaded, that info is NOT PART OF the in-memory SVG any more - if you were to save the file, you could save it in a different location, with a different SVG Spec, etc. @@ -15,15 +15,15 @@ #import -@interface SVGSource : NSObject +@interface SKSvgSource : NSObject @property(nonatomic,retain) NSString* svgLanguageVersion; /*< */ @property(nonatomic) BOOL hasSourceFile, hasSourceURL; @property(nonatomic,retain) NSString* filePath; @property(nonatomic,retain) NSURL* URL; -+(SVGSource*) sourceFromFilename:(NSString*) p; -+(SVGSource*) sourceFromURL:(NSURL*) u; ++(SKSvgSource*) sourceFromFilename:(NSString*) p; ++(SKSvgSource*) sourceFromURL:(NSURL*) u; -(id) newHandle:(NSError**) error; -(void) closeHandle:(id) handle; diff --git a/Core/SVGSource.m b/Core/SKSvgSource.m similarity index 91% rename from Core/SVGSource.m rename to Core/SKSvgSource.m index daf9a7b99..decc928af 100644 --- a/Core/SVGSource.m +++ b/Core/SKSvgSource.m @@ -1,15 +1,15 @@ -#import "SVGSource.h" +#import "SKSvgSource.h" -@implementation SVGSource +@implementation SKSvgSource @synthesize svgLanguageVersion; @synthesize hasSourceFile, hasSourceURL; @synthesize filePath, URL; -+(SVGSource*) sourceFromFilename:(NSString*) p ++(SKSvgSource*) sourceFromFilename:(NSString*) p { - SVGSource* d = [[[SVGSource alloc] init] autorelease]; + SVGSource* d = [[[SKSvgSource alloc] init] autorelease]; d.hasSourceFile = TRUE; d.filePath = p; @@ -17,9 +17,9 @@ +(SVGSource*) sourceFromFilename:(NSString*) p return d; } -+(SVGSource*) sourceFromURL:(NSURL*) u ++(SKSvgSource*) sourceFromURL:(NSURL*) u { - SVGSource* d = [[[SVGSource alloc] init] autorelease]; + SKSvgSource* d = [[[SKSvgSource alloc] init] autorelease]; d.hasSourceURL = TRUE; d.URL = u; diff --git a/Core/SKSvgView.h b/Core/SKSvgView.h new file mode 100644 index 000000000..906740e47 --- /dev/null +++ b/Core/SKSvgView.h @@ -0,0 +1,14 @@ +@class SKSvgImage; + +#if TARGET_OS_IPHONE +#import +@interface SKSvgView :UIView { } +#else +@interface SKSvgView : NSView { } +#endif + +@property (nonatomic, retain) SKSvgImage *image; + +- (id)initWithImage:(SKSvgImage *)image; // set frame to position + +@end diff --git a/Core/SVGView.m b/Core/SKSvgView.m similarity index 100% rename from Core/SVGView.m rename to Core/SKSvgView.m diff --git a/Core/SVGParseResult.h b/Core/SVGParseResult.h deleted file mode 100644 index 50dd5db02..000000000 --- a/Core/SVGParseResult.h +++ /dev/null @@ -1,20 +0,0 @@ -/** - Reports detailed information from an attempted run of the SVG Parser - */ -#import - -#import "SVGElement.h" - -@interface SVGParseResult : NSObject - -@property(nonatomic, retain) NSMutableArray* warnings, * errorsRecoverable, * errorsFatal; -@property(nonatomic) BOOL libXMLFailed; - -@property(nonatomic,retain) SVGElement* rootOfSVGTree; - --(void) addSourceError:(NSError*) fatalError; --(void) addParseWarning:(NSError*) warning; --(void) addParseErrorRecoverable:(NSError*) recoverableError; --(void) addParseErrorFatal:(NSError*) fatalError; --(void) addSAXError:(NSError*) saxError; -@end diff --git a/Core/SVGParseResult.m b/Core/SVGParseResult.m deleted file mode 100644 index b164fe619..000000000 --- a/Core/SVGParseResult.m +++ /dev/null @@ -1,49 +0,0 @@ -#import "SVGParseResult.h" - -@implementation SVGParseResult - -@synthesize libXMLFailed; -@synthesize rootOfSVGTree; -@synthesize warnings, errorsRecoverable, errorsFatal; - -- (id)init -{ - self = [super init]; - if (self) { - self.warnings = [NSMutableArray array]; - self.errorsRecoverable = [NSMutableArray array]; - self.errorsFatal = [NSMutableArray array]; - } - return self; -} --(void) addSourceError:(NSError*) fatalError -{ - NSLog(@"[%@] SVG ERROR: %@", [self class], fatalError); - [self.errorsRecoverable addObject:fatalError]; -} - --(void) addParseWarning:(NSError*) warning -{ - NSLog(@"[%@] SVG WARNING: %@", [self class], warning); - [self.warnings addObject:warning]; -} - --(void) addParseErrorRecoverable:(NSError*) recoverableError -{ - NSLog(@"[%@] SVG WARNING (recoverable): %@", [self class], recoverableError); - [self.errorsRecoverable addObject:recoverableError]; -} - --(void) addParseErrorFatal:(NSError*) fatalError -{ - NSLog(@"[%@] SVG ERROR: %@", [self class], fatalError); - [self.errorsFatal addObject:fatalError]; -} - --(void) addSAXError:(NSError*) saxError -{ - NSLog(@"[%@] SVG ERROR: %@", [self class], [saxError localizedDescription]); - [self.errorsFatal addObject:saxError]; -} - -@end diff --git a/Core/SVGParserExtension.h b/Core/SVGParserExtension.h deleted file mode 100644 index 211183020..000000000 --- a/Core/SVGParserExtension.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - SVGParserExtension.h - - A protocol that lets us split "parsing an SVG" into lots of smaller parsing classes - - PARSING - --- - Actual parsing of an SVG is split into three places: - - 1. High level, XML parsing: SVGParser - 2. ALL THE REST, this class: parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" - - */ - -#import - -#import "SVGSource.h" - -@protocol SVGParserExtension - -/*! Array of URI's as NSString's, one string for each XMLnamespace that this parser-extension can parse - * - * e.g. the main parser returns "[NSArray arrayWithObjects:@"http://www.w3.org/2000/svg", nil];" - */ --(NSArray*) supportedNamespaces; - -/*! Array of NSString's, one string for each XML tag (within a supported namespace!) that this parser-extension can parse - * - * e.g. the main parser returns "[NSArray arrayWithObjects:@"svg", @"title", @"defs", @"path", @"line", @"circle", ...etc... , nil];" - */ --(NSArray*) supportedTags; - -- (NSObject*)handleStartElement:(NSString *)name document:(SVGSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent;// NOT SURE IF THIS IS NEEDED ANYWHERE ANY MORE: inDocument:(SVGSource*) svgSource; --(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; --(BOOL) createdItemShouldStoreContent:(NSObject*) item; - -@end diff --git a/Core/SVGParserSVG.h b/Core/SVGParserSVG.h deleted file mode 100644 index 41acd6eb9..000000000 --- a/Core/SVGParserSVG.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "SVGParser.h" - -@interface SVGParserSVG : NSObject { - NSMutableDictionary *_graphicsGroups; - NSMutableArray *_anonymousGraphicsGroups; -} - -@end diff --git a/Core/SVGParserSVG.m b/Core/SVGParserSVG.m deleted file mode 100644 index 4154e4f64..000000000 --- a/Core/SVGParserSVG.m +++ /dev/null @@ -1,188 +0,0 @@ -#import "SVGParserSVG.h" - -#import "SVGSVGElement.h" -#import "SVGCircleElement.h" -#import "SVGDefsElement.h" -#import "SVGDescriptionElement.h" -//#import "SVGSource.h" -#import "SVGEllipseElement.h" -#import "SVGGroupElement.h" -#import "SVGImageElement.h" -#import "SVGLineElement.h" -#import "SVGPathElement.h" -#import "SVGPolygonElement.h" -#import "SVGPolylineElement.h" -#import "SVGRectElement.h" -#import "SVGTitleElement.h" - -@implementation SVGParserSVG - -static NSDictionary *elementMap; - -- (id)init { - self = [super init]; - if (self) { - - if (!elementMap) { - elementMap = [[NSDictionary dictionaryWithObjectsAndKeys: - [SVGSVGElement class], @"svg", - [SVGCircleElement class], @"circle", - [SVGDefsElement class], @"defs", - [SVGDescriptionElement class], @"description", - [SVGEllipseElement class], @"ellipse", - [SVGGroupElement class], @"g", - [SVGImageElement class], @"image", - [SVGLineElement class], @"line", - [SVGPathElement class], @"path", - [SVGPolygonElement class], @"polygon", - [SVGPolylineElement class], @"polyline", - [SVGRectElement class], @"rect", - [SVGTitleElement class], @"title", nil] retain]; - } - } - return self; -} - -- (void)dealloc { - [_anonymousGraphicsGroups release]; - [_graphicsGroups release]; - - [super dealloc]; -} - --(NSArray*) supportedNamespaces -{ - return [NSArray arrayWithObjects: - @"http://www.w3.org/2000/svg", - nil]; -} - -/** "tags supported" is exactly the set of all SVGElement subclasses that already exist */ --(NSArray*) supportedTags -{ - return [NSMutableArray arrayWithArray:[elementMap allKeys]]; -} - -- (NSObject*) handleStartElement:(NSString *)name document:(SVGSource*) svgSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { - if( [[self supportedNamespaces] containsObject:prefix] ) - { - Class elementClass = [elementMap objectForKey:name]; - - if (!elementClass) { - elementClass = [SVGElement class]; - NSLog(@"Support for '%@' element has not been implemented", name); - } - - id style = nil; - - if ((style = [attributes objectForKey:@"style"])) { - [attributes removeObjectForKey:@"style"]; - [attributes addEntriesFromDictionary:[SVGParser NSDictionaryFromCSSAttributes:style]]; - } - - SVGElement *element = [[[elementClass alloc] initWithName:name] autorelease]; - [element parseAttributes:attributes]; - - /** special case: */ - if( [@"svg" isEqualToString:name] ) - { - NSString* svgVersion = nil; - if ((svgVersion = [attributes objectForKey:@"version"])) { - svgSource.svgLanguageVersion = svgVersion; - } - } - - - return element; - } - - return nil; -} - --(BOOL) createdItemShouldStoreContent:(NSObject*) item -{ - if( [item isKindOfClass:[SVGElement class]] ) - { - if ([[item class] shouldStoreContent]) { - return TRUE; - } - else { - return FALSE; - } - } - else - return false; -} - --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent// inDocument:(SVGSource*) svgSource -{ - SVGElement *parentElement = (SVGElement*) parent; - - if( [child isKindOfClass:[SVGElement class]] ) - { - SVGElement *childElement = (SVGElement*) child; - - if ( parent == nil ) // i.e. the root SVG tag - { - NSAssert( [child isKindOfClass:[SVGSVGElement class]], @"Unexpected root element: expected root tag to be an '' tag. Instead found an: %@", childElement.identifier ); - - NSLog(@"[%@] PARSER_INFO: asked to add object to nil parent; i.e. we've hit the root of the tree; setting global variables on the SVG rootElement now", [self class]); - SVGSVGElement *rootSVGElement = (SVGSVGElement*) childElement; - [rootSVGElement setGraphicsGroups:_graphicsGroups]; - [rootSVGElement setAnonymousGraphicsGroups:_anonymousGraphicsGroups]; - - [_graphicsGroups release]; - [_anonymousGraphicsGroups release]; - _graphicsGroups = nil; - _anonymousGraphicsGroups = nil; - - } - else - { - [parentElement addChild:childElement]; - - /*! - SVG Spec attaches special meaning to the "g" tag - and applications - need to be able to pull-out the "g"-tagged items later on - */ - if( [childElement.localName isEqualToString:@"g"] ) - { - if( childElement.identifier == nil ) - { - if( _anonymousGraphicsGroups == nil ) - _anonymousGraphicsGroups = [NSMutableArray new]; - - [_anonymousGraphicsGroups addObject:childElement]; - -#if PARSER_WARN_FOR_ANONYMOUS_SVG_G_TAGS - NSLog(@"[%@] PARSER_WARN: Found anonymous g tag (tag has no XML 'id=' attribute). Loading OK, but check your SVG file (id tags are highly recommended!)...", [self class] ); -#endif - } - else - { - if( _graphicsGroups == nil ) - _graphicsGroups = [NSMutableDictionary new]; - - [_graphicsGroups setValue:childElement forKey:childElement.identifier]; - } - } - } - } - else - { - /*! - Unknown metadata - */ - - [parentElement addMetadataChild:child]; - } -} - --(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item -{ - SVGElement* element = (SVGElement*) item; - - [element parseContent:content]; -} - -@end diff --git a/Core/SVGPointsAndPathsParser.h b/Core/SVGPointsAndPathsParser.h deleted file mode 100644 index 702b1ce8d..000000000 --- a/Core/SVGPointsAndPathsParser.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// SVGPointsAndPathsParser.h -// SVGPad -// -// Created by adam on 18/12/2011. -// Copyright (c) 2011 __MyCompanyName__. All rights reserved. -// - -#import - -#if TARGET_OS_IPHONE -#import -#else -#import -#endif - -typedef struct SVGCurve -{ - CGPoint c1; - CGPoint c2; - CGPoint p; -} SVGCurve; - -SVGCurve SVGCurveMake(CGFloat cx1, CGFloat cy1, CGFloat cx2, CGFloat cy2, CGFloat px, CGFloat py); -BOOL SVGCurveEqualToCurve(SVGCurve curve1, SVGCurve curve2); - -#define SVGCurveZero SVGCurveMake(0.,0.,0.,0.,0.,0.) - -@interface SVGPointsAndPathsParser : NSObject - -+ (void) readWhitespace:(NSScanner*)scanner; -+ (void) readCommaAndWhitespace:(NSScanner*)scanner; - -+ (CGFloat) readCoordinate:(NSScanner*)scanner; -+ (CGPoint) readCoordinatePair:(NSScanner*)scanner; - -+ (CGPoint) readMovetoDrawtoCommandGroups:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (CGPoint) readMovetoDrawtoCommandGroup:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (CGPoint) readMovetoDrawto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (CGPoint) readMoveto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (CGPoint) readMovetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; - -+ (CGPoint) readLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (CGPoint) readLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (CGPoint) readVerticalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; -+ (CGPoint) readVerticalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; -+ (CGPoint) readHorizontalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; -+ (CGPoint) readHorizontalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; - -+ (SVGCurve) readCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (SVGCurve) readCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; -+ (SVGCurve) readCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; -+ (SVGCurve) readSmoothCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve; -+ (SVGCurve) readSmoothCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve; -+ (SVGCurve) readSmoothCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve; - -+ (CGPoint) readCloseCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; - -@end diff --git a/Core/SVGPointsAndPathsParser.m b/Core/SVGPointsAndPathsParser.m deleted file mode 100644 index ab98a9885..000000000 --- a/Core/SVGPointsAndPathsParser.m +++ /dev/null @@ -1,589 +0,0 @@ -// -// SVGPointsAndPathsParser.m -// SVGPad -// -// Created by adam on 18/12/2011. -// Copyright (c) 2011 __MyCompanyName__. All rights reserved. -// - -#import "SVGPointsAndPathsParser.h" - -// TODO: support quadratic-bezier-curveto -// TODO: support smooth-quadratic-bezier-curveto -// TODO: support elliptical-arc - -/*! Very useful for debugging the parser - this will output one line of logging - * for every CGPath command that's actually done; you can then compare these lines - * to the input source file, and manually check what's being sent to the renderer - * versus what was expected - */ -#define DEBUG_PATH_CREATION 0 - -inline SVGCurve SVGCurveMake(CGFloat cx1, CGFloat cy1, CGFloat cx2, CGFloat cy2, CGFloat px, CGFloat py) -{ - SVGCurve curve; - curve.c1 = CGPointMake(cx1, cy1); - curve.c2 = CGPointMake(cx2, cy2); - curve.p = CGPointMake(px, py); - return curve; -} -inline BOOL SVGCurveEqualToCurve(SVGCurve curve1, SVGCurve curve2) -{ - return ( - CGPointEqualToPoint(curve1.c1, curve2.c1) - && - CGPointEqualToPoint(curve1.c2, curve2.c2) - && - CGPointEqualToPoint(curve1.p, curve2.p) - ); -} - -@implementation SVGPointsAndPathsParser - - -/* references - http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataBNF - http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PointsBNF - - */ - -/* - http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataBNF - svg-path: - wsp* moveto-drawto-command-groups? wsp* - moveto-drawto-command-groups: - moveto-drawto-command-group - | moveto-drawto-command-group wsp* moveto-drawto-command-groups - moveto-drawto-command-group: - moveto wsp* drawto-commands? - drawto-commands: - drawto-command - | drawto-command wsp* drawto-commands - drawto-command: - closepath - | lineto - | horizontal-lineto - | vertical-lineto - | curveto - | smooth-curveto - | quadratic-bezier-curveto - | smooth-quadratic-bezier-curveto - | elliptical-arc - moveto: - ( "M" | "m" ) wsp* moveto-argument-sequence - moveto-argument-sequence: - coordinate-pair - | coordinate-pair comma-wsp? lineto-argument-sequence - closepath: - ("Z" | "z") - lineto: - ( "L" | "l" ) wsp* lineto-argument-sequence - lineto-argument-sequence: - coordinate-pair - | coordinate-pair comma-wsp? lineto-argument-sequence - horizontal-lineto: - ( "H" | "h" ) wsp* horizontal-lineto-argument-sequence - horizontal-lineto-argument-sequence: - coordinate - | coordinate comma-wsp? horizontal-lineto-argument-sequence - vertical-lineto: - ( "V" | "v" ) wsp* vertical-lineto-argument-sequence - vertical-lineto-argument-sequence: - coordinate - | coordinate comma-wsp? vertical-lineto-argument-sequence - curveto: - ( "C" | "c" ) wsp* curveto-argument-sequence - curveto-argument-sequence: - curveto-argument - | curveto-argument comma-wsp? curveto-argument-sequence - curveto-argument: - coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair - smooth-curveto: - ( "S" | "s" ) wsp* smooth-curveto-argument-sequence - smooth-curveto-argument-sequence: - smooth-curveto-argument - | smooth-curveto-argument comma-wsp? smooth-curveto-argument-sequence - smooth-curveto-argument: - coordinate-pair comma-wsp? coordinate-pair - quadratic-bezier-curveto: - ( "Q" | "q" ) wsp* quadratic-bezier-curveto-argument-sequence - quadratic-bezier-curveto-argument-sequence: - quadratic-bezier-curveto-argument - | quadratic-bezier-curveto-argument comma-wsp? - quadratic-bezier-curveto-argument-sequence - quadratic-bezier-curveto-argument: - coordinate-pair comma-wsp? coordinate-pair - smooth-quadratic-bezier-curveto: - ( "T" | "t" ) wsp* smooth-quadratic-bezier-curveto-argument-sequence - smooth-quadratic-bezier-curveto-argument-sequence: - coordinate-pair - | coordinate-pair comma-wsp? smooth-quadratic-bezier-curveto-argument-sequence - elliptical-arc: - ( "A" | "a" ) wsp* elliptical-arc-argument-sequence - elliptical-arc-argument-sequence: - elliptical-arc-argument - | elliptical-arc-argument comma-wsp? elliptical-arc-argument-sequence - elliptical-arc-argument: - nonnegative-number comma-wsp? nonnegative-number comma-wsp? - number comma-wsp flag comma-wsp? flag comma-wsp? coordinate-pair - coordinate-pair: - coordinate comma-wsp? coordinate - coordinate: - number - nonnegative-number: - integer-constant - | floating-point-constant - number: - sign? integer-constant - | sign? floating-point-constant - flag: - "0" | "1" - comma-wsp: - (wsp+ comma? wsp*) | (comma wsp*) - comma: - "," - integer-constant: - digit-sequence - floating-point-constant: - fractional-constant exponent? - | digit-sequence exponent - fractional-constant: - digit-sequence? "." digit-sequence - | digit-sequence "." - exponent: - ( "e" | "E" ) sign? digit-sequence - sign: - "+" | "-" - digit-sequence: - digit - | digit digit-sequence - digit: - "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" - */ - -/* - http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PointsBNF - - list-of-points: - wsp* coordinate-pairs? wsp* - coordinate-pairs: - coordinate-pair - | coordinate-pair comma-wsp coordinate-pairs - coordinate-pair: - coordinate comma-wsp coordinate - | coordinate negative-coordinate - coordinate: - number - number: - sign? integer-constant - | sign? floating-point-constant - negative-coordinate: - "-" integer-constant - | "-" floating-point-constant - comma-wsp: - (wsp+ comma? wsp*) | (comma wsp*) - comma: - "," - integer-constant: - digit-sequence - floating-point-constant: - fractional-constant exponent? - | digit-sequence exponent - fractional-constant: - digit-sequence? "." digit-sequence - | digit-sequence "." - exponent: - ( "e" | "E" ) sign? digit-sequence - sign: - "+" | "-" - digit-sequence: - digit - | digit digit-sequence - digit: - "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" - */ - -/** - wsp: - (#x20 | #x9 | #xD | #xA) - */ -+ (void) readWhitespace:(NSScanner*)scanner -{ - - NSCharacterSet* whitespace = [NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@"%c%c%c%c", 0x20, 0x9, 0xD, 0xA]]; - [scanner scanCharactersFromSet:whitespace - intoString:NULL]; -} - -+ (void) readCommaAndWhitespace:(NSScanner*)scanner -{ - [SVGPointsAndPathsParser readWhitespace:scanner]; - static NSString* comma = @","; - [scanner scanString:comma intoString:NULL]; - [SVGPointsAndPathsParser readWhitespace:scanner]; -} - -/** - moveto-drawto-command-groups: - moveto-drawto-command-group - | moveto-drawto-command-group wsp* moveto-drawto-command-groups - */ -+ (CGPoint) readMovetoDrawtoCommandGroups:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - CGPoint lastCoord = [SVGPointsAndPathsParser readMovetoDrawtoCommandGroup:scanner path:path relativeTo:origin isRelative:isRelative]; - return lastCoord; -} - -/** - moveto-drawto-command-group: - moveto wsp* drawto-commands? - */ -+ (CGPoint) readMovetoDrawtoCommandGroup:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - CGPoint lastCoord = [SVGPointsAndPathsParser readMovetoDrawto:scanner path:path relativeTo:origin isRelative:isRelative]; - [SVGPointsAndPathsParser readWhitespace:scanner]; - - if (![scanner isAtEnd]) { - [SVGPointsAndPathsParser readWhitespace:scanner]; - lastCoord = [SVGPointsAndPathsParser readMovetoDrawtoCommandGroup:scanner path:path relativeTo:origin isRelative:isRelative]; - } - - return lastCoord; -} - -/** moveto-drawto-command-group: - moveto wsp* drawto-commands? - */ -+ (CGPoint) readMovetoDrawto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - CGPoint lastMove = [SVGPointsAndPathsParser readMoveto:scanner path:path relativeTo:origin isRelative:isRelative]; - [SVGPointsAndPathsParser readWhitespace:scanner]; - return lastMove; -} - -/** - moveto: - ( "M" | "m" ) wsp* moveto-argument-sequence - */ -+ (CGPoint) readMoveto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Mm"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan move to command"); - if (!ok) return origin; - - [SVGPointsAndPathsParser readWhitespace:scanner]; - - CGPoint lastCoordinate = [SVGPointsAndPathsParser readMovetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; - return lastCoordinate; -} - -/** moveto-argument-sequence: - coordinate-pair - | coordinate-pair comma-wsp? lineto-argument-sequence - */ -+ (CGPoint) readMovetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - CGPoint p = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord = CGPointMake(p.x+origin.x, p.y+origin.y); - CGPathMoveToPoint(path, NULL, coord.x, coord.y); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: MOVED to %2.2f, %2.2f", [SVGPointsAndPathsParser class], coord.x, coord.y ); -#endif - - [SVGPointsAndPathsParser readCommaAndWhitespace:scanner]; - - if (![scanner isAtEnd]) { - coord = [SVGPointsAndPathsParser readLinetoArgumentSequence:scanner path:path relativeTo:(isRelative)?coord:origin isRelative:isRelative]; - } - - return coord; -} - -/** - coordinate-pair: - coordinate comma-wsp? coordinate - */ - -+ (CGPoint) readCoordinatePair:(NSScanner*)scanner -{ - CGFloat x = [SVGPointsAndPathsParser readCoordinate:scanner]; - [SVGPointsAndPathsParser readCommaAndWhitespace:scanner]; - CGFloat y = [SVGPointsAndPathsParser readCoordinate:scanner]; - - CGPoint p = CGPointMake(x, y); - return p; -} - -+ (CGFloat) readCoordinate:(NSScanner*)scanner -{ - float f; - BOOL ok; - ok = [scanner scanFloat:&f]; - NSAssert(ok, @"invalid coord"); - return f; -} - -/** - lineto: - ( "L" | "l" ) wsp* lineto-argument-sequence - */ -+ (CGPoint) readLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Ll"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan line to command"); - if (!ok) return origin; - - [SVGPointsAndPathsParser readWhitespace:scanner]; - - CGPoint lastCoordinate = [SVGPointsAndPathsParser readLinetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; - return lastCoordinate; -} - -/** - lineto-argument-sequence: - coordinate-pair - | coordinate-pair comma-wsp? lineto-argument-sequence - */ -+ (CGPoint) readLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - CGPoint p = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord = CGPointMake(p.x+origin.x, p.y+origin.y); - CGPathAddLineToPoint(path, NULL, coord.x, coord.y); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: LINE to %2.2f, %2.2f", [SVGPointsAndPathsParser class], coord.x, coord.y ); -#endif - - [SVGPointsAndPathsParser readWhitespace:scanner]; - if (![scanner isAtEnd]) { - coord = [SVGPointsAndPathsParser readLinetoArgumentSequence:scanner path:path relativeTo:(isRelative)?coord:origin isRelative:isRelative]; - } - - return coord; -} - -/** - curveto: - ( "C" | "c" ) wsp* curveto-argument-sequence - */ -+ (SVGCurve) readCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Cc"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan curve to command"); - if (!ok) return SVGCurveZero; - - [SVGPointsAndPathsParser readWhitespace:scanner]; - - SVGCurve lastCurve = [SVGPointsAndPathsParser readCurvetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; - return lastCurve; -} - -/** - curveto-argument-sequence: - curveto-argument - | curveto-argument comma-wsp? curveto-argument-sequence - */ -+ (SVGCurve) readCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative -{ - SVGCurve curve = [SVGPointsAndPathsParser readCurvetoArgument:scanner path:path relativeTo:origin]; - - if (![scanner isAtEnd]) { - curve = [SVGPointsAndPathsParser readCurvetoArgumentSequence:scanner path:path relativeTo:(isRelative ? curve.p : origin) isRelative:isRelative]; - } - - return curve; -} -/** - curveto-argument: - coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair - */ -+ (SVGCurve) readCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin -{ - CGPoint p1 = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord1 = CGPointMake(p1.x+origin.x, p1.y+origin.y); - [SVGPointsAndPathsParser readCommaAndWhitespace:scanner]; - - CGPoint p2 = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord2 = CGPointMake(p2.x+origin.x, p2.y+origin.y); - [SVGPointsAndPathsParser readCommaAndWhitespace:scanner]; - - CGPoint p3 = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord3 = CGPointMake(p3.x+origin.x, p3.y+origin.y); - [SVGPointsAndPathsParser readCommaAndWhitespace:scanner]; - - CGPathAddCurveToPoint(path, NULL, coord1.x, coord1.y, coord2.x, coord2.y, coord3.x, coord3.y); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: CURVE to (%2.2f, %2.2f)..(%2.2f, %2.2f)..(%2.2f, %2.2f)", [SVGPointsAndPathsParser class], coord1.x, coord1.y, coord2.x, coord2.y, coord3.x, coord3.y ); -#endif - - return SVGCurveMake(coord1.x, coord1.y, coord2.x, coord2.y, coord3.x, coord3.y); -} - -/** - smooth-curveto: - ( "S" | "s" ) wsp* smooth-curveto-argument-sequence - */ -+ (SVGCurve) readSmoothCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Ss"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan smooth curve to command"); - if (!ok) return SVGCurveZero; - - [SVGPointsAndPathsParser readWhitespace:scanner]; - - SVGCurve lastCurve = [SVGPointsAndPathsParser readSmoothCurvetoArgumentSequence:scanner path:path relativeTo:origin withPrevCurve:prevCurve]; - return lastCurve; -} - -/** - smooth-curveto-argument-sequence: - smooth-curveto-argument - | smooth-curveto-argument comma-wsp? smooth-curveto-argument-sequence - */ -+ (SVGCurve) readSmoothCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve -{ - SVGCurve curve = [SVGPointsAndPathsParser readSmoothCurvetoArgument:scanner path:path relativeTo:origin withPrevCurve:prevCurve]; - - if (![scanner isAtEnd]) { - curve = [SVGPointsAndPathsParser readSmoothCurvetoArgumentSequence:scanner path:path relativeTo:origin withPrevCurve:prevCurve]; - } - - return curve; -} - -/** - smooth-curveto-argument: - coordinate-pair comma-wsp? coordinate-pair - */ -+ (SVGCurve) readSmoothCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve -{ - CGPoint p1 = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord1 = CGPointMake(p1.x+origin.x, p1.y+origin.y); - [SVGPointsAndPathsParser readCommaAndWhitespace:scanner]; - - CGPoint p2 = [SVGPointsAndPathsParser readCoordinatePair:scanner]; - CGPoint coord2 = CGPointMake(p2.x+origin.x, p2.y+origin.y); - - SVGCurve thisCurve; - if (SVGCurveEqualToCurve(SVGCurveZero, prevCurve)) { - // assume control point is coincident with the current point - thisCurve = SVGCurveMake(coord1.x, coord1.y, coord2.x, coord2.y, coord1.x, coord1.y); - } else { - // calculate the mirror of the previous control point - CGPoint currentPoint = prevCurve.p; - CGPoint controlPoint = prevCurve.c2; - CGPoint mirrorCoord = CGPointMake(currentPoint.x+(currentPoint.x-controlPoint.x), currentPoint.y+(currentPoint.y-controlPoint.y)); - thisCurve = SVGCurveMake(mirrorCoord.x, mirrorCoord.y, coord1.x, coord1.y, coord2.x, coord2.y); - } - - CGPathAddCurveToPoint(path, NULL, thisCurve.c1.x, thisCurve.c1.y, thisCurve.c2.x, thisCurve.c2.y, thisCurve.p.x, thisCurve.p.y); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: SMOOTH CURVE to (%2.2f, %2.2f)..(%2.2f, %2.2f)..(%2.2f, %2.2f)", [SVGPointsAndPathsParser class], thisCurve.c1.x, thisCurve.c1.y, thisCurve.c2.x, thisCurve.c2.y, thisCurve.p.x, thisCurve.p.y ); -#endif - - return thisCurve; -} - -/** - vertical-lineto-argument-sequence: - coordinate - | coordinate comma-wsp? vertical-lineto-argument-sequence - */ -+ (CGPoint) readVerticalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin -{ - CGFloat yValue = [SVGPointsAndPathsParser readCoordinate:scanner]; - CGPoint vertCoord = CGPointMake(origin.x, origin.y+yValue); - CGPoint currentPoint = CGPathGetCurrentPoint(path); - CGPoint coord = CGPointMake(currentPoint.x, currentPoint.y+(vertCoord.y-currentPoint.y)); - CGPathAddLineToPoint(path, NULL, coord.x, coord.y); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: VERTICAL LINE to (%2.2f, %2.2f)", [SVGPointsAndPathsParser class], coord.x, coord.y ); -#endif - return coord; -} - -/** - vertical-lineto: - ( "V" | "v" ) wsp* vertical-lineto-argument-sequence - */ -+ (CGPoint) readVerticalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Vv"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan vertical line to command"); - if (!ok) return origin; - - [SVGPointsAndPathsParser readWhitespace:scanner]; - - CGPoint lastCoordinate = [SVGPointsAndPathsParser readVerticalLinetoArgumentSequence:scanner path:path relativeTo:origin]; - return lastCoordinate; -} - -/** - horizontal-lineto-argument-sequence: - coordinate - | coordinate comma-wsp? horizontal-lineto-argument-sequence - */ -+ (CGPoint) readHorizontalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin -{ - CGFloat xValue = [SVGPointsAndPathsParser readCoordinate:scanner]; - CGPoint horizCoord = CGPointMake(origin.x+xValue, origin.y); - CGPoint currentPoint = CGPathGetCurrentPoint(path); - CGPoint coord = CGPointMake(currentPoint.x+(horizCoord.x-currentPoint.x), currentPoint.y); - CGPathAddLineToPoint(path, NULL, coord.x, coord.y); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: HORIZONTAL LINE to (%2.2f, %2.2f)", [SVGPointsAndPathsParser class], coord.x, coord.y ); -#endif - return coord; -} - -/** - horizontal-lineto: - ( "H" | "h" ) wsp* horizontal-lineto-argument-sequence - */ -+ (CGPoint) readHorizontalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Hh"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan horizontal line to command"); - if (!ok) return origin; - - [SVGPointsAndPathsParser readWhitespace:scanner]; - - CGPoint lastCoordinate = [SVGPointsAndPathsParser readHorizontalLinetoArgumentSequence:scanner path:path relativeTo:origin]; - return lastCoordinate; -} - -+ (CGPoint) readCloseCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin -{ - NSString* cmd = nil; - NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Zz"]; - BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; - - NSAssert(ok, @"failed to scan close command"); - if (!ok) return origin; - - CGPathCloseSubpath(path); -#if DEBUG_PATH_CREATION - NSLog(@"[%@] PATH: finished path", [SVGPointsAndPathsParser class] ); -#endif - - return origin; -} - -@end diff --git a/Core/SVGView.h b/Core/SVGView.h deleted file mode 100644 index 3c65260e6..000000000 --- a/Core/SVGView.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// SVGView.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - - -@class SVGImage; - -#if TARGET_OS_IPHONE -#import -@interface SVGView :UIView { } -#else -@interface SVGView : NSView { } -#endif - -@property (nonatomic, retain) SVGImage *image; - -- (id)initWithImage:(SVGImage *)image; // set frame to position - -@end diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index b7adea9ac..ee9caced8 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -15,131 +15,187 @@ 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213433148AF2CF006881E1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66226B53148AEAB100EF4A6D /* Foundation.framework */; }; - 66213550148AF80B006881E1 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; - 66213552148AF80B006881E1 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; - 66213556148AF80B006881E1 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; - 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; }; - 6684CD461566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; }; + 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141E015697534000F3A27 /* SKSvgSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SKSvgSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141E815697534000F3A27 /* SKSvgImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SKSvgImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141EA15697534000F3A27 /* SKSvgImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SKSvgImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141EE15697534000F3A27 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141F115697534000F3A27 /* SKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141FA15697534000F3A27 /* SKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6661420C15697534000F3A27 /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6661420E15697534000F3A27 /* SKSvgView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SKSvgView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142121569756C000F3A27 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; }; + 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; }; + 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; + 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; + 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; }; + 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; }; + 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; + 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; + 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; }; + 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; }; + 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; + 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; + 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; }; + 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; }; + 666142B3156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; + 666142B4156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; + 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; }; + 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; }; + 666142B7156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; + 666142B8156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; + 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; }; + 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; }; + 666142BB156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; + 666142BC156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; + 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; }; + 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; }; + 666142BF156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; + 666142C0156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; + 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; }; + 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; }; + 666142C3156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; + 666142C4156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; + 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; }; + 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; }; + 666142C7156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; + 666142C8156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; + 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; }; + 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; }; + 666142CB156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; + 666142CC156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; + 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; }; + 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; }; + 666142CF156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; + 666142D0156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; + 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; }; + 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; }; + 666142D3156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; + 666142D4156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; + 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; }; + 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; }; + 666142D7156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; + 666142D8156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; + 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; }; + 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; }; + 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; + 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; + 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; }; + 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; }; + 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; + 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; + 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; }; + 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; }; + 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; + 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; + 666142E5156C2E6A000F3A27 /* SKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SKParseResult.h */; }; + 666142E6156C2E6A000F3A27 /* SKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SKParseResult.h */; }; + 666142E7156C2E6A000F3A27 /* SKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SKParseResult.m */; }; + 666142E8156C2E6A000F3A27 /* SKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SKParseResult.m */; }; + 666142E9156C2E6A000F3A27 /* SKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SKParserExtension.h */; }; + 666142EA156C2E6A000F3A27 /* SKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SKParserExtension.h */; }; + 666142EB156C2E6A000F3A27 /* SKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SKParserSVG.h */; }; + 666142EC156C2E6A000F3A27 /* SKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SKParserSVG.h */; }; + 666142ED156C2E6A000F3A27 /* SKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SKParserSVG.m */; }; + 666142EE156C2E6A000F3A27 /* SKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SKParserSVG.m */; }; + 666142EF156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */; }; + 666142F0156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */; }; + 666142F1156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */; }; + 666142F2156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */; }; + 666142F5156C2E87000F3A27 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142F3156C2E87000F3A27 /* SVGDocument.h */; }; + 666142F6156C2E87000F3A27 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142F3156C2E87000F3A27 /* SVGDocument.h */; }; + 666142F7156C2E87000F3A27 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142F4156C2E87000F3A27 /* SVGDocument.m */; }; + 666142F8156C2E87000F3A27 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142F4156C2E87000F3A27 /* SVGDocument.m */; }; + 666142FC156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; }; + 666142FD156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; }; + 666142FE156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; + 666142FF156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; + 66614302156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; }; + 66614303156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; }; + 66614304156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; + 66614305156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; + 66614308156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; }; + 66614309156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; }; + 6661430A156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; + 6661430B156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; + 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; }; + 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; }; + 66614310156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; + 66614311156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; + 66614314156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; }; + 66614315156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; }; + 66614316156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; + 66614317156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; + 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; }; + 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; }; + 6661431C156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; + 6661431D156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; + 66614320156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; }; + 66614321156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; }; + 66614322156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; + 66614323156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; + 66614326156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; }; + 66614327156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; }; + 66614328156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; + 66614329156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; + 6661432C156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; }; + 6661432D156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; }; + 6661432E156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; + 6661432F156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; + 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; }; + 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; }; + 66614334156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; + 66614335156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; + 66614338156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; }; + 66614339156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; }; + 6661433A156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; + 6661433B156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; + 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; }; + 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; }; + 66614340156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; + 66614341156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; + 66614344156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; }; + 66614345156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; }; + 66614346156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; + 66614347156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; + 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; - 6684CD4B1566D07400A46247 /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGView.h */; }; - 6684CD4C1566D07400A46247 /* SVGView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGView.h */; }; - 6684CD4D1566D07400A46247 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGView.m */; }; - 6684CD4E1566D07400A46247 /* SVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGView.m */; }; - 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; }; - 66B79B0A15475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; }; + 6684CD4B1566D07400A46247 /* SKSvgView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SKSvgView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6684CD4D1566D07400A46247 /* SKSvgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SKSvgView.m */; }; + 6684CD4E1566D07400A46247 /* SKSvgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SKSvgView.m */; }; + 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; - 66B79B0D15475254002F99FF /* SVGBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */; }; - 66B79B0E15475254002F99FF /* SVGBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */; }; - 66B79B0F15475254002F99FF /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */; }; - 66B79B1015475254002F99FF /* SVGBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */; }; - 66B79B1115475254002F99FF /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD715475254002F99FF /* SVGCircleElement.h */; }; - 66B79B1215475254002F99FF /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD715475254002F99FF /* SVGCircleElement.h */; }; - 66B79B1315475254002F99FF /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD815475254002F99FF /* SVGCircleElement.m */; }; - 66B79B1415475254002F99FF /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD815475254002F99FF /* SVGCircleElement.m */; }; - 66B79B1515475254002F99FF /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD915475254002F99FF /* SVGDefsElement.h */; }; - 66B79B1615475254002F99FF /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD915475254002F99FF /* SVGDefsElement.h */; }; - 66B79B1715475254002F99FF /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADA15475254002F99FF /* SVGDefsElement.m */; }; - 66B79B1815475254002F99FF /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADA15475254002F99FF /* SVGDefsElement.m */; }; - 66B79B1915475254002F99FF /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */; }; - 66B79B1A15475254002F99FF /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */; }; - 66B79B1B15475254002F99FF /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */; }; - 66B79B1C15475254002F99FF /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */; }; - 66B79B1D15475254002F99FF /* SVGSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGSource.h */; }; - 66B79B1E15475254002F99FF /* SVGSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGSource.h */; }; - 66B79B1F15475254002F99FF /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGSource.m */; }; - 66B79B2015475254002F99FF /* SVGSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGSource.m */; }; - 66B79B2115475254002F99FF /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADF15475254002F99FF /* SVGElement.h */; }; - 66B79B2215475254002F99FF /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADF15475254002F99FF /* SVGElement.h */; }; - 66B79B2315475254002F99FF /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE015475254002F99FF /* SVGElement.m */; }; - 66B79B2415475254002F99FF /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE015475254002F99FF /* SVGElement.m */; }; - 66B79B2515475254002F99FF /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE115475254002F99FF /* SVGEllipseElement.h */; }; - 66B79B2615475254002F99FF /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE115475254002F99FF /* SVGEllipseElement.h */; }; - 66B79B2715475254002F99FF /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE215475254002F99FF /* SVGEllipseElement.m */; }; - 66B79B2815475254002F99FF /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE215475254002F99FF /* SVGEllipseElement.m */; }; - 66B79B2915475254002F99FF /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE315475254002F99FF /* SVGGroupElement.h */; }; - 66B79B2A15475254002F99FF /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE315475254002F99FF /* SVGGroupElement.h */; }; - 66B79B2B15475254002F99FF /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE415475254002F99FF /* SVGGroupElement.m */; }; - 66B79B2C15475254002F99FF /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE415475254002F99FF /* SVGGroupElement.m */; }; - 66B79B2D15475254002F99FF /* SVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGImage.h */; }; - 66B79B2E15475254002F99FF /* SVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGImage.h */; }; - 66B79B2F15475254002F99FF /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGImage.m */; }; - 66B79B3015475254002F99FF /* SVGImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGImage.m */; }; - 66B79B3115475254002F99FF /* SVGImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGImage+CA.h */; }; - 66B79B3215475254002F99FF /* SVGImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGImage+CA.h */; }; - 66B79B3315475254002F99FF /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGImage+CA.m */; }; - 66B79B3415475254002F99FF /* SVGImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGImage+CA.m */; }; - 66B79B3515475254002F99FF /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE915475254002F99FF /* SVGImageElement.h */; }; - 66B79B3615475254002F99FF /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE915475254002F99FF /* SVGImageElement.h */; }; - 66B79B3715475254002F99FF /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEA15475254002F99FF /* SVGImageElement.m */; }; - 66B79B3815475254002F99FF /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEA15475254002F99FF /* SVGImageElement.m */; }; - 66B79B3915475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; }; - 66B79B3A15475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; }; - 66B79B3B15475254002F99FF /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEC15475254002F99FF /* SVGLineElement.h */; }; - 66B79B3C15475254002F99FF /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEC15475254002F99FF /* SVGLineElement.h */; }; - 66B79B3D15475254002F99FF /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AED15475254002F99FF /* SVGLineElement.m */; }; - 66B79B3E15475254002F99FF /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AED15475254002F99FF /* SVGLineElement.m */; }; - 66B79B3F15475254002F99FF /* SVGParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGParser.h */; }; - 66B79B4015475254002F99FF /* SVGParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGParser.h */; }; - 66B79B4115475254002F99FF /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGParser.m */; }; - 66B79B4215475254002F99FF /* SVGParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGParser.m */; }; - 66B79B4315475254002F99FF /* SVGParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF015475254002F99FF /* SVGParserExtension.h */; }; - 66B79B4415475254002F99FF /* SVGParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF015475254002F99FF /* SVGParserExtension.h */; }; - 66B79B4515475254002F99FF /* SVGParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF115475254002F99FF /* SVGParserSVG.h */; }; - 66B79B4615475254002F99FF /* SVGParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF115475254002F99FF /* SVGParserSVG.h */; }; - 66B79B4715475254002F99FF /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF215475254002F99FF /* SVGParserSVG.m */; }; - 66B79B4815475254002F99FF /* SVGParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF215475254002F99FF /* SVGParserSVG.m */; }; - 66B79B4915475254002F99FF /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF315475254002F99FF /* SVGPathElement.h */; }; - 66B79B4A15475254002F99FF /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF315475254002F99FF /* SVGPathElement.h */; }; - 66B79B4B15475254002F99FF /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF415475254002F99FF /* SVGPathElement.m */; }; - 66B79B4C15475254002F99FF /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF415475254002F99FF /* SVGPathElement.m */; }; - 66B79B4D15475254002F99FF /* SVGPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGPattern.h */; }; - 66B79B4E15475254002F99FF /* SVGPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGPattern.h */; }; - 66B79B4F15475254002F99FF /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGPattern.m */; }; - 66B79B5015475254002F99FF /* SVGPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGPattern.m */; }; - 66B79B5115475254002F99FF /* SVGPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */; }; - 66B79B5215475254002F99FF /* SVGPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */; }; - 66B79B5315475254002F99FF /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */; }; - 66B79B5415475254002F99FF /* SVGPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */; }; - 66B79B5515475254002F99FF /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF915475254002F99FF /* SVGPolygonElement.h */; }; - 66B79B5615475254002F99FF /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF915475254002F99FF /* SVGPolygonElement.h */; }; - 66B79B5715475254002F99FF /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFA15475254002F99FF /* SVGPolygonElement.m */; }; - 66B79B5815475254002F99FF /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFA15475254002F99FF /* SVGPolygonElement.m */; }; - 66B79B5915475254002F99FF /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFB15475254002F99FF /* SVGPolylineElement.h */; }; - 66B79B5A15475254002F99FF /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFB15475254002F99FF /* SVGPolylineElement.h */; }; - 66B79B5B15475254002F99FF /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFC15475254002F99FF /* SVGPolylineElement.m */; }; - 66B79B5C15475254002F99FF /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFC15475254002F99FF /* SVGPolylineElement.m */; }; - 66B79B5D15475254002F99FF /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFD15475254002F99FF /* SVGRectElement.h */; }; - 66B79B5E15475254002F99FF /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFD15475254002F99FF /* SVGRectElement.h */; }; - 66B79B5F15475254002F99FF /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFE15475254002F99FF /* SVGRectElement.m */; }; - 66B79B6015475254002F99FF /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AFE15475254002F99FF /* SVGRectElement.m */; }; - 66B79B6115475254002F99FF /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFF15475254002F99FF /* SVGShapeElement.h */; }; - 66B79B6215475254002F99FF /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AFF15475254002F99FF /* SVGShapeElement.h */; }; - 66B79B6315475254002F99FF /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0015475254002F99FF /* SVGShapeElement.m */; }; - 66B79B6415475254002F99FF /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0015475254002F99FF /* SVGShapeElement.m */; }; - 66B79B6515475254002F99FF /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0115475254002F99FF /* SVGSVGElement.h */; }; - 66B79B6615475254002F99FF /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0115475254002F99FF /* SVGSVGElement.h */; }; - 66B79B6715475254002F99FF /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0215475254002F99FF /* SVGSVGElement.m */; }; - 66B79B6815475254002F99FF /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0215475254002F99FF /* SVGSVGElement.m */; }; - 66B79B6915475254002F99FF /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0315475254002F99FF /* SVGTextElement.h */; }; - 66B79B6A15475254002F99FF /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0315475254002F99FF /* SVGTextElement.h */; }; - 66B79B6B15475254002F99FF /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0415475254002F99FF /* SVGTextElement.m */; }; - 66B79B6C15475254002F99FF /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0415475254002F99FF /* SVGTextElement.m */; }; - 66B79B6D15475254002F99FF /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0515475254002F99FF /* SVGTitleElement.h */; }; - 66B79B6E15475254002F99FF /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0515475254002F99FF /* SVGTitleElement.h */; }; - 66B79B6F15475254002F99FF /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0615475254002F99FF /* SVGTitleElement.m */; }; - 66B79B7015475254002F99FF /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0615475254002F99FF /* SVGTitleElement.m */; }; - 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; }; - 66B79B7215475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; }; + 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SKBasicDataTypes.m */; }; + 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SKBasicDataTypes.m */; }; + 66B79B1D15475254002F99FF /* SKSvgSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SKSvgSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B1F15475254002F99FF /* SKSvgSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SKSvgSource.m */; }; + 66B79B2015475254002F99FF /* SKSvgSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SKSvgSource.m */; }; + 66B79B2D15475254002F99FF /* SKSvgImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SKSvgImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B2F15475254002F99FF /* SKSvgImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SKSvgImage.m */; }; + 66B79B3015475254002F99FF /* SKSvgImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SKSvgImage.m */; }; + 66B79B3115475254002F99FF /* SKSvgImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SKSvgImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B3315475254002F99FF /* SKSvgImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SKSvgImage+CA.m */; }; + 66B79B3415475254002F99FF /* SKSvgImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SKSvgImage+CA.m */; }; + 66B79B3915475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B3F15475254002F99FF /* SKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B4115475254002F99FF /* SKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SKParser.m */; }; + 66B79B4215475254002F99FF /* SKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SKParser.m */; }; + 66B79B4D15475254002F99FF /* SKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B4F15475254002F99FF /* SKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SKPattern.m */; }; + 66B79B5015475254002F99FF /* SKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SKPattern.m */; }; + 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; - 66EB2218155946A600DE5844 /* SVGParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 66EB2216155946A500DE5844 /* SVGParseResult.h */; }; - 66EB2219155946A600DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; - 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66EB2217155946A500DE5844 /* SVGParseResult.m */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; C996E4BC1336CBC200EC3F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */; }; @@ -162,66 +218,94 @@ 6621354C148AF80A006881E1 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; 6621354D148AF80A006881E1 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; 66226B53148AEAB100EF4A6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6661427D156C2E69000F3A27 /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; + 6661427E156C2E69000F3A27 /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; + 6661427F156C2E69000F3A27 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 66614280156C2E69000F3A27 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; + 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; + 66614283156C2E69000F3A27 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; + 66614284156C2E69000F3A27 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 66614285156C2E69000F3A27 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; + 66614286156C2E69000F3A27 /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; + 66614287156C2E69000F3A27 /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; + 66614288156C2E69000F3A27 /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; + 66614289156C2E69000F3A27 /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; + 6661428A156C2E69000F3A27 /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 6661428B156C2E69000F3A27 /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; + 6661428C156C2E69000F3A27 /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; + 6661428D156C2E69000F3A27 /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; + 6661428E156C2E69000F3A27 /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; + 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; + 66614290156C2E69000F3A27 /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; + 66614291156C2E69000F3A27 /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; + 66614292156C2E69000F3A27 /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; + 66614293156C2E69000F3A27 /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; + 66614294156C2E69000F3A27 /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; + 66614295156C2E69000F3A27 /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; + 66614296156C2E69000F3A27 /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; + 66614297156C2E69000F3A27 /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 66614298156C2E69000F3A27 /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 66614299156C2E69000F3A27 /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; + 6661429A156C2E69000F3A27 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; + 6661429B156C2E69000F3A27 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; + 6661429C156C2E69000F3A27 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 6661429E156C2E6A000F3A27 /* SKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParseResult.h; sourceTree = ""; }; + 6661429F156C2E6A000F3A27 /* SKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKParseResult.m; sourceTree = ""; }; + 666142A0156C2E6A000F3A27 /* SKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParserExtension.h; sourceTree = ""; }; + 666142A1156C2E6A000F3A27 /* SKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParserSVG.h; sourceTree = ""; }; + 666142A2156C2E6A000F3A27 /* SKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKParserSVG.m; sourceTree = ""; }; + 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKPointsAndPathsParser.h; sourceTree = ""; }; + 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKPointsAndPathsParser.m; sourceTree = ""; }; + 666142F3156C2E87000F3A27 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; + 666142F4156C2E87000F3A27 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 666142FA156C2F14000F3A27 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; + 666142FB156C2F14000F3A27 /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; + 66614300156C3A0B000F3A27 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; + 66614301156C3A0B000F3A27 /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; + 66614306156C3B95000F3A27 /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; + 66614307156C3B95000F3A27 /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; + 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; + 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; + 66614312156C3F60000F3A27 /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; + 66614313156C3F61000F3A27 /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; + 66614318156C436E000F3A27 /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; + 66614319156C436F000F3A27 /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; + 6661431E156C43B9000F3A27 /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; + 6661431F156C43BA000F3A27 /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; + 66614324156C43DF000F3A27 /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; + 66614325156C43E0000F3A27 /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; + 6661432A156C44BB000F3A27 /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; + 6661432B156C44BC000F3A27 /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; + 66614330156C45EF000F3A27 /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; + 66614331156C45F1000F3A27 /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; + 66614336156C463B000F3A27 /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; + 66614337156C463C000F3A27 /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; + 6661433C156C46DD000F3A27 /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; + 6661433D156C46DE000F3A27 /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; + 66614342156C4722000F3A27 /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; + 66614343156C4724000F3A27 /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGImage+SVGPathView.h"; path = "../../Core/SVGImage+SVGPathView.h"; sourceTree = ""; }; 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGImage+SVGPathView.m"; path = "../../Core/SVGImage+SVGPathView.m"; sourceTree = ""; }; - 6684CD491566D07400A46247 /* SVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGView.h; sourceTree = ""; }; - 6684CD4A1566D07400A46247 /* SVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGView.m; sourceTree = ""; }; + 6684CD491566D07400A46247 /* SKSvgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgView.h; sourceTree = ""; }; + 6684CD4A1566D07400A46247 /* SKSvgView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSvgView.m; sourceTree = ""; }; 66B79AD315475254002F99FF /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; 66B79AD415475254002F99FF /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGBasicDataTypes.h; sourceTree = ""; }; - 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGBasicDataTypes.m; sourceTree = ""; }; - 66B79AD715475254002F99FF /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 66B79AD815475254002F99FF /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 66B79AD915475254002F99FF /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 66B79ADA15475254002F99FF /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 66B79ADD15475254002F99FF /* SVGSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSource.h; sourceTree = ""; }; - 66B79ADE15475254002F99FF /* SVGSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSource.m; sourceTree = ""; }; - 66B79ADF15475254002F99FF /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 66B79AE015475254002F99FF /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; - 66B79AE115475254002F99FF /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 66B79AE215475254002F99FF /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 66B79AE315475254002F99FF /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 66B79AE415475254002F99FF /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 66B79AE515475254002F99FF /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = ""; }; - 66B79AE615475254002F99FF /* SVGImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImage.m; sourceTree = ""; }; - 66B79AE715475254002F99FF /* SVGImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGImage+CA.h"; sourceTree = ""; }; - 66B79AE815475254002F99FF /* SVGImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGImage+CA.m"; sourceTree = ""; }; - 66B79AE915475254002F99FF /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 66B79AEA15475254002F99FF /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 66B79AD515475254002F99FF /* SKBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBasicDataTypes.h; sourceTree = ""; }; + 66B79AD615475254002F99FF /* SKBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBasicDataTypes.m; sourceTree = ""; }; + 66B79ADD15475254002F99FF /* SKSvgSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgSource.h; sourceTree = ""; }; + 66B79ADE15475254002F99FF /* SKSvgSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSvgSource.m; sourceTree = ""; }; + 66B79AE515475254002F99FF /* SKSvgImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgImage.h; sourceTree = ""; }; + 66B79AE615475254002F99FF /* SKSvgImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSvgImage.m; sourceTree = ""; }; + 66B79AE715475254002F99FF /* SKSvgImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SKSvgImage+CA.h"; sourceTree = ""; }; + 66B79AE815475254002F99FF /* SKSvgImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SKSvgImage+CA.m"; sourceTree = ""; }; 66B79AEB15475254002F99FF /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 66B79AEC15475254002F99FF /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 66B79AED15475254002F99FF /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 66B79AEE15475254002F99FF /* SVGParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParser.h; sourceTree = ""; }; - 66B79AEF15475254002F99FF /* SVGParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParser.m; sourceTree = ""; }; - 66B79AF015475254002F99FF /* SVGParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserExtension.h; sourceTree = ""; }; - 66B79AF115475254002F99FF /* SVGParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParserSVG.h; sourceTree = ""; }; - 66B79AF215475254002F99FF /* SVGParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParserSVG.m; sourceTree = ""; }; - 66B79AF315475254002F99FF /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 66B79AF415475254002F99FF /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 66B79AF515475254002F99FF /* SVGPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPattern.h; sourceTree = ""; }; - 66B79AF615475254002F99FF /* SVGPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPattern.m; sourceTree = ""; }; - 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPointsAndPathsParser.h; sourceTree = ""; }; - 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPointsAndPathsParser.m; sourceTree = ""; }; - 66B79AF915475254002F99FF /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 66B79AFA15475254002F99FF /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 66B79AFB15475254002F99FF /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 66B79AFC15475254002F99FF /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 66B79AFD15475254002F99FF /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 66B79AFE15475254002F99FF /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 66B79AFF15475254002F99FF /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 66B79B0015475254002F99FF /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 66B79B0115475254002F99FF /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; - 66B79B0215475254002F99FF /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 66B79B0315475254002F99FF /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; - 66B79B0415475254002F99FF /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 66B79B0515475254002F99FF /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 66B79B0615475254002F99FF /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 66B79AEE15475254002F99FF /* SKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParser.h; sourceTree = ""; }; + 66B79AEF15475254002F99FF /* SKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKParser.m; sourceTree = ""; }; + 66B79AF515475254002F99FF /* SKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKPattern.h; sourceTree = ""; }; + 66B79AF615475254002F99FF /* SKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKPattern.m; sourceTree = ""; }; 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 66EB2216155946A500DE5844 /* SVGParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParseResult.h; sourceTree = ""; }; - 66EB2217155946A500DE5844 /* SVGParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGParseResult.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C95263281271228F00434805 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; @@ -362,6 +446,95 @@ path = ..; sourceTree = ""; }; + 6661427C156C2E68000F3A27 /* DOM classes */ = { + isa = PBXGroup; + children = ( + 666142F9156C2F0C000F3A27 /* Core DOM */, + 6661427D156C2E69000F3A27 /* SVGCircleElement.h */, + 6661427E156C2E69000F3A27 /* SVGCircleElement.m */, + 6661427F156C2E69000F3A27 /* SVGDefsElement.h */, + 66614280156C2E69000F3A27 /* SVGDefsElement.m */, + 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */, + 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */, + 66614283156C2E69000F3A27 /* SVGElement.h */, + 66614284156C2E69000F3A27 /* SVGElement.m */, + 66614285156C2E69000F3A27 /* SVGEllipseElement.h */, + 66614286156C2E69000F3A27 /* SVGEllipseElement.m */, + 66614287156C2E69000F3A27 /* SVGGroupElement.h */, + 66614288156C2E69000F3A27 /* SVGGroupElement.m */, + 66614289156C2E69000F3A27 /* SVGImageElement.h */, + 6661428A156C2E69000F3A27 /* SVGImageElement.m */, + 6661428B156C2E69000F3A27 /* SVGLineElement.h */, + 6661428C156C2E69000F3A27 /* SVGLineElement.m */, + 6661428D156C2E69000F3A27 /* SVGPathElement.h */, + 6661428E156C2E69000F3A27 /* SVGPathElement.m */, + 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */, + 66614290156C2E69000F3A27 /* SVGPolygonElement.m */, + 66614291156C2E69000F3A27 /* SVGPolylineElement.h */, + 66614292156C2E69000F3A27 /* SVGPolylineElement.m */, + 66614293156C2E69000F3A27 /* SVGRectElement.h */, + 66614294156C2E69000F3A27 /* SVGRectElement.m */, + 66614295156C2E69000F3A27 /* SVGShapeElement.h */, + 66614296156C2E69000F3A27 /* SVGShapeElement.m */, + 66614297156C2E69000F3A27 /* SVGSVGElement.h */, + 666142F3156C2E87000F3A27 /* SVGDocument.h */, + 666142F4156C2E87000F3A27 /* SVGDocument.m */, + 66614298156C2E69000F3A27 /* SVGSVGElement.m */, + 66614299156C2E69000F3A27 /* SVGTextElement.h */, + 6661429A156C2E69000F3A27 /* SVGTextElement.m */, + 6661429B156C2E69000F3A27 /* SVGTitleElement.h */, + 6661429C156C2E69000F3A27 /* SVGTitleElement.m */, + ); + path = "DOM classes"; + sourceTree = ""; + }; + 6661429D156C2E69000F3A27 /* Parsing */ = { + isa = PBXGroup; + children = ( + 6661429E156C2E6A000F3A27 /* SKParseResult.h */, + 6661429F156C2E6A000F3A27 /* SKParseResult.m */, + 666142A0156C2E6A000F3A27 /* SKParserExtension.h */, + 666142A1156C2E6A000F3A27 /* SKParserSVG.h */, + 666142A2156C2E6A000F3A27 /* SKParserSVG.m */, + 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */, + 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */, + ); + path = Parsing; + sourceTree = ""; + }; + 666142F9156C2F0C000F3A27 /* Core DOM */ = { + isa = PBXGroup; + children = ( + 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, + 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */, + 66614306156C3B95000F3A27 /* NodeList.h */, + 66614307156C3B95000F3A27 /* NodeList.m */, + 66614300156C3A0B000F3A27 /* Node.h */, + 66614301156C3A0B000F3A27 /* Node.m */, + 666142FA156C2F14000F3A27 /* Document.h */, + 666142FB156C2F14000F3A27 /* Document.m */, + 66614312156C3F60000F3A27 /* Element.h */, + 66614313156C3F61000F3A27 /* Element.m */, + 66614318156C436E000F3A27 /* ProcessingInstruction.h */, + 66614319156C436F000F3A27 /* ProcessingInstruction.m */, + 6661431E156C43B9000F3A27 /* Comment.h */, + 6661431F156C43BA000F3A27 /* Comment.m */, + 66614324156C43DF000F3A27 /* CharacterData.h */, + 66614325156C43E0000F3A27 /* CharacterData.m */, + 6661432A156C44BB000F3A27 /* Attr.h */, + 6661432B156C44BC000F3A27 /* Attr.m */, + 66614330156C45EF000F3A27 /* DocumentFragment.h */, + 66614331156C45F1000F3A27 /* DocumentFragment.m */, + 66614336156C463B000F3A27 /* Text.h */, + 66614337156C463C000F3A27 /* Text.m */, + 6661433C156C46DD000F3A27 /* CDATASection.h */, + 6661433D156C46DE000F3A27 /* CDATASection.m */, + 66614342156C4722000F3A27 /* EntityReference.h */, + 66614343156C4724000F3A27 /* EntityReference.m */, + ); + path = "Core DOM"; + sourceTree = ""; + }; C952623F12711D8600434805 /* Framework */ = { isa = PBXGroup; children = ( @@ -379,64 +552,27 @@ C952631B1271225F00434805 /* Core */ = { isa = PBXGroup; children = ( + 6661427C156C2E68000F3A27 /* DOM classes */, + 6661429D156C2E69000F3A27 /* Parsing */, 66B79AD315475254002F99FF /* CGPathAdditions.h */, 66B79AD415475254002F99FF /* CGPathAdditions.m */, - 66B79AD515475254002F99FF /* SVGBasicDataTypes.h */, - 66B79AD615475254002F99FF /* SVGBasicDataTypes.m */, - 66B79AD715475254002F99FF /* SVGCircleElement.h */, - 66B79AD815475254002F99FF /* SVGCircleElement.m */, - 66B79AD915475254002F99FF /* SVGDefsElement.h */, - 66B79ADA15475254002F99FF /* SVGDefsElement.m */, - 66B79ADB15475254002F99FF /* SVGDescriptionElement.h */, - 66B79ADC15475254002F99FF /* SVGDescriptionElement.m */, - 66B79ADD15475254002F99FF /* SVGSource.h */, - 66B79ADE15475254002F99FF /* SVGSource.m */, - 66B79ADF15475254002F99FF /* SVGElement.h */, - 66B79AE015475254002F99FF /* SVGElement.m */, - 66B79AE115475254002F99FF /* SVGEllipseElement.h */, - 66B79AE215475254002F99FF /* SVGEllipseElement.m */, - 66B79AE315475254002F99FF /* SVGGroupElement.h */, - 66B79AE415475254002F99FF /* SVGGroupElement.m */, - 66B79AE515475254002F99FF /* SVGImage.h */, - 66B79AE615475254002F99FF /* SVGImage.m */, - 66B79AE715475254002F99FF /* SVGImage+CA.h */, - 66B79AE815475254002F99FF /* SVGImage+CA.m */, - 66B79AE915475254002F99FF /* SVGImageElement.h */, - 66B79AEA15475254002F99FF /* SVGImageElement.m */, + 66B79AD515475254002F99FF /* SKBasicDataTypes.h */, + 66B79AD615475254002F99FF /* SKBasicDataTypes.m */, + 66B79ADD15475254002F99FF /* SKSvgSource.h */, + 66B79ADE15475254002F99FF /* SKSvgSource.m */, + 66B79AE515475254002F99FF /* SKSvgImage.h */, + 66B79AE615475254002F99FF /* SKSvgImage.m */, + 66B79AE715475254002F99FF /* SKSvgImage+CA.h */, + 66B79AE815475254002F99FF /* SKSvgImage+CA.m */, 66B79AEB15475254002F99FF /* SVGKit.h */, - 66B79AEC15475254002F99FF /* SVGLineElement.h */, - 66B79AED15475254002F99FF /* SVGLineElement.m */, - 66B79AEE15475254002F99FF /* SVGParser.h */, - 66B79AEF15475254002F99FF /* SVGParser.m */, - 66EB2216155946A500DE5844 /* SVGParseResult.h */, - 66EB2217155946A500DE5844 /* SVGParseResult.m */, - 66B79AF015475254002F99FF /* SVGParserExtension.h */, - 66B79AF115475254002F99FF /* SVGParserSVG.h */, - 66B79AF215475254002F99FF /* SVGParserSVG.m */, - 66B79AF315475254002F99FF /* SVGPathElement.h */, - 66B79AF415475254002F99FF /* SVGPathElement.m */, - 66B79AF515475254002F99FF /* SVGPattern.h */, - 66B79AF615475254002F99FF /* SVGPattern.m */, - 66B79AF715475254002F99FF /* SVGPointsAndPathsParser.h */, - 66B79AF815475254002F99FF /* SVGPointsAndPathsParser.m */, - 66B79AF915475254002F99FF /* SVGPolygonElement.h */, - 66B79AFA15475254002F99FF /* SVGPolygonElement.m */, - 66B79AFB15475254002F99FF /* SVGPolylineElement.h */, - 66B79AFC15475254002F99FF /* SVGPolylineElement.m */, - 66B79AFD15475254002F99FF /* SVGRectElement.h */, - 66B79AFE15475254002F99FF /* SVGRectElement.m */, - 66B79AFF15475254002F99FF /* SVGShapeElement.h */, - 66B79B0015475254002F99FF /* SVGShapeElement.m */, - 66B79B0115475254002F99FF /* SVGSVGElement.h */, - 66B79B0215475254002F99FF /* SVGSVGElement.m */, - 66B79B0315475254002F99FF /* SVGTextElement.h */, - 66B79B0415475254002F99FF /* SVGTextElement.m */, - 66B79B0515475254002F99FF /* SVGTitleElement.h */, - 66B79B0615475254002F99FF /* SVGTitleElement.m */, + 66B79AEE15475254002F99FF /* SKParser.h */, + 66B79AEF15475254002F99FF /* SKParser.m */, + 66B79AF515475254002F99FF /* SKPattern.h */, + 66B79AF615475254002F99FF /* SKPattern.m */, 66B79B0715475254002F99FF /* SVGUtils.h */, 66B79B0815475254002F99FF /* SVGUtils.m */, - 6684CD491566D07400A46247 /* SVGView.h */, - 6684CD4A1566D07400A46247 /* SVGView.m */, + 6684CD491566D07400A46247 /* SKSvgView.h */, + 6684CD4A1566D07400A46247 /* SKSvgView.m */, ); name = Core; path = ../../Core; @@ -457,39 +593,53 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 66213550148AF80B006881E1 /* CALayerWithChildHitTest.h in Headers */, - 66213552148AF80B006881E1 /* CAShapeLayerWithHitTest.h in Headers */, - 66213556148AF80B006881E1 /* SVGPathView.h in Headers */, - 66B79B0A15475254002F99FF /* CGPathAdditions.h in Headers */, - 66B79B0E15475254002F99FF /* SVGBasicDataTypes.h in Headers */, - 66B79B1215475254002F99FF /* SVGCircleElement.h in Headers */, - 66B79B1615475254002F99FF /* SVGDefsElement.h in Headers */, - 66B79B1A15475254002F99FF /* SVGDescriptionElement.h in Headers */, - 66B79B1E15475254002F99FF /* SVGSource.h in Headers */, - 66B79B2215475254002F99FF /* SVGElement.h in Headers */, - 66B79B2615475254002F99FF /* SVGEllipseElement.h in Headers */, - 66B79B2A15475254002F99FF /* SVGGroupElement.h in Headers */, - 66B79B2E15475254002F99FF /* SVGImage.h in Headers */, - 66B79B3215475254002F99FF /* SVGImage+CA.h in Headers */, - 66B79B3615475254002F99FF /* SVGImageElement.h in Headers */, - 66B79B3A15475254002F99FF /* SVGKit.h in Headers */, - 66B79B3C15475254002F99FF /* SVGLineElement.h in Headers */, - 66B79B4015475254002F99FF /* SVGParser.h in Headers */, - 66B79B4415475254002F99FF /* SVGParserExtension.h in Headers */, - 66B79B4615475254002F99FF /* SVGParserSVG.h in Headers */, - 66B79B4A15475254002F99FF /* SVGPathElement.h in Headers */, - 66B79B4E15475254002F99FF /* SVGPattern.h in Headers */, - 66B79B5215475254002F99FF /* SVGPointsAndPathsParser.h in Headers */, - 66B79B5615475254002F99FF /* SVGPolygonElement.h in Headers */, - 66B79B5A15475254002F99FF /* SVGPolylineElement.h in Headers */, - 66B79B5E15475254002F99FF /* SVGRectElement.h in Headers */, - 66B79B6215475254002F99FF /* SVGShapeElement.h in Headers */, - 66B79B6615475254002F99FF /* SVGSVGElement.h in Headers */, - 66B79B6A15475254002F99FF /* SVGTextElement.h in Headers */, - 66B79B6E15475254002F99FF /* SVGTitleElement.h in Headers */, - 66B79B7215475254002F99FF /* SVGUtils.h in Headers */, - 6684CD461566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */, - 6684CD4C1566D07400A46247 /* SVGView.h in Headers */, + 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */, + 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */, + 666141E015697534000F3A27 /* SKSvgSource.h in Headers */, + 666141E815697534000F3A27 /* SKSvgImage.h in Headers */, + 666141EA15697534000F3A27 /* SKSvgImage+CA.h in Headers */, + 666141EE15697534000F3A27 /* SVGKit.h in Headers */, + 666141F115697534000F3A27 /* SKParser.h in Headers */, + 666141FA15697534000F3A27 /* SKPattern.h in Headers */, + 6661420C15697534000F3A27 /* SVGUtils.h in Headers */, + 6661420E15697534000F3A27 /* SKSvgView.h in Headers */, + 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */, + 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */, + 666142121569756C000F3A27 /* SVGPathView.h in Headers */, + 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */, + 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */, + 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */, + 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */, + 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */, + 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */, + 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */, + 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */, + 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */, + 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */, + 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */, + 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */, + 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */, + 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */, + 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */, + 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */, + 666142E6156C2E6A000F3A27 /* SKParseResult.h in Headers */, + 666142EA156C2E6A000F3A27 /* SKParserExtension.h in Headers */, + 666142EC156C2E6A000F3A27 /* SKParserSVG.h in Headers */, + 666142F0156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */, + 666142F6156C2E87000F3A27 /* SVGDocument.h in Headers */, + 666142FD156C2F14000F3A27 /* Document.h in Headers */, + 66614303156C3A0B000F3A27 /* Node.h in Headers */, + 66614309156C3B95000F3A27 /* NodeList.h in Headers */, + 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */, + 66614315156C3F62000F3A27 /* Element.h in Headers */, + 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */, + 66614321156C43BA000F3A27 /* Comment.h in Headers */, + 66614327156C43E0000F3A27 /* CharacterData.h in Headers */, + 6661432D156C44BD000F3A27 /* Attr.h in Headers */, + 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */, + 66614339156C463D000F3A27 /* Text.h in Headers */, + 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */, + 66614345156C4726000F3A27 /* EntityReference.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -500,36 +650,50 @@ 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */, 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */, 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */, - 66B79B0D15475254002F99FF /* SVGBasicDataTypes.h in Headers */, - 66B79B1115475254002F99FF /* SVGCircleElement.h in Headers */, - 66B79B1515475254002F99FF /* SVGDefsElement.h in Headers */, - 66B79B1915475254002F99FF /* SVGDescriptionElement.h in Headers */, - 66B79B1D15475254002F99FF /* SVGSource.h in Headers */, - 66B79B2115475254002F99FF /* SVGElement.h in Headers */, - 66B79B2515475254002F99FF /* SVGEllipseElement.h in Headers */, - 66B79B2915475254002F99FF /* SVGGroupElement.h in Headers */, - 66B79B2D15475254002F99FF /* SVGImage.h in Headers */, - 66B79B3115475254002F99FF /* SVGImage+CA.h in Headers */, - 66B79B3515475254002F99FF /* SVGImageElement.h in Headers */, + 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */, + 66B79B1D15475254002F99FF /* SKSvgSource.h in Headers */, + 66B79B2D15475254002F99FF /* SKSvgImage.h in Headers */, + 66B79B3115475254002F99FF /* SKSvgImage+CA.h in Headers */, 66B79B3915475254002F99FF /* SVGKit.h in Headers */, - 66B79B3B15475254002F99FF /* SVGLineElement.h in Headers */, - 66B79B3F15475254002F99FF /* SVGParser.h in Headers */, - 66B79B4315475254002F99FF /* SVGParserExtension.h in Headers */, - 66B79B4515475254002F99FF /* SVGParserSVG.h in Headers */, - 66B79B4915475254002F99FF /* SVGPathElement.h in Headers */, - 66B79B4D15475254002F99FF /* SVGPattern.h in Headers */, - 66B79B5115475254002F99FF /* SVGPointsAndPathsParser.h in Headers */, - 66B79B5515475254002F99FF /* SVGPolygonElement.h in Headers */, - 66B79B5915475254002F99FF /* SVGPolylineElement.h in Headers */, - 66B79B5D15475254002F99FF /* SVGRectElement.h in Headers */, - 66B79B6115475254002F99FF /* SVGShapeElement.h in Headers */, - 66B79B6515475254002F99FF /* SVGSVGElement.h in Headers */, - 66B79B6915475254002F99FF /* SVGTextElement.h in Headers */, - 66B79B6D15475254002F99FF /* SVGTitleElement.h in Headers */, + 66B79B3F15475254002F99FF /* SKParser.h in Headers */, + 66B79B4D15475254002F99FF /* SKPattern.h in Headers */, 66B79B7115475254002F99FF /* SVGUtils.h in Headers */, - 66EB2218155946A600DE5844 /* SVGParseResult.h in Headers */, 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */, - 6684CD4B1566D07400A46247 /* SVGView.h in Headers */, + 6684CD4B1566D07400A46247 /* SKSvgView.h in Headers */, + 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */, + 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */, + 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */, + 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */, + 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */, + 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */, + 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */, + 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */, + 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */, + 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */, + 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */, + 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */, + 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */, + 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */, + 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */, + 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */, + 666142E5156C2E6A000F3A27 /* SKParseResult.h in Headers */, + 666142E9156C2E6A000F3A27 /* SKParserExtension.h in Headers */, + 666142EB156C2E6A000F3A27 /* SKParserSVG.h in Headers */, + 666142EF156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */, + 666142F5156C2E87000F3A27 /* SVGDocument.h in Headers */, + 666142FC156C2F14000F3A27 /* Document.h in Headers */, + 66614302156C3A0B000F3A27 /* Node.h in Headers */, + 66614308156C3B95000F3A27 /* NodeList.h in Headers */, + 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */, + 66614314156C3F62000F3A27 /* Element.h in Headers */, + 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */, + 66614320156C43BA000F3A27 /* Comment.h in Headers */, + 66614326156C43E0000F3A27 /* CharacterData.h in Headers */, + 6661432C156C44BD000F3A27 /* Attr.h in Headers */, + 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */, + 66614338156C463D000F3A27 /* Text.h in Headers */, + 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */, + 66614344156C4726000F3A27 /* EntityReference.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -638,34 +802,48 @@ 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */, 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */, - 66B79B1015475254002F99FF /* SVGBasicDataTypes.m in Sources */, - 66B79B1415475254002F99FF /* SVGCircleElement.m in Sources */, - 66B79B1815475254002F99FF /* SVGDefsElement.m in Sources */, - 66B79B1C15475254002F99FF /* SVGDescriptionElement.m in Sources */, - 66B79B2015475254002F99FF /* SVGSource.m in Sources */, - 66B79B2415475254002F99FF /* SVGElement.m in Sources */, - 66B79B2815475254002F99FF /* SVGEllipseElement.m in Sources */, - 66B79B2C15475254002F99FF /* SVGGroupElement.m in Sources */, - 66B79B3015475254002F99FF /* SVGImage.m in Sources */, - 66B79B3415475254002F99FF /* SVGImage+CA.m in Sources */, - 66B79B3815475254002F99FF /* SVGImageElement.m in Sources */, - 66B79B3E15475254002F99FF /* SVGLineElement.m in Sources */, - 66B79B4215475254002F99FF /* SVGParser.m in Sources */, - 66B79B4815475254002F99FF /* SVGParserSVG.m in Sources */, - 66B79B4C15475254002F99FF /* SVGPathElement.m in Sources */, - 66B79B5015475254002F99FF /* SVGPattern.m in Sources */, - 66B79B5415475254002F99FF /* SVGPointsAndPathsParser.m in Sources */, - 66B79B5815475254002F99FF /* SVGPolygonElement.m in Sources */, - 66B79B5C15475254002F99FF /* SVGPolylineElement.m in Sources */, - 66B79B6015475254002F99FF /* SVGRectElement.m in Sources */, - 66B79B6415475254002F99FF /* SVGShapeElement.m in Sources */, - 66B79B6815475254002F99FF /* SVGSVGElement.m in Sources */, - 66B79B6C15475254002F99FF /* SVGTextElement.m in Sources */, - 66B79B7015475254002F99FF /* SVGTitleElement.m in Sources */, + 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */, + 66B79B2015475254002F99FF /* SKSvgSource.m in Sources */, + 66B79B3015475254002F99FF /* SKSvgImage.m in Sources */, + 66B79B3415475254002F99FF /* SKSvgImage+CA.m in Sources */, + 66B79B4215475254002F99FF /* SKParser.m in Sources */, + 66B79B5015475254002F99FF /* SKPattern.m in Sources */, 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, - 66EB221A155946AC00DE5844 /* SVGParseResult.m in Sources */, 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */, - 6684CD4E1566D07400A46247 /* SVGView.m in Sources */, + 6684CD4E1566D07400A46247 /* SKSvgView.m in Sources */, + 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */, + 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */, + 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */, + 666142B4156C2E6A000F3A27 /* SVGElement.m in Sources */, + 666142B8156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */, + 666142BC156C2E6A000F3A27 /* SVGGroupElement.m in Sources */, + 666142C0156C2E6A000F3A27 /* SVGImageElement.m in Sources */, + 666142C4156C2E6A000F3A27 /* SVGLineElement.m in Sources */, + 666142C8156C2E6A000F3A27 /* SVGPathElement.m in Sources */, + 666142CC156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */, + 666142D0156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */, + 666142D4156C2E6A000F3A27 /* SVGRectElement.m in Sources */, + 666142D8156C2E6A000F3A27 /* SVGShapeElement.m in Sources */, + 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */, + 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */, + 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, + 666142E8156C2E6A000F3A27 /* SKParseResult.m in Sources */, + 666142EE156C2E6A000F3A27 /* SKParserSVG.m in Sources */, + 666142F2156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */, + 666142F8156C2E87000F3A27 /* SVGDocument.m in Sources */, + 666142FF156C2F14000F3A27 /* Document.m in Sources */, + 66614305156C3A0B000F3A27 /* Node.m in Sources */, + 6661430B156C3B95000F3A27 /* NodeList.m in Sources */, + 66614311156C3DC7000F3A27 /* NamedNodeMap.m in Sources */, + 66614317156C3F62000F3A27 /* Element.m in Sources */, + 6661431D156C436F000F3A27 /* ProcessingInstruction.m in Sources */, + 66614323156C43BA000F3A27 /* Comment.m in Sources */, + 66614329156C43E0000F3A27 /* CharacterData.m in Sources */, + 6661432F156C44BD000F3A27 /* Attr.m in Sources */, + 66614335156C45F2000F3A27 /* DocumentFragment.m in Sources */, + 6661433B156C463D000F3A27 /* Text.m in Sources */, + 66614341156C46DF000F3A27 /* CDATASection.m in Sources */, + 66614347156C4726000F3A27 /* EntityReference.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -676,34 +854,48 @@ 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */, 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */, - 66B79B0F15475254002F99FF /* SVGBasicDataTypes.m in Sources */, - 66B79B1315475254002F99FF /* SVGCircleElement.m in Sources */, - 66B79B1715475254002F99FF /* SVGDefsElement.m in Sources */, - 66B79B1B15475254002F99FF /* SVGDescriptionElement.m in Sources */, - 66B79B1F15475254002F99FF /* SVGSource.m in Sources */, - 66B79B2315475254002F99FF /* SVGElement.m in Sources */, - 66B79B2715475254002F99FF /* SVGEllipseElement.m in Sources */, - 66B79B2B15475254002F99FF /* SVGGroupElement.m in Sources */, - 66B79B2F15475254002F99FF /* SVGImage.m in Sources */, - 66B79B3315475254002F99FF /* SVGImage+CA.m in Sources */, - 66B79B3715475254002F99FF /* SVGImageElement.m in Sources */, - 66B79B3D15475254002F99FF /* SVGLineElement.m in Sources */, - 66B79B4115475254002F99FF /* SVGParser.m in Sources */, - 66B79B4715475254002F99FF /* SVGParserSVG.m in Sources */, - 66B79B4B15475254002F99FF /* SVGPathElement.m in Sources */, - 66B79B4F15475254002F99FF /* SVGPattern.m in Sources */, - 66B79B5315475254002F99FF /* SVGPointsAndPathsParser.m in Sources */, - 66B79B5715475254002F99FF /* SVGPolygonElement.m in Sources */, - 66B79B5B15475254002F99FF /* SVGPolylineElement.m in Sources */, - 66B79B5F15475254002F99FF /* SVGRectElement.m in Sources */, - 66B79B6315475254002F99FF /* SVGShapeElement.m in Sources */, - 66B79B6715475254002F99FF /* SVGSVGElement.m in Sources */, - 66B79B6B15475254002F99FF /* SVGTextElement.m in Sources */, - 66B79B6F15475254002F99FF /* SVGTitleElement.m in Sources */, + 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */, + 66B79B1F15475254002F99FF /* SKSvgSource.m in Sources */, + 66B79B2F15475254002F99FF /* SKSvgImage.m in Sources */, + 66B79B3315475254002F99FF /* SKSvgImage+CA.m in Sources */, + 66B79B4115475254002F99FF /* SKParser.m in Sources */, + 66B79B4F15475254002F99FF /* SKPattern.m in Sources */, 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, - 66EB2219155946A600DE5844 /* SVGParseResult.m in Sources */, 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */, - 6684CD4D1566D07400A46247 /* SVGView.m in Sources */, + 6684CD4D1566D07400A46247 /* SKSvgView.m in Sources */, + 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */, + 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */, + 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */, + 666142B3156C2E6A000F3A27 /* SVGElement.m in Sources */, + 666142B7156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */, + 666142BB156C2E6A000F3A27 /* SVGGroupElement.m in Sources */, + 666142BF156C2E6A000F3A27 /* SVGImageElement.m in Sources */, + 666142C3156C2E6A000F3A27 /* SVGLineElement.m in Sources */, + 666142C7156C2E6A000F3A27 /* SVGPathElement.m in Sources */, + 666142CB156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */, + 666142CF156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */, + 666142D3156C2E6A000F3A27 /* SVGRectElement.m in Sources */, + 666142D7156C2E6A000F3A27 /* SVGShapeElement.m in Sources */, + 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */, + 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */, + 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, + 666142E7156C2E6A000F3A27 /* SKParseResult.m in Sources */, + 666142ED156C2E6A000F3A27 /* SKParserSVG.m in Sources */, + 666142F1156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */, + 666142F7156C2E87000F3A27 /* SVGDocument.m in Sources */, + 666142FE156C2F14000F3A27 /* Document.m in Sources */, + 66614304156C3A0B000F3A27 /* Node.m in Sources */, + 6661430A156C3B95000F3A27 /* NodeList.m in Sources */, + 66614310156C3DC7000F3A27 /* NamedNodeMap.m in Sources */, + 66614316156C3F62000F3A27 /* Element.m in Sources */, + 6661431C156C436F000F3A27 /* ProcessingInstruction.m in Sources */, + 66614322156C43BA000F3A27 /* Comment.m in Sources */, + 66614328156C43E0000F3A27 /* CharacterData.m in Sources */, + 6661432E156C44BD000F3A27 /* Attr.m in Sources */, + 66614334156C45F2000F3A27 /* DocumentFragment.m in Sources */, + 6661433A156C463D000F3A27 /* Text.m in Sources */, + 66614340156C46DF000F3A27 /* CDATASection.m in Sources */, + 66614346156C4726000F3A27 /* EntityReference.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 3600cf05a9301fb889f2429918ec65083ff9f386 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 22 May 2012 23:36:10 +0100 Subject: [PATCH 024/110] Added a missing dealloc --- Core/DOM classes/Core DOM/NodeList.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/DOM classes/Core DOM/NodeList.m b/Core/DOM classes/Core DOM/NodeList.m index b299e0d58..14386e83f 100644 --- a/Core/DOM classes/Core DOM/NodeList.m +++ b/Core/DOM classes/Core DOM/NodeList.m @@ -15,6 +15,11 @@ - (id)init { return self; } +- (void)dealloc { + self.internalArray = nil; + [super dealloc]; +} + -(Node*) item:(int) index { return [self.internalArray objectAtIndex:index]; From 8230ffcbd61641af47ac3564fef3f569ad08a601 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 22 May 2012 23:36:58 +0100 Subject: [PATCH 025/110] Added missing semi-colons --- Core/DOM classes/Core DOM/NamedNodeMap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.h b/Core/DOM classes/Core DOM/NamedNodeMap.h index c1d9f1b30..2e12f386f 100644 --- a/Core/DOM classes/Core DOM/NamedNodeMap.h +++ b/Core/DOM classes/Core DOM/NamedNodeMap.h @@ -33,8 +33,8 @@ @interface NamedNodeMap : NSObject -(Node*) getNamedItem(in DOMString name); --(Node*) setNamedItem(in Node arg) --(Node*) removeNamedItem(in DOMString name) +-(Node*) setNamedItem(in Node arg); +-(Node*) removeNamedItem(in DOMString name); -(Node*) item(in unsigned long index); @property(readonly) unsigned long length; From 1e290a0f28530e675e4154acc219ddea6906cb25 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 22 May 2012 23:37:25 +0100 Subject: [PATCH 026/110] Added missing pointer --- Core/DOM classes/Core DOM/Text.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/DOM classes/Core DOM/Text.h b/Core/DOM classes/Core DOM/Text.h index bde7f9dd1..e62783595 100644 --- a/Core/DOM classes/Core DOM/Text.h +++ b/Core/DOM classes/Core DOM/Text.h @@ -16,6 +16,6 @@ @interface Text : CharacterData --(Text) splitText:(unsigned long) offset; +-(Text*) splitText:(unsigned long) offset; @end From d6a1316cd5ebe68fedc33db037b1e74211b395d2 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 22 May 2012 23:53:05 +0100 Subject: [PATCH 027/110] Added implementation for NamedNodeMap --- Core/DOM classes/Core DOM/NamedNodeMap.h | 10 +- Core/DOM classes/Core DOM/NamedNodeMap.m | 118 +++++++++++++++++++++++ 2 files changed, 123 insertions(+), 5 deletions(-) diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.h b/Core/DOM classes/Core DOM/NamedNodeMap.h index 2e12f386f..403f83c86 100644 --- a/Core/DOM classes/Core DOM/NamedNodeMap.h +++ b/Core/DOM classes/Core DOM/NamedNodeMap.h @@ -32,10 +32,10 @@ @interface NamedNodeMap : NSObject --(Node*) getNamedItem(in DOMString name); --(Node*) setNamedItem(in Node arg); --(Node*) removeNamedItem(in DOMString name); --(Node*) item(in unsigned long index); +-(Node*) getNamedItem:(NSString*) name; +-(Node*) setNamedItem:(Node*) arg; +-(Node*) removeNamedItem:(NSString*) name; +-(Node*) item:(unsigned long) index; @property(readonly) unsigned long length; @@ -46,6 +46,6 @@ -(Node*) setNamedItemNS:(Node*) arg; // Introduced in DOM Level 2: --(Node*) removeNamedItemNS(NSString*) namespaceURI localName:(NSString*) localName; +-(Node*) removeNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName; @end diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.m b/Core/DOM classes/Core DOM/NamedNodeMap.m index 3907e02e6..e245d5c5f 100644 --- a/Core/DOM classes/Core DOM/NamedNodeMap.m +++ b/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -8,6 +8,124 @@ #import "NamedNodeMap.h" +@interface NamedNodeMap() +@property(nonatomic,retain) NSMutableDictionary* internalDictionary; +@property(nonatomic,retain) NSMutableDictionary* internalDictionaryOfNamespaces; +@end + @implementation NamedNodeMap +@synthesize internalDictionary; + +- (id)init { + self = [super init]; + if (self) { + self.internalDictionary = [NSMutableDictionary dictionary]; + self.internalDictionaryOfNamespaces = [NSMutableDictionary dictionary]; + } + return self; +} + +- (void)dealloc { + self.internalDictionary = nil; + self.internalDictionaryOfNamespaces = nil; + + [super dealloc]; +} + +-(Node*) getNamedItem:(NSString*) name +{ + return [self.internalDictionary objectForKey:name]; +} + +-(Node*) setNamedItem:(Node*) arg +{ + Node* oldNode = [self.internalDictionary objectForKey:arg.nodeName]; + + [self.internalDictionary setObject:arg forKey:arg.nodeName]; + + return oldNode; +} + +-(Node*) removeNamedItem:(NSString*) name +{ + Node* oldNode = [self.internalDictionary objectForKey:name]; + + [self.internalDictionary removeObjectForKey:name]; + + return oldNode; +} + +-(unsigned long)length +{ + int count = [self.internalDictionary count]; + + for( NSDictionary* namespaceDict in self.internalDictionaryOfNamespaces ) + { + count += [namespaceDict count]; + } + + return count; +} + +-(Node*) item:(unsigned long) index +{ + if( index < [self.internalDictionary count] ) + return [self.internalDictionary.allValues objectAtIndex:index]; + else + { + index -= [self.internalDictionary.count]; + + for( NSDictionary* namespaceDict in self.internalDictionaryOfNamespaces ) + { + if( index < [namespaceDict count] ) + return [namespaceDict.allValues objectAtIndex:index]; + else + index -= [namespaceDict count]; + } + } + + return nil; +} + +-(unsigned long)length +{ + return [self.internalDictionary count]; +} + +// Introduced in DOM Level 2: +-(Node*) getNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:arg.namespaceURI]; + + return [namespaceDict objectForKey:localName]; +} + +// Introduced in DOM Level 2: +-(Node*) setNamedItemNS:(Node*) arg +{ + NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:arg.namespaceURI]; + if( namespaceDict == nil ) + { + namespaceDict = [NSMutableDictionary dictionary]; + [self.internalDictionaryOfNamespaces setObject:namespaceDict forKey:arg.namespaceURI]; + } + Node* oldNode = [namespaceDict objectForKey:arg.nodeName]; + + [namespaceDict setObject:arg forKey:arg.nodeName]; + + return oldNode; +} + +// Introduced in DOM Level 2: +-(Node*) removeNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:arg.namespaceURI]; + Node* oldNode = [namespaceDict objectForKey:localName]; + + [namespaceDict removeObjectForKey:localName]; + + return oldNode; +} + @end From 90ef74c074a3827b303cc862f31e05cfb9577ff6 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 23 May 2012 00:25:00 +0100 Subject: [PATCH 028/110] ADDED: manual implementation of Node.m - mostly complete, but some difficult methods ignored, and set to Assert if called --- Core/DOM classes/Core DOM/Attr.h | 2 +- Core/DOM classes/Core DOM/Node.h | 20 +- Core/DOM classes/Core DOM/Node.m | 262 ++++++++++++++++++ Core/DOM classes/Core DOM/NodeList+Mutable.h | 7 + Core/DOM classes/Core DOM/NodeList+Mutable.m | 13 + Core/DOM classes/Core DOM/NodeList.m | 7 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 12 + 7 files changed, 316 insertions(+), 7 deletions(-) create mode 100644 Core/DOM classes/Core DOM/NodeList+Mutable.h create mode 100644 Core/DOM classes/Core DOM/NodeList+Mutable.m diff --git a/Core/DOM classes/Core DOM/Attr.h b/Core/DOM classes/Core DOM/Attr.h index a3230cddb..b8aa1a65e 100644 --- a/Core/DOM classes/Core DOM/Attr.h +++ b/Core/DOM classes/Core DOM/Attr.h @@ -21,12 +21,12 @@ #import "Element.h" @interface Attr : Node + @property(nonatomic,retain,readonly) NSString* name; @property(nonatomic,readonly) BOOL specified; @property(nonatomic,retain,readonly) NSString* value; // Introduced in DOM Level 2: @property(nonatomic,retain,readonly) Element* ownerElement; -}; @end diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h index dc4752d0c..19479687a 100644 --- a/Core/DOM classes/Core DOM/Node.h +++ b/Core/DOM classes/Core DOM/Node.h @@ -87,8 +87,7 @@ typedef enum SKNodeType SKNodeType_DOCUMENT_TYPE_NODE = 10; SKNodeType_DOCUMENT_FRAGMENT_NODE = 11; SKNodeType_NOTATION_NODE = 12; -} -SKNodeType; +} SKNodeType; @interface Node : NSObject @@ -135,4 +134,21 @@ SKNodeType; // Introduced in DOM Level 2: @property(nonatomic) BOOL hasAttributes; +#pragma mark - ObjectiveC init methods +/** Generic init method - used by all the other methods (designated initializer, effectively) */ +- (id)initType:(SKNodeType) nt; + +- (id)initAttr:(NSString*) n value:(NSString*) v; +- (id)initCDATASection:(NSString*) n value:(NSString*) v; +- (id)initComment:(NSString*) n value:(NSString*) v; +- (id)initDocument:(NSString*) n; +- (id)initDocumentFragment:(NSString*) n; +- (id)initDocumentType:(NSString*) n; +- (id)initElement:(NSString*) n; +- (id)initEntity:(NSString*) n; +- (id)initEntityReference:(NSString*) n; +- (id)initNotation:(NSString*) n; +- (id)initProcessingInstruction:(NSString*) n value:(NSString*) v; +- (id)initText:(NSString*) n value:(NSString*) v; + @end diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index 4bffe935c..f03e33d80 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -8,6 +8,268 @@ #import "Node.h" +#import "NodeList+Mutable.h" + +@interface Node() +@property(nonatomic,retain,readonly) NSString* nodeName; +@property(nonatomic,retain,readonly) NSString* nodeValue; + +@property(nonatomic,retain,readonly) SKNodeType nodeType; +@property(nonatomic,retain,readonly) Node* parentNode; +@property(nonatomic,retain,readonly) NodeList* childNodes; +@property(nonatomic,retain,readonly) Node* firstChild; +@property(nonatomic,retain,readonly) Node* lastChild; +@property(nonatomic,retain,readonly) Node* previousSibling; +@property(nonatomic,retain,readonly) Node* nextSibling; +@property(nonatomic,retain,readonly) NamedNodeMap* attributes; + + @property(nonatomic,retain,readonly) Document* ownerDocument; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) NSString* namespaceURI; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) NSString* prefix; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) NSString* localName; + + // Introduced in DOM Level 2: + @property(nonatomic) BOOL hasAttributes; + +@end + @implementation Node +@synthesize nodeName; +@synthesize nodeValue; + +@synthesize nodeType; +@synthesize parentNode; +@synthesize childNodes; +@synthesize firstChild; +@synthesize lastChild; +@synthesize previousSibling; +@synthesize nextSibling; +@synthesize attributes; + +// Modified in DOM Level 2: +@synthesize ownerDocument; + +- (id)initType:(SKNodeType) nt +{ + self = [super init]; + if (self) { + switch( nt ) + { + case SKNodeType_ELEMENT_NODE: + { + self.attributes = [[[NamedNodeMap alloc] init] autorelease]; + }break; + + case SKNodeType_ATTRIBUTE_NODE: + case SKNodeType_TEXT_NODE: + case SKNodeType_CDATA_SECTION_NODE: + case SKNodeType_ENTITY_REFERENCE_NODE: + case SKNodeType_ENTITY_NODE: + case SKNodeType_PROCESSING_INSTRUCTION_NODE: + case SKNodeType_COMMENT_NODE: + case SKNodeType_DOCUMENT_NODE: + case SKNodeType_DOCUMENT_TYPE_NODE: + case SKNodeType_DOCUMENT_FRAGMENT_NODE: + case SKNodeType_NOTATION_NODE: + { + + }break; + } + + self.childNodes = [[[NodeList alloc] init] autorelease]; + } + return self; +} + +- (id)initAttr:(NSString*) n value:(NSString*) v { + self = [self initType:SKNodeType_ATTRIBUTE_NODE]; + if (self) { + self.nodeName = n; + self.nodeValue = v; + } + return self; +} +- (id)initCDATASection:(NSString*) n value:(NSString*) v { + self = [self initType:SKNodeType_CDATA_SECTION_NODE]; + if (self) { + self.nodeName = n; + self.nodeValue = v; + } + return self; +} +- (id)initComment:(NSString*) n value:(NSString*) v { + self = [self initType:SKNodeType_COMMENT_NODE]; + if (self) { + self.nodeName = n; + self.nodeValue = v; + } + return self; +} +- (id)initDocument:(NSString*) n { + self = [self initType:SKNodeType_DOCUMENT_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initDocumentFragment:(NSString*) n { + self = [self initType:SKNodeType_DOCUMENT_FRAGMENT_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initDocumentType:(NSString*) n { + self = [self initType:SKNodeType_DOCUMENT_TYPE_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initElement:(NSString*) n { + self = [self initType:SKNodeType_ELEMENT_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initEntity:(NSString*) n { + self = [self initType:SKNodeType_ENTITY_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initEntityReference:(NSString*) n { + self = [self initType:SKNodeType_ENTITY_REFERENCE_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initNotation:(NSString*) n { + self = [self initType:SKNodeType_NOTATION_NODE]; + if (self) { + self.nodeName = n; + } + return self; +} +- (id)initProcessingInstruction:(NSString*) n value:(NSString*) v { + self = [self initType:SKNodeType_PROCESSING_INSTRUCTION_NODE]; + if (self) { + self.nodeName = n; + self.nodeValue = v; + } + return self; +} +- (id)initText:(NSString*) n value:(NSString*) v { + self = [self initType:SKNodeType_TEXT_NODE]; + if (self) { + self.nodeName = n; + self.nodeValue = v; + } + return self; +} + + +-(Node*) insertBefore:(Node*) newChild refChild:(Node*) refChild +{ + if( refChild == nil ) + { + [self.childNodes.internalArray addObject:newChild]; + } + else + { + [self.childNodes.internalArray insertObject:newChild atIndex:[self.childNodes.internalArray indexOfObject:refChild]]; + } +} + +-(Node*) replaceChild:(Node*) newChild oldChild:(Node*) oldChild +{ + if( newChild.nodeType == SKNodeType_DOCUMENT_FRAGMENT_NODE ) + { + /** Spec: + + "If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed." + */ + + int oldIndex = [self.childNodes.internalArray indexOfObject:oldChild]; + + NSAssert( FALSE, @"We should be recursing down the tree to find 'newChild' at any location, and removing it - required by spec - but we have no convenience method for that search, yet" ); + + for( Node* child in newChild.childNodes.internalArray ) + { + [self.childNodes.internalArray insertObject:child atIndex:oldIndex++]; + } + + return oldChild; + } + else + { + [self.childNodes.internalArray replaceObjectAtIndex:[self.childNodes.internalArray indexOfObject:oldChild] withObject:newChild]; + + return oldChild; + } +} +-(Node*) removeChild:(Node*) oldChild +{ + [self.childNodes.internalArray removeObject:oldChild]; + + return oldChild; +} + +-(Node*) appendChild:(Node*) newChild +{ + [self.childNodes.internalArray removeObject:newChild]; // required by spec + [self.childNodes.internalArray addObject:newChild]; + return newChild; +} + +-(BOOL)hasChildNodes +{ + return [self.childNodes.length > 0]; +} + +-(Node*) cloneNode:(BOOL) deep +{ + NSAssert( FALSE, @"Not implemented yet - read the spec. Sounds tricky. I'm too tired, and would probably screw it up right now" ); +} + +// Modified in DOM Level 2: +-(void) normalize +{ + NSAssert( FALSE, @"Not implemented yet - read the spec. Sounds tricky. I'm too tired, and would probably screw it up right now" ); +} + +// Introduced in DOM Level 2: +-(BOOL) isSupportedFeature:(NSString*) feature version:(NSString*) version +{ + NSAssert( FALSE, @"Not implemented yet - read the spec. I have literally no idea what this is supposed to do." ); +} + +// Introduced in DOM Level 2: +@synthesize namespaceURI; + +// Introduced in DOM Level 2: +@synthesize prefix; + +// Introduced in DOM Level 2: +@synthesize localName; + +// Introduced in DOM Level 2: +-(BOOL)hasAttributes +{ + if( self.attributes == nil ) + return FALSE; + + return (self.attributes.length > 0 ); +} + @end diff --git a/Core/DOM classes/Core DOM/NodeList+Mutable.h b/Core/DOM classes/Core DOM/NodeList+Mutable.h new file mode 100644 index 000000000..b19144b5d --- /dev/null +++ b/Core/DOM classes/Core DOM/NodeList+Mutable.h @@ -0,0 +1,7 @@ +#import "NodeList.h" + +@interface NodeList (Mutable) + +@property(nonatomic,retain) NSMutableArray* internalArray; + +@end diff --git a/Core/DOM classes/Core DOM/NodeList+Mutable.m b/Core/DOM classes/Core DOM/NodeList+Mutable.m new file mode 100644 index 000000000..07aeeba8a --- /dev/null +++ b/Core/DOM classes/Core DOM/NodeList+Mutable.m @@ -0,0 +1,13 @@ +// +// NodeList+Mutable.m +// SVGKit +// +// Created by adam on 23/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "NodeList+Mutable.h" + +@implementation NodeList (Mutable) + +@end diff --git a/Core/DOM classes/Core DOM/NodeList.m b/Core/DOM classes/Core DOM/NodeList.m index 14386e83f..9a78196d0 100644 --- a/Core/DOM classes/Core DOM/NodeList.m +++ b/Core/DOM classes/Core DOM/NodeList.m @@ -1,11 +1,10 @@ #import "NodeList.h" - -@interface NodeList() -@property(nonatomic,retain) NSMutableArray* internalArray; -@end +#import "NodeList+Mutable.h" @implementation NodeList +@synthesize internalArray; + - (id)init { self = [super init]; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index ee9caced8..aa04ebc24 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -165,6 +165,10 @@ 66614345156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; }; 66614346156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; 66614347156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; + 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; + 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; + 6661434C156C5452000F3A27 /* NodeList+Mutable.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614349156C544E000F3A27 /* NodeList+Mutable.m */; }; + 6661434D156C5452000F3A27 /* NodeList+Mutable.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614349156C544E000F3A27 /* NodeList+Mutable.m */; }; 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; @@ -285,6 +289,8 @@ 6661433D156C46DE000F3A27 /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; 66614342156C4722000F3A27 /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; 66614343156C4724000F3A27 /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; + 66614348156C544C000F3A27 /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; + 66614349156C544E000F3A27 /* NodeList+Mutable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NodeList+Mutable.m"; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGImage+SVGPathView.h"; path = "../../Core/SVGImage+SVGPathView.h"; sourceTree = ""; }; 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGImage+SVGPathView.m"; path = "../../Core/SVGImage+SVGPathView.m"; sourceTree = ""; }; 6684CD491566D07400A46247 /* SKSvgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgView.h; sourceTree = ""; }; @@ -508,6 +514,8 @@ 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */, 66614306156C3B95000F3A27 /* NodeList.h */, + 66614348156C544C000F3A27 /* NodeList+Mutable.h */, + 66614349156C544E000F3A27 /* NodeList+Mutable.m */, 66614307156C3B95000F3A27 /* NodeList.m */, 66614300156C3A0B000F3A27 /* Node.h */, 66614301156C3A0B000F3A27 /* Node.m */, @@ -640,6 +648,7 @@ 66614339156C463D000F3A27 /* Text.h in Headers */, 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */, 66614345156C4726000F3A27 /* EntityReference.h in Headers */, + 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -694,6 +703,7 @@ 66614338156C463D000F3A27 /* Text.h in Headers */, 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */, 66614344156C4726000F3A27 /* EntityReference.h in Headers */, + 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -844,6 +854,7 @@ 6661433B156C463D000F3A27 /* Text.m in Sources */, 66614341156C46DF000F3A27 /* CDATASection.m in Sources */, 66614347156C4726000F3A27 /* EntityReference.m in Sources */, + 6661434D156C5452000F3A27 /* NodeList+Mutable.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -896,6 +907,7 @@ 6661433A156C463D000F3A27 /* Text.m in Sources */, 66614340156C46DF000F3A27 /* CDATASection.m in Sources */, 66614346156C4726000F3A27 /* EntityReference.m in Sources */, + 6661434C156C5452000F3A27 /* NodeList+Mutable.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 0fd99723bc2dd0f0859fdb88743de70e4b980454 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 23 May 2012 00:28:42 +0100 Subject: [PATCH 029/110] Added some missing imports and @class lines --- Core/DOM classes/Core DOM/Document.h | 6 ++++++ XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index df40c3746..1d4d8b9c5 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -62,8 +62,14 @@ #import "Comment.h" @class CDATASection; #import "CDATASection.h" +@class DocumentFragment; +#import "DocumentFragment.h" +@class EntityReference; +#import "EntityReference.h" @class NodeList; #import "NodeList.h" +@class ProcessingInstruction; +#import "ProcessingInstruction.h" @interface Document : Node diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index aa04ebc24..01d555618 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -514,9 +514,9 @@ 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */, 66614306156C3B95000F3A27 /* NodeList.h */, + 66614307156C3B95000F3A27 /* NodeList.m */, 66614348156C544C000F3A27 /* NodeList+Mutable.h */, 66614349156C544E000F3A27 /* NodeList+Mutable.m */, - 66614307156C3B95000F3A27 /* NodeList.m */, 66614300156C3A0B000F3A27 /* Node.h */, 66614301156C3A0B000F3A27 /* Node.m */, 666142FA156C2F14000F3A27 /* Document.h */, From 8f9bd1bdaf71cb2c616af11264130b9a2bcdaad0 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 23 May 2012 00:50:39 +0100 Subject: [PATCH 030/110] ADDED: basic implementation of Document - but several methods are NSAssert( not implemented ) --- Core/DOM classes/Core DOM/Attr.h | 5 ++ Core/DOM classes/Core DOM/Attr.m | 42 +++++++++++++ Core/DOM classes/Core DOM/Document.h | 2 +- Core/DOM classes/Core DOM/Document.m | 92 ++++++++++++++++++++++++++++ Core/DOM classes/Core DOM/Node.h | 29 ++++----- 5 files changed, 155 insertions(+), 15 deletions(-) diff --git a/Core/DOM classes/Core DOM/Attr.h b/Core/DOM classes/Core DOM/Attr.h index b8aa1a65e..214103082 100644 --- a/Core/DOM classes/Core DOM/Attr.h +++ b/Core/DOM classes/Core DOM/Attr.h @@ -29,4 +29,9 @@ // Introduced in DOM Level 2: @property(nonatomic,retain,readonly) Element* ownerElement; +#pragma mark - ObjC methods + +- (id)initWithName:(NSString*) n; +- (id)initWithNamespace:(NSString*) ns qualifiedName:(NSString*) qn; + @end diff --git a/Core/DOM classes/Core DOM/Attr.m b/Core/DOM classes/Core DOM/Attr.m index 913b82670..fbffbed44 100644 --- a/Core/DOM classes/Core DOM/Attr.m +++ b/Core/DOM classes/Core DOM/Attr.m @@ -8,6 +8,48 @@ #import "Attr.h" +/* + @property(nonatomic,retain,readonly) NSString* name; + @property(nonatomic,readonly) BOOL specified; + @property(nonatomic,retain,readonly) NSString* value; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) Element* ownerElement; +*/ + @implementation Attr +@synthesize name; +@synthesize specified; +@synthesize value; + +// Introduced in DOM Level 2: +@synthesize ownerElement; + +- (id)initWithName:(NSString*) n { + self = [super init]; + if (self) { + self.nodeName = self.name = n; + } + return self; +} + +- (id)initWithNamespace:(NSString*) ns qualifiedName:(NSString*) qn { + self = [super init]; + if (self) { + self.nodeName = qn; + self.namespaceURI = ns; + self.name = qn; + + NSAssert( FALSE, @"Spec requires us to set two more properties using a process I don't understand: Node.prefix = prefix, extracted from qualifiedName, or null if there is no prefix. Node.localName = local name, extracted from qualifiedName" ); + } + return self; +} + +- (void)dealloc { + self.name = nil; + self.value = nil; + [super dealloc]; +} + @end diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index 1d4d8b9c5..be4ac8d76 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -54,7 +54,7 @@ #import -@class Node; +/** ObjectiveC won't allow this: @class Node; */ #import "Node.h" @class Element; #import "Element.h" diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index 2f2fc077c..3b7dc854e 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -1,5 +1,97 @@ #import "Document.h" +/* + @property(nonatomic,retain,readonly) DocumentType doctype; + @property(nonatomic,retain,readonly) DOMImplementation implementation; + @property(nonatomic,retain,readonly) Element documentElement; + +*/ + @implementation Document +@synthesize doctype; +@synthesize implementation; +@synthesize documentElement; + + +-(Element*) createElement:(NSString*) tagName +{ + NSAssert( FALSE, @"This is not implemented, but is required by the spec to: Creates an element of the type specified. In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element." ); +} + +-(DocumentFragment*) createDocumentFragment +{ + return [[[DocumentFragment alloc] initDocumentFragment:nil] autorelease]; +} + +-(Text*) createTextNode:(NSString*) data +{ + return [[[Text alloc] initText:nil value:data] autorelease]; +} + +-(Comment*) createComment:(NSString*) data +{ + return [[[Comment alloc] initComment:nil value:data] autorelease]; +} + +-(CDATASection*) createCDATASection:(NSString*) data +{ + return [[[CDATASection alloc] initCDATASection:nil value:data] autorelease]; +} + +-(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(NSString*) data +{ + return [[[ProcessingInstruction alloc] initProcessingInstruction:target value:data] autorelease]; +} + +-(Attr*) createAttribute:(NSString*) data +{ + return [[[Attr alloc] initAttr:data value:nil] autorelease]; +} + +-(EntityReference*) createEntityReference:(NSString*) data +{ + NSAssert( FALSE, @"Not implemented. According to spec: Creates an EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node. Note: If any descendant of the Entity node has an unbound namespace prefix, the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null). The DOM Level 2 does not support any mechanism to resolve namespace prefixes." ); +} + +-(NodeList*) getElementsByTagName:(NSString*) data +{ + NSAssert( FALSE, @"Not implemented. According to spec: Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree." ); +} + +// Introduced in DOM Level 2: +-(Node*) importNode:(Node*) importedNode deep:(BOOL) deep +{ + NSAssert( FALSE, @"Not implemented." ); +} + +// Introduced in DOM Level 2: +-(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName +{ + NSAssert( FALSE, @"This should be implemented to share code with createAttributeNS: method below" ); +} + +// Introduced in DOM Level 2: +-(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName +{ + NSAssert( FALSE, @"This should be re-implemented to share code with createElementNS: method above" ); + Attr* newAttr = [[[Attr alloc] initWithNamespace:namespaceURI qualifiedName:qualifiedName] autorelease]; + return newAttr; +} + +// Introduced in DOM Level 2: +-(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI qualifiedName:(NSString*) localName +{ + NSAssert( FALSE, @"Not implemented. According to spec: Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree." ); +} + +// Introduced in DOM Level 2: +-(Element*) getElementById:(NSString*) elementId +{ + /** + Hard-coding this to SVG, where only attributes tagged "id" are ID attributes + */ + NSAssert( FALSE, @"At this point, we have to recurse down the tree looking at the id's of each SVG element. This is already implemented in old SVGKit, need to copy/paste/debug the code" ); +} + @end diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h index 19479687a..3cb91e125 100644 --- a/Core/DOM classes/Core DOM/Node.h +++ b/Core/DOM classes/Core DOM/Node.h @@ -67,26 +67,27 @@ #import +@class Document; +#import "Document.h" @class NodeList; #import "NodeList.h" - @class NamedNodeMap; #import "NamedNodeMap.h" typedef enum SKNodeType { - SKNodeType_ELEMENT_NODE = 1; - SKNodeType_ATTRIBUTE_NODE = 2; - SKNodeType_TEXT_NODE = 3; - SKNodeType_CDATA_SECTION_NODE = 4; - SKNodeType_ENTITY_REFERENCE_NODE = 5; - SKNodeType_ENTITY_NODE = 6; - SKNodeType_PROCESSING_INSTRUCTION_NODE = 7; - SKNodeType_COMMENT_NODE = 8; - SKNodeType_DOCUMENT_NODE = 9; - SKNodeType_DOCUMENT_TYPE_NODE = 10; - SKNodeType_DOCUMENT_FRAGMENT_NODE = 11; - SKNodeType_NOTATION_NODE = 12; + SKNodeType_ELEMENT_NODE = 1, + SKNodeType_ATTRIBUTE_NODE = 2, + SKNodeType_TEXT_NODE = 3, + SKNodeType_CDATA_SECTION_NODE = 4, + SKNodeType_ENTITY_REFERENCE_NODE = 5, + SKNodeType_ENTITY_NODE = 6, + SKNodeType_PROCESSING_INSTRUCTION_NODE = 7, + SKNodeType_COMMENT_NODE = 8, + SKNodeType_DOCUMENT_NODE = 9, + SKNodeType_DOCUMENT_TYPE_NODE = 10, + SKNodeType_DOCUMENT_FRAGMENT_NODE = 11, + SKNodeType_NOTATION_NODE = 12 } SKNodeType; @interface Node : NSObject @@ -94,7 +95,7 @@ typedef enum SKNodeType @property(nonatomic,retain,readonly) NSString* nodeName; @property(nonatomic,retain,readonly) NSString* nodeValue; -@property(nonatomic,retain,readonly) SKNodeType nodeType; +@property(nonatomic,readonly) SKNodeType nodeType; @property(nonatomic,retain,readonly) Node* parentNode; @property(nonatomic,retain,readonly) NodeList* childNodes; @property(nonatomic,retain,readonly) Node* firstChild; From ce1afc00ace96f5efce349c96062a5027fe639a5 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 23 May 2012 00:58:08 +0100 Subject: [PATCH 031/110] ADDED: missing set of Node.parentNode (because the official spec 'forgets' to mention this!) --- Core/DOM classes/Core DOM/Node.m | 12 ++++++++ .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 30 +++++++++---------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index f03e33d80..bbbbd6ff2 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -184,6 +184,7 @@ -(Node*) insertBefore:(Node*) newChild refChild:(Node*) refChild if( refChild == nil ) { [self.childNodes.internalArray addObject:newChild]; + newChild.parentNode = self; } else { @@ -209,12 +210,18 @@ -(Node*) replaceChild:(Node*) newChild oldChild:(Node*) oldChild [self.childNodes.internalArray insertObject:child atIndex:oldIndex++]; } + newChild.parentNode = self; + oldChild.parentNode = nil; + return oldChild; } else { [self.childNodes.internalArray replaceObjectAtIndex:[self.childNodes.internalArray indexOfObject:oldChild] withObject:newChild]; + newChild.parentNode = self; + oldChild.parentNode = nil; + return oldChild; } } @@ -222,6 +229,8 @@ -(Node*) removeChild:(Node*) oldChild { [self.childNodes.internalArray removeObject:oldChild]; + oldChild.parentNode = nil; + return oldChild; } @@ -229,6 +238,9 @@ -(Node*) appendChild:(Node*) newChild { [self.childNodes.internalArray removeObject:newChild]; // required by spec [self.childNodes.internalArray addObject:newChild]; + + newChild.parentNode = self; + return newChild; } diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 01d555618..b7660888d 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -482,9 +482,9 @@ 66614294156C2E69000F3A27 /* SVGRectElement.m */, 66614295156C2E69000F3A27 /* SVGShapeElement.h */, 66614296156C2E69000F3A27 /* SVGShapeElement.m */, - 66614297156C2E69000F3A27 /* SVGSVGElement.h */, 666142F3156C2E87000F3A27 /* SVGDocument.h */, 666142F4156C2E87000F3A27 /* SVGDocument.m */, + 66614297156C2E69000F3A27 /* SVGSVGElement.h */, 66614298156C2E69000F3A27 /* SVGSVGElement.m */, 66614299156C2E69000F3A27 /* SVGTextElement.h */, 6661429A156C2E69000F3A27 /* SVGTextElement.m */, @@ -511,34 +511,34 @@ 666142F9156C2F0C000F3A27 /* Core DOM */ = { isa = PBXGroup; children = ( + 6661432A156C44BB000F3A27 /* Attr.h */, + 6661432B156C44BC000F3A27 /* Attr.m */, + 6661433C156C46DD000F3A27 /* CDATASection.h */, + 6661433D156C46DE000F3A27 /* CDATASection.m */, + 66614324156C43DF000F3A27 /* CharacterData.h */, + 66614325156C43E0000F3A27 /* CharacterData.m */, + 6661431E156C43B9000F3A27 /* Comment.h */, + 6661431F156C43BA000F3A27 /* Comment.m */, + 66614330156C45EF000F3A27 /* DocumentFragment.h */, + 66614331156C45F1000F3A27 /* DocumentFragment.m */, + 66614342156C4722000F3A27 /* EntityReference.h */, + 66614343156C4724000F3A27 /* EntityReference.m */, 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */, + 66614300156C3A0B000F3A27 /* Node.h */, + 66614301156C3A0B000F3A27 /* Node.m */, 66614306156C3B95000F3A27 /* NodeList.h */, 66614307156C3B95000F3A27 /* NodeList.m */, 66614348156C544C000F3A27 /* NodeList+Mutable.h */, 66614349156C544E000F3A27 /* NodeList+Mutable.m */, - 66614300156C3A0B000F3A27 /* Node.h */, - 66614301156C3A0B000F3A27 /* Node.m */, 666142FA156C2F14000F3A27 /* Document.h */, 666142FB156C2F14000F3A27 /* Document.m */, 66614312156C3F60000F3A27 /* Element.h */, 66614313156C3F61000F3A27 /* Element.m */, 66614318156C436E000F3A27 /* ProcessingInstruction.h */, 66614319156C436F000F3A27 /* ProcessingInstruction.m */, - 6661431E156C43B9000F3A27 /* Comment.h */, - 6661431F156C43BA000F3A27 /* Comment.m */, - 66614324156C43DF000F3A27 /* CharacterData.h */, - 66614325156C43E0000F3A27 /* CharacterData.m */, - 6661432A156C44BB000F3A27 /* Attr.h */, - 6661432B156C44BC000F3A27 /* Attr.m */, - 66614330156C45EF000F3A27 /* DocumentFragment.h */, - 66614331156C45F1000F3A27 /* DocumentFragment.m */, 66614336156C463B000F3A27 /* Text.h */, 66614337156C463C000F3A27 /* Text.m */, - 6661433C156C46DD000F3A27 /* CDATASection.h */, - 6661433D156C46DE000F3A27 /* CDATASection.m */, - 66614342156C4722000F3A27 /* EntityReference.h */, - 66614343156C4724000F3A27 /* EntityReference.m */, ); path = "Core DOM"; sourceTree = ""; From 73e3449ecfa78107a49b479998294dcf9b86fc70 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 23 May 2012 01:11:47 +0100 Subject: [PATCH 032/110] FIXED: most of the build errors from the new DOM code --- Core/DOM classes/Core DOM/Attr.h | 2 +- Core/DOM classes/Core DOM/Attr.m | 14 +++--- Core/DOM classes/Core DOM/CharacterData.h | 2 +- Core/DOM classes/Core DOM/Comment.h | 2 + Core/DOM classes/Core DOM/DocumentFragment.h | 2 +- Core/DOM classes/Core DOM/DocumentType.h | 39 +++++++++++++++++ Core/DOM classes/Core DOM/DocumentType.m | 43 +++++++++++++++++++ Core/DOM classes/Core DOM/Element.h | 2 +- Core/DOM classes/Core DOM/EntityReference.h | 2 +- Core/DOM classes/Core DOM/NamedNodeMap.m | 12 ++---- Core/DOM classes/Core DOM/Node+Mutable.h | 33 ++++++++++++++ Core/DOM classes/Core DOM/Node.h | 6 +-- Core/DOM classes/Core DOM/Node.m | 30 +------------ Core/DOM classes/Core DOM/NodeList+Mutable.h | 6 ++- Core/DOM classes/Core DOM/NodeList+Mutable.m | 13 ------ .../Core DOM/ProcessingInstruction.h | 2 +- Core/DOM classes/SVGPolygonElement.m | 6 +-- Core/SKBasicDataTypes.m | 2 +- Core/SKSvgSource.m | 2 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 32 +++++++++++--- 20 files changed, 175 insertions(+), 77 deletions(-) create mode 100644 Core/DOM classes/Core DOM/DocumentType.h create mode 100644 Core/DOM classes/Core DOM/DocumentType.m create mode 100644 Core/DOM classes/Core DOM/Node+Mutable.h delete mode 100644 Core/DOM classes/Core DOM/NodeList+Mutable.m diff --git a/Core/DOM classes/Core DOM/Attr.h b/Core/DOM classes/Core DOM/Attr.h index 214103082..d748d339b 100644 --- a/Core/DOM classes/Core DOM/Attr.h +++ b/Core/DOM classes/Core DOM/Attr.h @@ -15,7 +15,7 @@ */ #import -@class Node; +/** objc won't allow this: @class Node;*/ #import "Node.h" @class Element; #import "Element.h" diff --git a/Core/DOM classes/Core DOM/Attr.m b/Core/DOM classes/Core DOM/Attr.m index fbffbed44..49be35fa2 100644 --- a/Core/DOM classes/Core DOM/Attr.m +++ b/Core/DOM classes/Core DOM/Attr.m @@ -8,14 +8,16 @@ #import "Attr.h" -/* - @property(nonatomic,retain,readonly) NSString* name; - @property(nonatomic,readonly) BOOL specified; - @property(nonatomic,retain,readonly) NSString* value; +#import "Node+Mutable.h" + +@interface Attr() + @property(nonatomic,retain,readwrite) NSString* name; + @property(nonatomic,readwrite) BOOL specified; + @property(nonatomic,retain,readwrite) NSString* value; // Introduced in DOM Level 2: - @property(nonatomic,retain,readonly) Element* ownerElement; -*/ + @property(nonatomic,retain,readwrite) Element* ownerElement; +@end @implementation Attr diff --git a/Core/DOM classes/Core DOM/CharacterData.h b/Core/DOM classes/Core DOM/CharacterData.h index 41f0a9e52..bc8c4a30e 100644 --- a/Core/DOM classes/Core DOM/CharacterData.h +++ b/Core/DOM classes/Core DOM/CharacterData.h @@ -30,7 +30,7 @@ #import -@class Node; +/** objc won't allow this: @class Node;*/ #import "Node.h" @interface CharacterData : Node diff --git a/Core/DOM classes/Core DOM/Comment.h b/Core/DOM classes/Core DOM/Comment.h index 73a6ec8bd..e48c0d3db 100644 --- a/Core/DOM classes/Core DOM/Comment.h +++ b/Core/DOM classes/Core DOM/Comment.h @@ -9,6 +9,8 @@ #import +#import "CharacterData.h" + @interface Comment : CharacterData @end diff --git a/Core/DOM classes/Core DOM/DocumentFragment.h b/Core/DOM classes/Core DOM/DocumentFragment.h index 27f22831b..c6bd6fcd0 100644 --- a/Core/DOM classes/Core DOM/DocumentFragment.h +++ b/Core/DOM classes/Core DOM/DocumentFragment.h @@ -9,7 +9,7 @@ #import -@class Node; +/** objc won't allow this: @class Node;*/ #import "Node.h" @interface DocumentFragment : Node diff --git a/Core/DOM classes/Core DOM/DocumentType.h b/Core/DOM classes/Core DOM/DocumentType.h new file mode 100644 index 000000000..0ebd9c633 --- /dev/null +++ b/Core/DOM classes/Core DOM/DocumentType.h @@ -0,0 +1,39 @@ +/* + From SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-412266927 + + interface DocumentType : Node { + readonly attribute DOMString name; + readonly attribute NamedNodeMap entities; + readonly attribute NamedNodeMap notations; + // Introduced in DOM Level 2: + readonly attribute DOMString publicId; + // Introduced in DOM Level 2: + readonly attribute DOMString systemId; + // Introduced in DOM Level 2: + readonly attribute DOMString internalSubset; + }; +*/ +#import + +#import "Node.h" +#import "NamedNodeMap.h" + +@interface DocumentType : Node + +@property(nonatomic,retain,readonly) NSString* name; +@property(nonatomic,retain,readonly) NamedNodeMap* entities; +@property(nonatomic,retain,readonly) NamedNodeMap* notations; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) NSString* publicId; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) NSString* systemId; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readonly) NSString* internalSubset; + + +@end diff --git a/Core/DOM classes/Core DOM/DocumentType.m b/Core/DOM classes/Core DOM/DocumentType.m new file mode 100644 index 000000000..67d994475 --- /dev/null +++ b/Core/DOM classes/Core DOM/DocumentType.m @@ -0,0 +1,43 @@ +// +// DocumentType.m +// SVGKit +// +// Created by adam on 23/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "DocumentType.h" + +/* + in case we need to redeclare them readwrite: + @property(nonatomic,retain,readonly) NSString* name; + @property(nonatomic,retain,readonly) NamedNodeMap* entities; + @property(nonatomic,retain,readonly) NamedNodeMap* notations; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) NSString* publicId; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) NSString* systemId; + + // Introduced in DOM Level 2: + @property(nonatomic,retain,readonly) NSString* internalSubset; + + */ + +@implementation DocumentType + +@synthesize name; +@synthesize entities; +@synthesize notations; + +// Introduced in DOM Level 2: +@synthesize publicId; + +// Introduced in DOM Level 2: +@synthesize systemId; + +// Introduced in DOM Level 2: +@synthesize internalSubset; + +@end diff --git a/Core/DOM classes/Core DOM/Element.h b/Core/DOM classes/Core DOM/Element.h index 580aa2559..3d25cd42e 100644 --- a/Core/DOM classes/Core DOM/Element.h +++ b/Core/DOM classes/Core DOM/Element.h @@ -48,7 +48,7 @@ #import -@class Node; +/** objc won't allow this: @class Node;*/ #import "Node.h" @class Attr; #import "Attr.h" diff --git a/Core/DOM classes/Core DOM/EntityReference.h b/Core/DOM classes/Core DOM/EntityReference.h index a5f668499..bd8a6baad 100644 --- a/Core/DOM classes/Core DOM/EntityReference.h +++ b/Core/DOM classes/Core DOM/EntityReference.h @@ -8,7 +8,7 @@ */ #import -@class Node; +/** objc won't allow this: @class Node; */ #import "Node.h" @interface EntityReference : Node diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.m b/Core/DOM classes/Core DOM/NamedNodeMap.m index e245d5c5f..26a739d38 100644 --- a/Core/DOM classes/Core DOM/NamedNodeMap.m +++ b/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -16,6 +16,7 @@ @interface NamedNodeMap() @implementation NamedNodeMap @synthesize internalDictionary; +@synthesize internalDictionaryOfNamespaces; - (id)init { self = [super init]; @@ -74,7 +75,7 @@ -(Node*) item:(unsigned long) index return [self.internalDictionary.allValues objectAtIndex:index]; else { - index -= [self.internalDictionary.count]; + index -= self.internalDictionary.count; for( NSDictionary* namespaceDict in self.internalDictionaryOfNamespaces ) { @@ -88,15 +89,10 @@ -(Node*) item:(unsigned long) index return nil; } --(unsigned long)length -{ - return [self.internalDictionary count]; -} - // Introduced in DOM Level 2: -(Node*) getNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName { - NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:arg.namespaceURI]; + NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:namespaceURI]; return [namespaceDict objectForKey:localName]; } @@ -120,7 +116,7 @@ -(Node*) setNamedItemNS:(Node*) arg // Introduced in DOM Level 2: -(Node*) removeNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName { - NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:arg.namespaceURI]; + NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:namespaceURI]; Node* oldNode = [namespaceDict objectForKey:localName]; [namespaceDict removeObjectForKey:localName]; diff --git a/Core/DOM classes/Core DOM/Node+Mutable.h b/Core/DOM classes/Core DOM/Node+Mutable.h new file mode 100644 index 000000000..19f7eafd5 --- /dev/null +++ b/Core/DOM classes/Core DOM/Node+Mutable.h @@ -0,0 +1,33 @@ +/** + Makes the writable properties all package-private, effectively + */ +#import "Node.h" + +@interface Node() +@property(nonatomic,retain,readwrite) NSString* nodeName; +@property(nonatomic,retain,readwrite) NSString* nodeValue; + +@property(nonatomic,retain,readwrite) SKNodeType nodeType; +@property(nonatomic,retain,readwrite) Node* parentNode; +@property(nonatomic,retain,readwrite) NodeList* childNodes; +@property(nonatomic,retain,readwrite) Node* firstChild; +@property(nonatomic,retain,readwrite) Node* lastChild; +@property(nonatomic,retain,readwrite) Node* previousSibling; +@property(nonatomic,retain,readwrite) Node* nextSibling; +@property(nonatomic,retain,readwrite) NamedNodeMap* attributes; + +@property(nonatomic,retain,readwrite) Document* ownerDocument; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readwrite) NSString* namespaceURI; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readwrite) NSString* prefix; + +// Introduced in DOM Level 2: +@property(nonatomic,retain,readwrite) NSString* localName; + +// Introduced in DOM Level 2: +@property(nonatomic) BOOL hasAttributes; + +@end diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h index 3cb91e125..73275ff40 100644 --- a/Core/DOM classes/Core DOM/Node.h +++ b/Core/DOM classes/Core DOM/Node.h @@ -68,11 +68,11 @@ #import @class Document; -#import "Document.h" +/** objc won't allow this: #import "Document.h"*/ @class NodeList; -#import "NodeList.h" +/** objc won't allow this: #import "NodeList.h"*/ @class NamedNodeMap; -#import "NamedNodeMap.h" +/** objc won't allow this: #import "NamedNodeMap.h"*/ typedef enum SKNodeType { diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index bbbbd6ff2..7881f5136 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -7,38 +7,10 @@ // #import "Node.h" +#import "Node+Mutable.h" #import "NodeList+Mutable.h" -@interface Node() -@property(nonatomic,retain,readonly) NSString* nodeName; -@property(nonatomic,retain,readonly) NSString* nodeValue; - -@property(nonatomic,retain,readonly) SKNodeType nodeType; -@property(nonatomic,retain,readonly) Node* parentNode; -@property(nonatomic,retain,readonly) NodeList* childNodes; -@property(nonatomic,retain,readonly) Node* firstChild; -@property(nonatomic,retain,readonly) Node* lastChild; -@property(nonatomic,retain,readonly) Node* previousSibling; -@property(nonatomic,retain,readonly) Node* nextSibling; -@property(nonatomic,retain,readonly) NamedNodeMap* attributes; - - @property(nonatomic,retain,readonly) Document* ownerDocument; - - // Introduced in DOM Level 2: - @property(nonatomic,retain,readonly) NSString* namespaceURI; - - // Introduced in DOM Level 2: - @property(nonatomic,retain,readonly) NSString* prefix; - - // Introduced in DOM Level 2: - @property(nonatomic,retain,readonly) NSString* localName; - - // Introduced in DOM Level 2: - @property(nonatomic) BOOL hasAttributes; - -@end - @implementation Node @synthesize nodeName; diff --git a/Core/DOM classes/Core DOM/NodeList+Mutable.h b/Core/DOM classes/Core DOM/NodeList+Mutable.h index b19144b5d..fba819742 100644 --- a/Core/DOM classes/Core DOM/NodeList+Mutable.h +++ b/Core/DOM classes/Core DOM/NodeList+Mutable.h @@ -1,6 +1,10 @@ +/** + Makes the writable properties all package-private, effectively + */ + #import "NodeList.h" -@interface NodeList (Mutable) +@interface NodeList() @property(nonatomic,retain) NSMutableArray* internalArray; diff --git a/Core/DOM classes/Core DOM/NodeList+Mutable.m b/Core/DOM classes/Core DOM/NodeList+Mutable.m deleted file mode 100644 index 07aeeba8a..000000000 --- a/Core/DOM classes/Core DOM/NodeList+Mutable.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// NodeList+Mutable.m -// SVGKit -// -// Created by adam on 23/05/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#import "NodeList+Mutable.h" - -@implementation NodeList (Mutable) - -@end diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.h b/Core/DOM classes/Core DOM/ProcessingInstruction.h index 8f53092b6..591d6f21e 100644 --- a/Core/DOM classes/Core DOM/ProcessingInstruction.h +++ b/Core/DOM classes/Core DOM/ProcessingInstruction.h @@ -13,7 +13,7 @@ #import -@class Node; +/** objc won't allow this: @class Node;*/ #import "Node.h" @interface ProcessingInstruction : Node diff --git a/Core/DOM classes/SVGPolygonElement.m b/Core/DOM classes/SVGPolygonElement.m index 502ea512d..584c527f0 100644 --- a/Core/DOM classes/SVGPolygonElement.m +++ b/Core/DOM classes/SVGPolygonElement.m @@ -7,7 +7,7 @@ #import "SVGPolygonElement.h" -#import "SVGPointsAndPathsParser.h" +#import "SKPointsAndPathsParser.h" @interface SVGPolygonElement() @@ -49,13 +49,13 @@ - (void)parseData:(NSString *)data NSScanner* commandScanner = [NSScanner scannerWithString:commandWithParameters]; - lastCoordinate = [SVGPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner + lastCoordinate = [SKPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner path:path relativeTo:CGPointZero isRelative:FALSE]; - lastCoordinate = [SVGPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:@"z"] + lastCoordinate = [SKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:@"z"] path:path relativeTo:lastCoordinate]; diff --git a/Core/SKBasicDataTypes.m b/Core/SKBasicDataTypes.m index 95279c110..6cc94becf 100644 --- a/Core/SKBasicDataTypes.m +++ b/Core/SKBasicDataTypes.m @@ -6,7 +6,7 @@ // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // -#import "SVGBasicDataTypes.h" +#import "SKBasicDataTypes.h" const SVGLength SVGLengthZero = { 0.0, SVGLengthTypeUnknown }; diff --git a/Core/SKSvgSource.m b/Core/SKSvgSource.m index decc928af..265fd7082 100644 --- a/Core/SKSvgSource.m +++ b/Core/SKSvgSource.m @@ -9,7 +9,7 @@ @implementation SKSvgSource +(SKSvgSource*) sourceFromFilename:(NSString*) p { - SVGSource* d = [[[SKSvgSource alloc] init] autorelease]; + SKSvgSource* d = [[[SKSvgSource alloc] init] autorelease]; d.hasSourceFile = TRUE; d.filePath = p; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index b7660888d..b2cc5974b 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -167,8 +167,12 @@ 66614347156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; - 6661434C156C5452000F3A27 /* NodeList+Mutable.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614349156C544E000F3A27 /* NodeList+Mutable.m */; }; - 6661434D156C5452000F3A27 /* NodeList+Mutable.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614349156C544E000F3A27 /* NodeList+Mutable.m */; }; + 66614351156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; }; + 66614352156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; }; + 66614353156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; + 66614354156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; + 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; + 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; @@ -290,7 +294,9 @@ 66614342156C4722000F3A27 /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; 66614343156C4724000F3A27 /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; 66614348156C544C000F3A27 /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; - 66614349156C544E000F3A27 /* NodeList+Mutable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NodeList+Mutable.m"; sourceTree = ""; }; + 6661434F156C619A000F3A27 /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; + 66614350156C619D000F3A27 /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; + 66614355156C625E000F3A27 /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGImage+SVGPathView.h"; path = "../../Core/SVGImage+SVGPathView.h"; sourceTree = ""; }; 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGImage+SVGPathView.m"; path = "../../Core/SVGImage+SVGPathView.m"; sourceTree = ""; }; 6684CD491566D07400A46247 /* SKSvgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgView.h; sourceTree = ""; }; @@ -456,6 +462,7 @@ isa = PBXGroup; children = ( 666142F9156C2F0C000F3A27 /* Core DOM */, + 6661434E156C5FE5000F3A27 /* SVG-DOM */, 6661427D156C2E69000F3A27 /* SVGCircleElement.h */, 6661427E156C2E69000F3A27 /* SVGCircleElement.m */, 6661427F156C2E69000F3A27 /* SVGDefsElement.h */, @@ -521,16 +528,18 @@ 6661431F156C43BA000F3A27 /* Comment.m */, 66614330156C45EF000F3A27 /* DocumentFragment.h */, 66614331156C45F1000F3A27 /* DocumentFragment.m */, + 6661434F156C619A000F3A27 /* DocumentType.h */, + 66614350156C619D000F3A27 /* DocumentType.m */, 66614342156C4722000F3A27 /* EntityReference.h */, 66614343156C4724000F3A27 /* EntityReference.m */, 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */, 66614300156C3A0B000F3A27 /* Node.h */, 66614301156C3A0B000F3A27 /* Node.m */, + 66614355156C625E000F3A27 /* Node+Mutable.h */, 66614306156C3B95000F3A27 /* NodeList.h */, 66614307156C3B95000F3A27 /* NodeList.m */, 66614348156C544C000F3A27 /* NodeList+Mutable.h */, - 66614349156C544E000F3A27 /* NodeList+Mutable.m */, 666142FA156C2F14000F3A27 /* Document.h */, 666142FB156C2F14000F3A27 /* Document.m */, 66614312156C3F60000F3A27 /* Element.h */, @@ -543,6 +552,13 @@ path = "Core DOM"; sourceTree = ""; }; + 6661434E156C5FE5000F3A27 /* SVG-DOM */ = { + isa = PBXGroup; + children = ( + ); + path = "SVG-DOM"; + sourceTree = ""; + }; C952623F12711D8600434805 /* Framework */ = { isa = PBXGroup; children = ( @@ -649,6 +665,8 @@ 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */, 66614345156C4726000F3A27 /* EntityReference.h in Headers */, 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */, + 66614352156C619F000F3A27 /* DocumentType.h in Headers */, + 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -704,6 +722,8 @@ 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */, 66614344156C4726000F3A27 /* EntityReference.h in Headers */, 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */, + 66614351156C619F000F3A27 /* DocumentType.h in Headers */, + 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -854,7 +874,7 @@ 6661433B156C463D000F3A27 /* Text.m in Sources */, 66614341156C46DF000F3A27 /* CDATASection.m in Sources */, 66614347156C4726000F3A27 /* EntityReference.m in Sources */, - 6661434D156C5452000F3A27 /* NodeList+Mutable.m in Sources */, + 66614354156C619F000F3A27 /* DocumentType.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -907,7 +927,7 @@ 6661433A156C463D000F3A27 /* Text.m in Sources */, 66614340156C46DF000F3A27 /* CDATASection.m in Sources */, 66614346156C4726000F3A27 /* EntityReference.m in Sources */, - 6661434C156C5452000F3A27 /* NodeList+Mutable.m in Sources */, + 66614353156C619F000F3A27 /* DocumentType.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 0e0b19d33377774f04bf2db633e7f12aa102bdbb Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 23 May 2012 01:23:34 +0100 Subject: [PATCH 033/110] ADDED: more build errors fixed --- Core/DOM classes/Core DOM/DOMImplementation.h | 36 +++++++++++++++++++ Core/DOM classes/Core DOM/DOMImplementation.m | 13 +++++++ Core/DOM classes/Core DOM/Document.h | 6 ++-- Core/DOM classes/Core DOM/Node+Mutable.h | 5 +-- Core/DOM classes/Core DOM/Node.m | 2 ++ .../Core DOM/ProcessingInstruction.m | 8 +++++ Core/DOM classes/SVGDocument.h | 4 ++- Core/DOM classes/SVGDocument.m | 4 +-- Core/DOM classes/SVGPathElement.m | 2 +- Core/DOM classes/SVGSVGElement.h | 2 +- Core/SKParser.m | 2 +- Core/SKSvgImage.h | 4 +-- Core/SKSvgImage.m | 4 +-- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 12 +++++++ iOS/SVGPathView.h | 4 +-- 15 files changed, 90 insertions(+), 18 deletions(-) create mode 100644 Core/DOM classes/Core DOM/DOMImplementation.h create mode 100644 Core/DOM classes/Core DOM/DOMImplementation.m diff --git a/Core/DOM classes/Core DOM/DOMImplementation.h b/Core/DOM classes/Core DOM/DOMImplementation.h new file mode 100644 index 000000000..e88beaac0 --- /dev/null +++ b/Core/DOM classes/Core DOM/DOMImplementation.h @@ -0,0 +1,36 @@ +/* + SVG-DOM, via Core DOM: + + http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 + + interface DOMImplementation { + boolean hasFeature(in DOMString feature, + in DOMString version); + // Introduced in DOM Level 2: + DocumentType createDocumentType(in DOMString qualifiedName, + in DOMString publicId, + in DOMString systemId) + raises(DOMException); + // Introduced in DOM Level 2: + Document createDocument(in DOMString namespaceURI, + in DOMString qualifiedName, + in DocumentType doctype) + raises(DOMException); + }; +*/ + +#import + +#import "DocumentType.h" + +@interface DOMImplementation : NSObject + +-(BOOL) hasFeature:(NSString*) feature version:(NSString*) version; + +// Introduced in DOM Level 2: +-(DocumentType*) createDocumentType:(NSString*) qualifiedName publicId:(NSString*) publicId systemId:(NSString*) systemId; + +// Introduced in DOM Level 2: +-(Document*) createDocument:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName doctype:(DocumentType*) doctype; + +@end diff --git a/Core/DOM classes/Core DOM/DOMImplementation.m b/Core/DOM classes/Core DOM/DOMImplementation.m new file mode 100644 index 000000000..2e7d4b9f9 --- /dev/null +++ b/Core/DOM classes/Core DOM/DOMImplementation.m @@ -0,0 +1,13 @@ +// +// DOMImplementation.m +// SVGKit +// +// Created by adam on 23/05/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "DOMImplementation.h" + +@implementation DOMImplementation + +@end diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index be4ac8d76..cb2be9210 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -70,12 +70,14 @@ #import "NodeList.h" @class ProcessingInstruction; #import "ProcessingInstruction.h" +@class DocumentType; +#import "DocumentType.h" @interface Document : Node -@property(nonatomic,retain,readonly) DocumentType doctype; +@property(nonatomic,retain,readonly) DocumentType* doctype; @property(nonatomic,retain,readonly) DOMImplementation implementation; -@property(nonatomic,retain,readonly) Element documentElement; +@property(nonatomic,retain,readonly) Element* documentElement; -(Element*) createElement:(NSString*) tagName; diff --git a/Core/DOM classes/Core DOM/Node+Mutable.h b/Core/DOM classes/Core DOM/Node+Mutable.h index 19f7eafd5..ad8f49e1f 100644 --- a/Core/DOM classes/Core DOM/Node+Mutable.h +++ b/Core/DOM classes/Core DOM/Node+Mutable.h @@ -7,7 +7,7 @@ @property(nonatomic,retain,readwrite) NSString* nodeName; @property(nonatomic,retain,readwrite) NSString* nodeValue; -@property(nonatomic,retain,readwrite) SKNodeType nodeType; +@property(nonatomic,readwrite) SKNodeType nodeType; @property(nonatomic,retain,readwrite) Node* parentNode; @property(nonatomic,retain,readwrite) NodeList* childNodes; @property(nonatomic,retain,readwrite) Node* firstChild; @@ -27,7 +27,4 @@ // Introduced in DOM Level 2: @property(nonatomic,retain,readwrite) NSString* localName; -// Introduced in DOM Level 2: -@property(nonatomic) BOOL hasAttributes; - @end diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index 7881f5136..c79f99fd1 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -162,6 +162,8 @@ -(Node*) insertBefore:(Node*) newChild refChild:(Node*) refChild { [self.childNodes.internalArray insertObject:newChild atIndex:[self.childNodes.internalArray indexOfObject:refChild]]; } + + return newChild; } -(Node*) replaceChild:(Node*) newChild oldChild:(Node*) oldChild diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.m b/Core/DOM classes/Core DOM/ProcessingInstruction.m index e129d801a..027b90c3d 100644 --- a/Core/DOM classes/Core DOM/ProcessingInstruction.m +++ b/Core/DOM classes/Core DOM/ProcessingInstruction.m @@ -8,6 +8,14 @@ #import "ProcessingInstruction.h" +@interface ProcessingInstruction() +@property(nonatomic,retain,readwrite) NSString* target; +@property(nonatomic,retain,readwrite) NSString* data; +@end + @implementation ProcessingInstruction +@synthesize target; +@synthesize data; + @end diff --git a/Core/DOM classes/SVGDocument.h b/Core/DOM classes/SVGDocument.h index b34187f9b..bd4c58f88 100644 --- a/Core/DOM classes/SVGDocument.h +++ b/Core/DOM classes/SVGDocument.h @@ -8,6 +8,8 @@ #import -@interface SVGDocument : NSObject +#import "Document.h" + +@interface SVGDocument : Document @end diff --git a/Core/DOM classes/SVGDocument.m b/Core/DOM classes/SVGDocument.m index 87cc18a5e..c22559d0d 100644 --- a/Core/DOM classes/SVGDocument.m +++ b/Core/DOM classes/SVGDocument.m @@ -8,9 +8,9 @@ #import "SVGDocument.h" -#import "SVGBasicDataTypes.h" +#import "SKBasicDataTypes.h" -@implementation SVGDocument : Document +@implementation SVGDocument @property (nonatomic, retain, readonly) NSString* title; diff --git a/Core/DOM classes/SVGPathElement.m b/Core/DOM classes/SVGPathElement.m index a107a57c6..e970a4bfc 100644 --- a/Core/DOM classes/SVGPathElement.m +++ b/Core/DOM classes/SVGPathElement.m @@ -8,7 +8,7 @@ #import "SVGPathElement.h" #import "SVGUtils.h" -#import "SVGPointsAndPathsParser.h" +#import "SKSvgPointsAndPathsParser.h" @interface SVGPathElement () diff --git a/Core/DOM classes/SVGSVGElement.h b/Core/DOM classes/SVGSVGElement.h index de3931e35..51acdfc58 100644 --- a/Core/DOM classes/SVGSVGElement.h +++ b/Core/DOM classes/SVGSVGElement.h @@ -14,7 +14,7 @@ #import "SVGElement.h" -#import "SVGBasicDataTypes.h" +#import "SKBasicDataTypes.h" @interface SVGSVGElement : SVGElement < SVGLayeredElement > diff --git a/Core/SKParser.m b/Core/SKParser.m index 5450bf957..f58309a07 100644 --- a/Core/SKParser.m +++ b/Core/SKParser.m @@ -5,7 +5,7 @@ // Copyright Matt Rajca 2010-2011. All rights reserved. // -#import "SVGParser.h" +#import "SKParser.h" #import #import "SVGParserSVG.h" diff --git a/Core/SKSvgImage.h b/Core/SKSvgImage.h index c246e24d7..d70838834 100644 --- a/Core/SKSvgImage.h +++ b/Core/SKSvgImage.h @@ -23,12 +23,12 @@ */ -#import "SVGBasicDataTypes.h" +#import "SKBasicDataTypes.h" #import "SVGElement.h" #import "SVGSVGElement.h" #import "SVGGroupElement.h" -#import "SVGParser.h" +#import "SKParser.h" #import "SVGSource.h" @class SVGDefsElement; diff --git a/Core/SKSvgImage.m b/Core/SKSvgImage.m index 2dd6affc1..61a9d1555 100644 --- a/Core/SKSvgImage.m +++ b/Core/SKSvgImage.m @@ -1,4 +1,4 @@ -#import "SVGImage.h" +#import "SKSvgImage.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" @@ -8,7 +8,7 @@ #import "SVGParserSVG.h" -@interface SVGImage () +@interface SKSvgImage () /*! Only preserved for temporary backwards compatibility */ - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index b2cc5974b..6d533f006 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -173,6 +173,10 @@ 66614354156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; + 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; }; + 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; }; + 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; + 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; @@ -297,6 +301,8 @@ 6661434F156C619A000F3A27 /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; 66614350156C619D000F3A27 /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; 66614355156C625E000F3A27 /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; + 6661435B156C645A000F3A27 /* DOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementation.h; sourceTree = ""; }; + 6661435C156C645C000F3A27 /* DOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMImplementation.m; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGImage+SVGPathView.h"; path = "../../Core/SVGImage+SVGPathView.h"; sourceTree = ""; }; 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGImage+SVGPathView.m"; path = "../../Core/SVGImage+SVGPathView.m"; sourceTree = ""; }; 6684CD491566D07400A46247 /* SKSvgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgView.h; sourceTree = ""; }; @@ -530,6 +536,8 @@ 66614331156C45F1000F3A27 /* DocumentFragment.m */, 6661434F156C619A000F3A27 /* DocumentType.h */, 66614350156C619D000F3A27 /* DocumentType.m */, + 6661435B156C645A000F3A27 /* DOMImplementation.h */, + 6661435C156C645C000F3A27 /* DOMImplementation.m */, 66614342156C4722000F3A27 /* EntityReference.h */, 66614343156C4724000F3A27 /* EntityReference.m */, 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, @@ -667,6 +675,7 @@ 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */, 66614352156C619F000F3A27 /* DocumentType.h in Headers */, 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */, + 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -724,6 +733,7 @@ 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */, 66614351156C619F000F3A27 /* DocumentType.h in Headers */, 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */, + 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -875,6 +885,7 @@ 66614341156C46DF000F3A27 /* CDATASection.m in Sources */, 66614347156C4726000F3A27 /* EntityReference.m in Sources */, 66614354156C619F000F3A27 /* DocumentType.m in Sources */, + 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -928,6 +939,7 @@ 66614340156C46DF000F3A27 /* CDATASection.m in Sources */, 66614346156C4726000F3A27 /* EntityReference.m in Sources */, 66614353156C619F000F3A27 /* DocumentType.m in Sources */, + 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/iOS/SVGPathView.h b/iOS/SVGPathView.h index ca081c3c8..79150a2cb 100644 --- a/iOS/SVGPathView.h +++ b/iOS/SVGPathView.h @@ -12,7 +12,7 @@ #import #import -#import "SVGView.h" +#import "SKSvgView.h" #define ENABLE_SVGPATHVIEW_CLASS 0 @@ -28,7 +28,7 @@ typedef void (^layerTreeEnumerator)(CALayer* child); @protocol SVGPathViewDelegate; -@interface SVGPathView : SVGView +@interface SVGPathView : SKSvgView { } From 2f27ddc21862f6083a5abb482f43f719425a8d0c Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 25 May 2012 00:36:42 +0100 Subject: [PATCH 034/110] FIXED: apart from touches and CALayer auto-generation (the SVGKImage.CALayerTree property is never set at the moment), this is now back to working status - but with SVGKImage as a complete replacement for the old SVGDocument. NB: the DOM classes included here are about 30% non-implemented, and are NOT integrated into the parser. NB: the SVG-DOM classes have not in ANY WAY been fixed to make them adhere to the spec - so I have left them in a different sub-folder. As they are "fixed", they should be moved to the "SVG-DOM" folder, one by one. --- Core/DOM classes/Core DOM/CharacterData.m | 27 ++ Core/DOM classes/Core DOM/DOMImplementation.m | 21 ++ Core/DOM classes/Core DOM/Document.h | 4 +- Core/DOM classes/Core DOM/Document.m | 7 + Core/DOM classes/Core DOM/Element.m | 126 +++++++ Core/DOM classes/Core DOM/Node.m | 7 +- Core/DOM classes/Core DOM/Text.m | 6 + Core/DOM classes/SVGDocument.h | 7 + Core/DOM classes/SVGDocument.m | 10 +- Core/DOM classes/SVGElement.m | 2 +- Core/DOM classes/SVGImageElement.m | 2 +- Core/DOM classes/SVGPathElement.m | 28 +- Core/DOM classes/SVGPolygonElement.m | 6 +- Core/DOM classes/SVGShapeElement.h | 4 +- Core/DOM classes/SVGShapeElement.m | 2 +- Core/SKSvgView.h | 14 - Core/{SKSvgImage+CA.h => SVGKImage+CA.h} | 4 +- Core/{SKSvgImage+CA.m => SVGKImage+CA.m} | 15 +- ...+SVGPathView.h => SVGKImage+SVGPathView.h} | 4 +- ...+SVGPathView.m => SVGKImage+SVGPathView.m} | 6 +- Core/{SKSvgImage.h => SVGKImage.h} | 29 +- Core/{SKSvgImage.m => SVGKImage.m} | 43 +-- Core/{SKParser.h => SVGKParser.h} | 34 +- Core/{SKParser.m => SVGKParser.m} | 58 ++-- Core/{SKPattern.h => SVGKPattern.h} | 0 Core/{SKPattern.m => SVGKPattern.m} | 2 +- Core/{SKSvgSource.h => SVGKSource.h} | 10 +- Core/{SKSvgSource.m => SVGKSource.m} | 12 +- Core/SVGKView.h | 14 + Core/{SKSvgView.m => SVGKView.m} | 14 +- Core/SVGKit.h | 16 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 316 +++++++++--------- iOS/SVGPathView.h | 2 +- iOS/SVGPathView.m | 8 +- 34 files changed, 534 insertions(+), 326 deletions(-) delete mode 100644 Core/SKSvgView.h rename Core/{SKSvgImage+CA.h => SVGKImage+CA.h} (92%) rename Core/{SKSvgImage+CA.m => SVGKImage+CA.m} (87%) rename Core/{SVGImage+SVGPathView.h => SVGKImage+SVGPathView.h} (90%) rename Core/{SVGImage+SVGPathView.m => SVGKImage+SVGPathView.m} (83%) rename Core/{SKSvgImage.h => SVGKImage.h} (83%) rename Core/{SKSvgImage.m => SVGKImage.m} (84%) rename Core/{SKParser.h => SVGKParser.h} (61%) rename Core/{SKParser.m => SVGKParser.m} (89%) rename Core/{SKPattern.h => SVGKPattern.h} (100%) rename Core/{SKPattern.m => SVGKPattern.m} (95%) rename Core/{SKSvgSource.h => SVGKSource.h} (78%) rename Core/{SKSvgSource.m => SVGKSource.m} (91%) create mode 100644 Core/SVGKView.h rename Core/{SKSvgView.m => SVGKView.m} (79%) diff --git a/Core/DOM classes/Core DOM/CharacterData.m b/Core/DOM classes/Core DOM/CharacterData.m index 2135c8de1..90e999a5c 100644 --- a/Core/DOM classes/Core DOM/CharacterData.m +++ b/Core/DOM classes/Core DOM/CharacterData.m @@ -10,4 +10,31 @@ @implementation CharacterData +@synthesize data; + +@synthesize length; + +-(NSString*) substringData:(unsigned long) offset count:(unsigned long) count +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + +-(void) appendData:(NSString*) arg +{ + NSAssert( FALSE, @"Not implemented yet" ); +} +-(void) insertData:(unsigned long) offset arg:(NSString*) arg +{ + NSAssert( FALSE, @"Not implemented yet" ); +} +-(void) deleteData:(unsigned long) offset count:(unsigned long) count +{ + NSAssert( FALSE, @"Not implemented yet" ); +} +-(void) replaceData:(unsigned long) offset count:(unsigned long) count arg:(NSString*) arg +{ + NSAssert( FALSE, @"Not implemented yet" ); +} + @end diff --git a/Core/DOM classes/Core DOM/DOMImplementation.m b/Core/DOM classes/Core DOM/DOMImplementation.m index 2e7d4b9f9..8fba9adc3 100644 --- a/Core/DOM classes/Core DOM/DOMImplementation.m +++ b/Core/DOM classes/Core DOM/DOMImplementation.m @@ -10,4 +10,25 @@ @implementation DOMImplementation +-(BOOL) hasFeature:(NSString*) feature version:(NSString*) version +{ + NSAssert( FALSE, @"Not implemented yet" ); + return FALSE; +} + +// Introduced in DOM Level 2: +-(DocumentType*) createDocumentType:(NSString*) qualifiedName publicId:(NSString*) publicId systemId:(NSString*) systemId +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + + +// Introduced in DOM Level 2: +-(Document*) createDocument:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName doctype:(DocumentType*) doctype +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + @end diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index cb2be9210..d98fdd977 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -72,11 +72,13 @@ #import "ProcessingInstruction.h" @class DocumentType; #import "DocumentType.h" +@class DOMImplementation; +#import "DOMImplementation.h" @interface Document : Node @property(nonatomic,retain,readonly) DocumentType* doctype; -@property(nonatomic,retain,readonly) DOMImplementation implementation; +@property(nonatomic,retain,readonly) DOMImplementation* implementation; @property(nonatomic,retain,readonly) Element* documentElement; diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index 3b7dc854e..a47a3a05f 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -17,6 +17,7 @@ @implementation Document -(Element*) createElement:(NSString*) tagName { NSAssert( FALSE, @"This is not implemented, but is required by the spec to: Creates an element of the type specified. In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element." ); + return nil; } -(DocumentFragment*) createDocumentFragment @@ -52,23 +53,27 @@ -(Attr*) createAttribute:(NSString*) data -(EntityReference*) createEntityReference:(NSString*) data { NSAssert( FALSE, @"Not implemented. According to spec: Creates an EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node. Note: If any descendant of the Entity node has an unbound namespace prefix, the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null). The DOM Level 2 does not support any mechanism to resolve namespace prefixes." ); + return nil; } -(NodeList*) getElementsByTagName:(NSString*) data { NSAssert( FALSE, @"Not implemented. According to spec: Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree." ); + return nil; } // Introduced in DOM Level 2: -(Node*) importNode:(Node*) importedNode deep:(BOOL) deep { NSAssert( FALSE, @"Not implemented." ); + return nil; } // Introduced in DOM Level 2: -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName { NSAssert( FALSE, @"This should be implemented to share code with createAttributeNS: method below" ); + return nil; } // Introduced in DOM Level 2: @@ -83,6 +88,7 @@ -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qu -(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI qualifiedName:(NSString*) localName { NSAssert( FALSE, @"Not implemented. According to spec: Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree." ); + return nil; } // Introduced in DOM Level 2: @@ -92,6 +98,7 @@ -(Element*) getElementById:(NSString*) elementId Hard-coding this to SVG, where only attributes tagged "id" are ID attributes */ NSAssert( FALSE, @"At this point, we have to recurse down the tree looking at the id's of each SVG element. This is already implemented in old SVGKit, need to copy/paste/debug the code" ); + return nil; } @end diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index 37cc78f10..5e6383e44 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -1,4 +1,130 @@ #import "Element.h" +@interface Element() +@property(nonatomic,retain,readwrite) NSString* tagName; + +@property(nonatomic,retain) NSMutableDictionary* attributesByName; +@end + @implementation Element + +@synthesize tagName; +@synthesize attributesByName; + +- (id)initType:(SKNodeType) nt +{ + self = [super initType:nt]; + if (self) { + self.attributesByName = [NSMutableDictionary dictionary]; + } + return self; +} + +-(NSString*) getAttribute:(NSString*) name +{ + Attr* result = [self.attributesByName valueForKey:name]; + + if( result == nil || result.value == nil ) + return @""; // according to spec + else + return result.value; +} + +-(void) setAttribute:(NSString*) name value:(NSString*) value +{ + Attr* att = [[Attr alloc] initAttr:name value:value]; + + [self.attributesByName setValue:att forKey:name]; +} + +-(void) removeAttribute:(NSString*) name +{ + [self.attributesByName removeObjectForKey:name]; + + NSAssert( FALSE, @"Not fully implemented. Spec says: If the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable." ); +} + +-(Attr*) getAttributeNode:(NSString*) name +{ + return [self.attributesByName valueForKey:name]; +} + +-(Attr*) setAttributeNode:(Attr*) newAttr +{ + Attr* oldAtt = [self.attributesByName objectForKey:newAttr.nodeName]; + + [self.attributesByName setValue:newAttr forKey:newAttr.nodeName]; + + return oldAtt; +} + +-(Attr*) removeAttributeNode:(Attr*) oldAttr +{ + [self.attributesByName removeObjectForKey:oldAttr.nodeName]; + + NSAssert( FALSE, @"Not fully implemented. Spec: If the removed Attr has a default value it is immediately replaced. The replacing attribute has the same namespace URI and local name, as well as the original prefix, when applicable. " ); + + return oldAttr; +} + +-(NodeList*) getElementsByTagName:(NSString*) name +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + +// Introduced in DOM Level 2: +-(NSString*) getAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + +// Introduced in DOM Level 2: +-(void) setAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName value:(NSString*) value +{ + NSAssert( FALSE, @"Not implemented yet" ); +} + +// Introduced in DOM Level 2: +-(void) removeAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSAssert( FALSE, @"Not implemented yet" ); +} + +// Introduced in DOM Level 2: +-(Attr*) getAttributeNodeNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + +// Introduced in DOM Level 2: +-(Attr*) setAttributeNodeNS:(Attr*) newAttr +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + +// Introduced in DOM Level 2: +-(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + +// Introduced in DOM Level 2: +-(BOOL) hasAttribute:(NSString*) name +{ + NSAssert( FALSE, @"Not implemented yet" ); + return FALSE; +} + +// Introduced in DOM Level 2: +-(BOOL) hasAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName +{ + NSAssert( FALSE, @"Not implemented yet" ); + return FALSE; +} + @end diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index c79f99fd1..b6d6741c7 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -10,6 +10,7 @@ #import "Node+Mutable.h" #import "NodeList+Mutable.h" +#import "NamedNodeMap.h" @implementation Node @@ -28,6 +29,8 @@ @implementation Node // Modified in DOM Level 2: @synthesize ownerDocument; +@synthesize hasAttributes, hasChildNodes; + - (id)initType:(SKNodeType) nt { self = [super init]; @@ -220,12 +223,13 @@ -(Node*) appendChild:(Node*) newChild -(BOOL)hasChildNodes { - return [self.childNodes.length > 0]; + return (self.childNodes.length > 0); } -(Node*) cloneNode:(BOOL) deep { NSAssert( FALSE, @"Not implemented yet - read the spec. Sounds tricky. I'm too tired, and would probably screw it up right now" ); + return nil; } // Modified in DOM Level 2: @@ -238,6 +242,7 @@ -(void) normalize -(BOOL) isSupportedFeature:(NSString*) feature version:(NSString*) version { NSAssert( FALSE, @"Not implemented yet - read the spec. I have literally no idea what this is supposed to do." ); + return FALSE; } // Introduced in DOM Level 2: diff --git a/Core/DOM classes/Core DOM/Text.m b/Core/DOM classes/Core DOM/Text.m index 465282450..08859c9e0 100644 --- a/Core/DOM classes/Core DOM/Text.m +++ b/Core/DOM classes/Core DOM/Text.m @@ -10,4 +10,10 @@ @implementation Text +-(Text*) splitText:(unsigned long) offset; +{ + NSAssert( FALSE, @"Not implemented yet" ); + return nil; +} + @end diff --git a/Core/DOM classes/SVGDocument.h b/Core/DOM classes/SVGDocument.h index bd4c58f88..a7bb3890e 100644 --- a/Core/DOM classes/SVGDocument.h +++ b/Core/DOM classes/SVGDocument.h @@ -9,7 +9,14 @@ #import #import "Document.h" +#import "SVGSVGElement.h" @interface SVGDocument : Document +@property (nonatomic, retain, readonly) NSString* title; +@property (nonatomic, retain, readonly) NSString* referrer; +@property (nonatomic, retain, readonly) NSString* domain; +@property (nonatomic, retain, readonly) NSString* URL; +@property (nonatomic, retain, readonly) SVGSVGElement* rootElement; + @end diff --git a/Core/DOM classes/SVGDocument.m b/Core/DOM classes/SVGDocument.m index c22559d0d..367533edc 100644 --- a/Core/DOM classes/SVGDocument.m +++ b/Core/DOM classes/SVGDocument.m @@ -13,10 +13,10 @@ @implementation SVGDocument -@property (nonatomic, retain, readonly) NSString* title; -@property (nonatomic, retain, readonly) NSString* referrer; -@property (nonatomic, retain, readonly) NSString* domain; -@property (nonatomic, retain, readonly) NSString* URL; -@property (nonatomic, retain, readonly) SVGSVGElement* rootElement; +@synthesize title; +@synthesize referrer; +@synthesize domain; +@synthesize URL; +@synthesize rootElement; @end diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 0e38ff4d9..e0c7f8216 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -18,7 +18,7 @@ @interface SVGElement () SVGShapeElement SVGGroupElement - SVGImageElement + SVGKImageElement SVGLineElement SVGPathElement ...etc diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 3954caeac..6c7a85e23 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -1,5 +1,5 @@ // -// SVGImageElement.m +// SVGKImageElement.m // SvgLoader // // Created by Joshua May on 24/06/11. diff --git a/Core/DOM classes/SVGPathElement.m b/Core/DOM classes/SVGPathElement.m index e970a4bfc..61dacf8e9 100644 --- a/Core/DOM classes/SVGPathElement.m +++ b/Core/DOM classes/SVGPathElement.m @@ -8,7 +8,7 @@ #import "SVGPathElement.h" #import "SVGUtils.h" -#import "SKSvgPointsAndPathsParser.h" +#import "SVGKPointsAndPathsParser.h" @interface SVGPathElement () @@ -45,7 +45,7 @@ - (void)parseData:(NSString *)data if (foundCmd) { if ([@"z" isEqualToString:command] || [@"Z" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:command] + lastCoordinate = [SVGKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:command] path:path relativeTo:lastCoordinate]; } else { @@ -58,69 +58,69 @@ - (void)parseData:(NSString *)data NSScanner* commandScanner = [NSScanner scannerWithString:commandWithParameters]; if ([@"m" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner path:path relativeTo:lastCoordinate isRelative:TRUE]; lastCurve = SVGCurveZero; } else if ([@"M" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner path:path relativeTo:CGPointZero isRelative:FALSE]; lastCurve = SVGCurveZero; } else if ([@"l" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readLinetoCommand:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readLinetoCommand:commandScanner path:path relativeTo:lastCoordinate isRelative:TRUE]; lastCurve = SVGCurveZero; } else if ([@"L" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readLinetoCommand:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readLinetoCommand:commandScanner path:path relativeTo:CGPointZero isRelative:FALSE]; lastCurve = SVGCurveZero; } else if ([@"v" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readVerticalLinetoCommand:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readVerticalLinetoCommand:commandScanner path:path relativeTo:lastCoordinate]; lastCurve = SVGCurveZero; } else if ([@"V" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readVerticalLinetoCommand:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readVerticalLinetoCommand:commandScanner path:path relativeTo:CGPointZero]; lastCurve = SVGCurveZero; } else if ([@"h" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readHorizontalLinetoCommand:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readHorizontalLinetoCommand:commandScanner path:path relativeTo:lastCoordinate]; lastCurve = SVGCurveZero; } else if ([@"H" isEqualToString:command]) { - lastCoordinate = [SVGPointsAndPathsParser readHorizontalLinetoCommand:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readHorizontalLinetoCommand:commandScanner path:path relativeTo:CGPointZero]; lastCurve = SVGCurveZero; } else if ([@"c" isEqualToString:command]) { - lastCurve = [SVGPointsAndPathsParser readCurvetoCommand:commandScanner + lastCurve = [SVGKPointsAndPathsParser readCurvetoCommand:commandScanner path:path relativeTo:lastCoordinate isRelative:TRUE]; lastCoordinate = lastCurve.p; } else if ([@"C" isEqualToString:command]) { - lastCurve = [SVGPointsAndPathsParser readCurvetoCommand:commandScanner + lastCurve = [SVGKPointsAndPathsParser readCurvetoCommand:commandScanner path:path relativeTo:CGPointZero isRelative:FALSE]; lastCoordinate = lastCurve.p; } else if ([@"s" isEqualToString:command]) { - lastCurve = [SVGPointsAndPathsParser readSmoothCurvetoCommand:commandScanner + lastCurve = [SVGKPointsAndPathsParser readSmoothCurvetoCommand:commandScanner path:path relativeTo:lastCoordinate withPrevCurve:lastCurve]; lastCoordinate = lastCurve.p; } else if ([@"S" isEqualToString:command]) { - lastCurve = [SVGPointsAndPathsParser readSmoothCurvetoCommand:commandScanner + lastCurve = [SVGKPointsAndPathsParser readSmoothCurvetoCommand:commandScanner path:path relativeTo:CGPointZero withPrevCurve:lastCurve]; diff --git a/Core/DOM classes/SVGPolygonElement.m b/Core/DOM classes/SVGPolygonElement.m index 584c527f0..9c47f6904 100644 --- a/Core/DOM classes/SVGPolygonElement.m +++ b/Core/DOM classes/SVGPolygonElement.m @@ -7,7 +7,7 @@ #import "SVGPolygonElement.h" -#import "SKPointsAndPathsParser.h" +#import "SVGKPointsAndPathsParser.h" @interface SVGPolygonElement() @@ -49,13 +49,13 @@ - (void)parseData:(NSString *)data NSScanner* commandScanner = [NSScanner scannerWithString:commandWithParameters]; - lastCoordinate = [SKPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner + lastCoordinate = [SVGKPointsAndPathsParser readMovetoDrawtoCommandGroups:commandScanner path:path relativeTo:CGPointZero isRelative:FALSE]; - lastCoordinate = [SKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:@"z"] + lastCoordinate = [SVGKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:@"z"] path:path relativeTo:lastCoordinate]; diff --git a/Core/DOM classes/SVGShapeElement.h b/Core/DOM classes/SVGShapeElement.h index 180ac3320..06164484c 100644 --- a/Core/DOM classes/SVGShapeElement.h +++ b/Core/DOM classes/SVGShapeElement.h @@ -26,7 +26,7 @@ #import "SVGUtils.h" @class SVGGradientElement; -@class SVGPattern; +@class SVGKPattern; typedef enum { SVGFillTypeNone = 0, @@ -39,7 +39,7 @@ typedef enum { @property (nonatomic, readwrite) SVGFillType fillType; @property (nonatomic, readwrite) SVGColor fillColor; -@property (nonatomic, readwrite, retain) SVGPattern* fillPattern; +@property (nonatomic, readwrite, retain) SVGKPattern* fillPattern; @property (nonatomic, readwrite) CGFloat strokeWidth; @property (nonatomic, readwrite) SVGColor strokeColor; diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 36ad4c0ec..e8c0a0f0e 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -9,7 +9,7 @@ #import "CGPathAdditions.h" #import "SVGDefsElement.h" -#import "SVGPattern.h" +#import "SVGKPattern.h" #import "CAShapeLayerWithHitTest.h" #define ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE 0 diff --git a/Core/SKSvgView.h b/Core/SKSvgView.h deleted file mode 100644 index 906740e47..000000000 --- a/Core/SKSvgView.h +++ /dev/null @@ -1,14 +0,0 @@ -@class SKSvgImage; - -#if TARGET_OS_IPHONE -#import -@interface SKSvgView :UIView { } -#else -@interface SKSvgView : NSView { } -#endif - -@property (nonatomic, retain) SKSvgImage *image; - -- (id)initWithImage:(SKSvgImage *)image; // set frame to position - -@end diff --git a/Core/SKSvgImage+CA.h b/Core/SVGKImage+CA.h similarity index 92% rename from Core/SKSvgImage+CA.h rename to Core/SVGKImage+CA.h index f7587928c..80f5dcc00 100644 --- a/Core/SKSvgImage+CA.h +++ b/Core/SVGKImage+CA.h @@ -1,8 +1,8 @@ -#import "SVGImage.h" +#import "SVGKImage.h" #import -@interface SVGImage (CA) +@interface SVGKImage (CA) - (CALayer *)layerWithIdentifier:(NSString *)identifier; diff --git a/Core/SKSvgImage+CA.m b/Core/SVGKImage+CA.m similarity index 87% rename from Core/SKSvgImage+CA.m rename to Core/SVGKImage+CA.m index 302e70b3c..10ff1003b 100644 --- a/Core/SKSvgImage+CA.m +++ b/Core/SVGKImage+CA.m @@ -1,8 +1,8 @@ -#import "SVGImage+CA.h" +#import "SVGKImage+CA.h" #import -@implementation SVGImage (CA) +@implementation SVGKImage (CA) static const char *kLayerTreeKey = "svgkit.layertree"; @@ -11,7 +11,8 @@ - (CALayer *)layerWithIdentifier:(NSString *)identifier { } - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { - if ([layer.name isEqualToString:identifier]) { + + if ([[layer valueForKey:kSVGElementIdentifier] isEqualToString:identifier]) { return layer; } @@ -38,7 +39,7 @@ - (CALayer *)layerTreeCached { -(CALayer *)newLayerTree { - return [self newLayerWithElement:self.rootElement]; + return [self newLayerWithElement:self.DOMTree]; } - (CALayer *)newLayerWithElement:(SVGElement *)element { @@ -62,7 +63,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element { } } - if (element != self.rootElement) { + if (element != self.DOMTree) { [element layoutLayer:layer]; } @@ -100,9 +101,9 @@ - (NSDictionary*) dictionaryOfLayers CALayer* rootLayer = [self layerTreeCached]; - [self addSVGLayerTree:rootLayer withIdentifier:self.rootElement.identifier toDictionary:layersByElementId]; + [self addSVGLayerTree:rootLayer withIdentifier:self.DOMTree.identifier toDictionary:layersByElementId]; - NSLog(@"[%@] ROOT element id: %@ => layer: %@", [self class], self.rootElement.identifier, rootLayer); + NSLog(@"[%@] ROOT element id: %@ => layer: %@", [self class], self.DOMTree.identifier, rootLayer); return layersByElementId; } diff --git a/Core/SVGImage+SVGPathView.h b/Core/SVGKImage+SVGPathView.h similarity index 90% rename from Core/SVGImage+SVGPathView.h rename to Core/SVGKImage+SVGPathView.h index 8e7cd567c..56948b677 100644 --- a/Core/SVGImage+SVGPathView.h +++ b/Core/SVGKImage+SVGPathView.h @@ -1,4 +1,4 @@ -#import "SVGImage.h" +#import "SVGKImage.h" /*! This extension is used by SVGPathView to make a call recurse down the whole document stack @@ -12,7 +12,7 @@ typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); #endif -@interface SVGImage (SVGPathView) +@interface SVGKImage (SVGPathView) #if NS_BLOCKS_AVAILABLE diff --git a/Core/SVGImage+SVGPathView.m b/Core/SVGKImage+SVGPathView.m similarity index 83% rename from Core/SVGImage+SVGPathView.m rename to Core/SVGKImage+SVGPathView.m index 3dbe33103..820bf43e0 100644 --- a/Core/SVGImage+SVGPathView.m +++ b/Core/SVGKImage+SVGPathView.m @@ -1,6 +1,6 @@ -#import "SVGImage+SVGPathView.h" +#import "SVGKImage+SVGPathView.h" -@implementation SVGImage (SVGPathView) +@implementation SVGKImage (SVGPathView) #if NS_BLOCKS_AVAILABLE @@ -25,7 +25,7 @@ - (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGEl - (void) applyAggregator:(SVGElementAggregationBlock)aggregator { - [self applyAggregator:aggregator toElement:self.rootElement]; + [self applyAggregator:aggregator toElement:self.DOMTree]; } #endif diff --git a/Core/SKSvgImage.h b/Core/SVGKImage.h similarity index 83% rename from Core/SKSvgImage.h rename to Core/SVGKImage.h index d70838834..807d0b9d3 100644 --- a/Core/SKSvgImage.h +++ b/Core/SVGKImage.h @@ -1,17 +1,21 @@ /* - SVGImage + SVGKImage The main class in SVGKit - this is the one you'll normally interact with - An SVGImage is as close to "the SVG version of a UIImage" as we could possibly get. We cannot + An SVGKImage is as close to "the SVG version of a UIImage" as we could possibly get. We cannot subclass UIImage because Apple has defined UIImage as immutable - and SVG images actually change (each time you zoom in, we want to re-render the SVG as a higher-resolution set of pixels) We use the exact same method names as UIImage, and try to be literally as identical as possible. Data: - - uiImage: not supported yet: will be a cached UIImage that is re-generated on demand. Will enable us to implement an SVGImageView + - UIImage: not supported yet: will be a cached UIImage that is re-generated on demand. Will enable us to implement an SVGKImageView that works as a drop-in replacement for UIImageView + + - DOMTree: the SVG DOM spec, the root element of a tree of SVGElement subclasses + - CALayerTree: the root element of a tree of CALayer subclasses + - size: as per the UIImage.size, returns a size in Apple Points (i.e. 320 == width of iPhone, irrespective of Retina) - scale: ??? unknown how we'll define this, but could be useful when doing auto-re-render-on-zoom - svgWidth: the internal SVGLength used to generate the correct .size @@ -28,12 +32,13 @@ #import "SVGSVGElement.h" #import "SVGGroupElement.h" -#import "SKParser.h" -#import "SVGSource.h" +#import "SVGKParser.h" +#import "SVGKSource.h" +#import "SVGKParseResult.h" @class SVGDefsElement; -@interface SVGImage : NSObject // doesn't extend UIImage because Apple made UIImage immutable +@interface SVGKImage : NSObject // doesn't extend UIImage because Apple made UIImage immutable { } @@ -43,8 +48,8 @@ @property (nonatomic, readonly) SVGLength svgWidth; @property (nonatomic, readonly) SVGLength svgHeight; -@property (nonatomic, readonly) SVGSource* source; -@property (nonatomic, readonly) SVGParseResult* parseErrorsAndWarnings; +@property (nonatomic, readonly) SVGKSource* source; +@property (nonatomic, readonly) SVGKParseResult* parseErrorsAndWarnings; // convenience accessors to parsed children @property (nonatomic, readonly) NSString *title; @@ -56,10 +61,10 @@ #pragma mark - methods to quick load an SVG as an image -+ (SVGImage *)imageNamed:(NSString *)name; // load from main bundle -+ (SVGImage *)imageWithContentsOfFile:(NSString *)path; ++ (SVGKImage *)imageNamed:(NSString *)name; // load from main bundle ++ (SVGKImage *)imageWithContentsOfFile:(NSString *)path; #if TARGET_OS_IPHONE // doesn't exist on OS X's Image class -+ (SVGImage *)imageWithData:(NSData *)data; ++ (SVGKImage *)imageWithData:(NSData *)data; #endif - (id)initWithContentsOfFile:(NSString *)path; @@ -106,7 +111,7 @@ */ #pragma mark ---------end of unsupported items -+ (id)documentFromURL:(NSURL *)url; ++ (SVGKImage*)imageWithContentsOfURL:(NSURL *)url; - (id)initWithContentsOfFile:(NSString *)aPath; - (id)initWithFrame:(CGRect)frame; diff --git a/Core/SKSvgImage.m b/Core/SVGKImage.m similarity index 84% rename from Core/SKSvgImage.m rename to Core/SVGKImage.m index 61a9d1555..3596d44a2 100644 --- a/Core/SKSvgImage.m +++ b/Core/SVGKImage.m @@ -1,14 +1,14 @@ -#import "SKSvgImage.h" +#import "SVGKImage.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" -#import "SVGParser.h" +#import "SVGKParser.h" #import "SVGTitleElement.h" #import "SVGPathElement.h" -#import "SVGParserSVG.h" +#import "SVGKParserSVG.h" -@interface SKSvgImage () +@interface SVGKImage () /*! Only preserved for temporary backwards compatibility */ - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath; @@ -18,21 +18,22 @@ -(SVGSVGElement*)parseFileAtURL:(NSURL *)url; - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error; - (SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error; -@property (nonatomic, readwrite) SVGSVGElement* rootElement; @property (nonatomic, readwrite) SVGLength svgWidth; @property (nonatomic, readwrite) SVGLength svgHeight; -@property (nonatomic, readwrite) SVGParseResult* parseErrorsAndWarnings; +@property (nonatomic, readwrite) SVGKParseResult* parseErrorsAndWarnings; @property (nonatomic, retain, readwrite) SVGSVGElement* DOMTree; // needs renaming + (possibly) refactoring @property (nonatomic, retain, readwrite) CALayer* CALayerTree; #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods -//NOT DEFINED: what is the scale for a SVGImage? @property(nonatomic,readwrite) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); +//NOT DEFINED: what is the scale for a SVGKImage? @property(nonatomic,readwrite) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); @end #pragma mark - main class -@implementation SVGImage +@implementation SVGKImage + +@synthesize DOMTree, CALayerTree; @synthesize svgWidth = _width; @synthesize svgHeight = _height; @@ -41,7 +42,7 @@ @implementation SVGImage @dynamic title, svgDescription, defs; -+ (SVGImage *)imageNamed:(NSString *)name { ++ (SVGKImage *)imageNamed:(NSString *)name { NSParameterAssert(name != nil); NSBundle *bundle = [NSBundle mainBundle]; @@ -66,13 +67,13 @@ + (SVGImage *)imageNamed:(NSString *)name { return [self imageWithContentsOfFile:path]; } -+ (id)documentFromURL:(NSURL *)url { ++ (id)imageWithContentsOfURL:(NSURL *)url { NSParameterAssert(url != nil); return [[[[self class] alloc] initWithContentsOfURL:url] autorelease]; } -+ (SVGImage*)imageWithContentsOfFile:(NSString *)aPath { ++ (SVGKImage*)imageWithContentsOfFile:(NSString *)aPath { return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; } @@ -91,8 +92,8 @@ - (id)initWithContentsOfFile:(NSString *)aPath { } else { - self.svgWidth = self.rootElement.documentWidth; - self.svgHeight = self.rootElement.documentHeight; + self.svgWidth = self.DOMTree.documentWidth; + self.svgHeight = self.DOMTree.documentHeight; } @@ -114,8 +115,8 @@ - (id)initWithContentsOfURL:(NSURL *)url { } else { - self.svgWidth = self.rootElement.documentWidth; - self.svgHeight = self.rootElement.documentHeight; + self.svgWidth = self.DOMTree.documentWidth; + self.svgHeight = self.DOMTree.documentHeight; } } return self; @@ -163,14 +164,14 @@ -(CGSize)size -(CGFloat)scale { - NSAssert( FALSE, @"image.scale is currently UNDEFINED for an SVGImage (nothing implemented by SVGKit)" ); + NSAssert( FALSE, @"image.scale is currently UNDEFINED for an SVGKImage (nothing implemented by SVGKit)" ); return 0.0; } #if TARGET_OS_IPHONE -(UIImage *)UIImage { - NSAssert( FALSE, @"Auto-converting SVGImage to a rasterized UIImage is not yet implemented by SVGKit" ); + NSAssert( FALSE, @"Auto-converting SVGKImage to a rasterized UIImage is not yet implemented by SVGKit" ); return nil; } #endif @@ -222,8 +223,8 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { - SVGSource* parsedDocument = [SVGSource sourceFromFilename:aPath]; - self.parseErrorsAndWarnings = [SVGParser parseSourceUsingDefaultSVGParser:parsedDocument]; + SVGKSource* parsedDocument = [SVGKSource sourceFromFilename:aPath]; + self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:parsedDocument]; if( parseErrorsAndWarnings.rootOfSVGTree != nil ) return (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; @@ -237,8 +238,8 @@ - (SVGSVGElement*)parseFileAtPath:(NSString *)aPath { -(SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error { - SVGSource* parsedDocument = [SVGSource sourceFromURL:url]; - self.parseErrorsAndWarnings = [SVGParser parseSourceUsingDefaultSVGParser:parsedDocument]; + SVGKSource* parsedDocument = [SVGKSource sourceFromURL:url]; + self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:parsedDocument]; if( parseErrorsAndWarnings.rootOfSVGTree != nil ) return (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; diff --git a/Core/SKParser.h b/Core/SVGKParser.h similarity index 61% rename from Core/SKParser.h rename to Core/SVGKParser.h index a43e6c9a3..eecb6f830 100644 --- a/Core/SKParser.h +++ b/Core/SVGKParser.h @@ -1,5 +1,5 @@ /** - SVGParser.h + SVGKParser.h The main parser for SVGKit. All the magic starts here @@ -7,25 +7,25 @@ --- Actual parsing of an SVG is split into three places: - 1. High level, XML parsing: this file (SVGParser) - 2. Mid level, parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" - 3. Mid level, parsing SVG tags only: SVGParserSVG (it's an extension that just does base SVG) + 1. High level, XML parsing: this file (SVGKParser) + 2. Mid level, parsing the structure of a document, and special XML tags: any class that extends "SVGKParserExtension" + 3. Mid level, parsing SVG tags only: SVGKParserSVG (it's an extension that just does base SVG) 4. Low level, parsing individual tags within a file, and precise co-ordinates: all the "SVG...Element" classes parse themselves IDEALLY, we'd like to change that to: - 1. High level, XML parsing: this file (SVGParser) - 2. Mid level, parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" - 3. Mid level, parsing SVG tags only, but also handling all the different tags: SVGParserSVG + 1. High level, XML parsing: this file (SVGKParser) + 2. Mid level, parsing the structure of a document, and special XML tags: any class that extends "SVGKParserExtension" + 3. Mid level, parsing SVG tags only, but also handling all the different tags: SVGKParserSVG 4. Lowest level, parsing co-ordinate lists, numbers, strings: yacc/lex parser (in an unnamed class that hasn't been written yet) */ #import -#import "SVGSource.h" -#import "SVGParseResult.h" +#import "SVGKSource.h" +#import "SVGKParseResult.h" -#import "SVGParserExtension.h" +#import "SVGKParserExtension.h" #import "SVGElement.h" @@ -37,23 +37,23 @@ /*! Verbose parser logging - ONLY needed if you have an SVG file that's failing to load / crashing */ #define DEBUG_VERBOSE_LOG_EVERY_TAG 0 -@interface SVGParser : NSObject { +@interface SVGKParser : NSObject { @private BOOL _storingChars; NSMutableString *_storedChars; NSMutableArray *_elementStack; } -@property(nonatomic,retain,readonly) SVGSource* source; -@property(nonatomic,retain,readonly) SVGParseResult* currentParseRun; +@property(nonatomic,retain,readonly) SVGKSource* source; +@property(nonatomic,retain,readonly) SVGKParseResult* currentParseRun; @property(nonatomic,retain) NSMutableArray* parserExtensions; #pragma mark - NEW -+ (SVGParseResult*) parseSourceUsingDefaultSVGParser:(SVGSource*) source; -- (SVGParseResult*) parseSynchronously; ++ (SVGKParseResult*) parseSourceUsingDefaultSVGKParser:(SVGKSource*) source; +- (SVGKParseResult*) parseSynchronously; +(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css; @@ -62,9 +62,9 @@ #pragma mark - OLD - POTENTIALLY DELETE THESE ONCE THEY'VE ALL BEEN CHECKED AND CONVERTED -- (id)initWithSource:(SVGSource *)doc; +- (id)initWithSource:(SVGKSource *)doc; -- (void) addSVGParserExtension:(NSObject*) extension; +- (void) addParserExtension:(NSObject*) extension; diff --git a/Core/SKParser.m b/Core/SVGKParser.m similarity index 89% rename from Core/SKParser.m rename to Core/SVGKParser.m index f58309a07..3755a25a4 100644 --- a/Core/SKParser.m +++ b/Core/SVGKParser.m @@ -1,22 +1,22 @@ // -// SVGParser.m +// SVGKParser.m // SVGKit // // Copyright Matt Rajca 2010-2011. All rights reserved. // -#import "SKParser.h" +#import "SVGKParser.h" #import -#import "SVGParserSVG.h" +#import "SVGKParserSVG.h" -@interface SVGParserStackItem : NSObject -@property(nonatomic,retain) NSObject* parserForThisItem; +@interface SVGKParserStackItem : NSObject +@property(nonatomic,retain) NSObject* parserForThisItem; @property(nonatomic,retain) NSObject* item; @end -@implementation SVGParserStackItem +@implementation SVGKParserStackItem @synthesize item; @synthesize parserForThisItem; @@ -29,12 +29,12 @@ - (void) dealloc @end -@interface SVGParser() -@property(nonatomic,retain, readwrite) SVGSource* source; -@property(nonatomic,retain, readwrite) SVGParseResult* currentParseRun; +@interface SVGKParser() +@property(nonatomic,retain, readwrite) SVGKSource* source; +@property(nonatomic,retain, readwrite) SVGKParseResult* currentParseRun; @end -@implementation SVGParser +@implementation SVGKParser @synthesize source; @synthesize currentParseRun; @@ -52,15 +52,15 @@ @implementation SVGParser static NSString *NSStringFromLibxmlString (const xmlChar *string); static NSMutableDictionary *NSDictionaryFromLibxmlAttributes (const xmlChar **attrs, int attr_ct); -+ (SVGParseResult*) parseSourceUsingDefaultSVGParser:(SVGSource*) source; ++ (SVGKParseResult*) parseSourceUsingDefaultSVGKParser:(SVGKSource*) source; { - SVGParser *parser = [[[SVGParser alloc] initWithSource:source] autorelease]; + SVGKParser *parser = [[[SVGKParser alloc] initWithSource:source] autorelease]; - SVGParserSVG *subParserSVG = [[[SVGParserSVG alloc] init] autorelease]; + SVGKParserSVG *subParserSVG = [[[SVGKParserSVG alloc] init] autorelease]; [parser.parserExtensions addObject:subParserSVG]; - SVGParseResult* result = [parser parseSynchronously]; + SVGKParseResult* result = [parser parseSynchronously]; return result; } @@ -68,7 +68,7 @@ + (SVGParseResult*) parseSourceUsingDefaultSVGParser:(SVGSource*) source; #define READ_CHUNK_SZ 1024*10 -- (id)initWithSource:(SVGSource *) s { +- (id)initWithSource:(SVGKSource *) s { self = [super init]; if (self) { self.parserExtensions = [NSMutableArray array]; @@ -90,7 +90,7 @@ - (void)dealloc { [super dealloc]; } -- (void) addSVGParserExtension:(NSObject*) extension +- (void) addParserExtension:(NSObject*) extension { if( self.parserExtensions == nil ) { @@ -100,9 +100,9 @@ - (void) addSVGParserExtension:(NSObject*) extension [self.parserExtensions addObject:extension]; } -- (SVGParseResult*) parseSynchronously +- (SVGKParseResult*) parseSynchronously { - self.currentParseRun = [[SVGParseResult new] autorelease]; + self.currentParseRun = [[SVGKParseResult new] autorelease]; /* // 1. while (source has chunks of BYTES) @@ -172,7 +172,7 @@ - (void)connection:(NSURLConnection *)connection - (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { - for( NSObject* subParser in self.parserExtensions ) + for( NSObject* subParser in self.parserExtensions ) { if( [[subParser supportedNamespaces] containsObject:prefix] && [[subParser supportedTags] containsObject:name] ) @@ -183,7 +183,7 @@ - (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes: { NSLog(@"[%@] tag: <%@:%@> -- handled by subParser: %@", [self class], prefix, name, subParser ); - SVGParserStackItem* stackItem = [[[SVGParserStackItem alloc] init] autorelease];; + SVGKParserStackItem* stackItem = [[[SVGKParserStackItem alloc] init] autorelease];; stackItem.parserForThisItem = subParser; stackItem.item = subParserResult; @@ -204,7 +204,7 @@ - (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes: NSLog(@"[%@] ERROR: could not find a parser for tag: <%@:%@>; adding empty placeholder", [self class], prefix, name ); - SVGParserStackItem* emptyItem = [[[SVGParserStackItem alloc] init] autorelease]; + SVGKParserStackItem* emptyItem = [[[SVGKParserStackItem alloc] init] autorelease]; [_elementStack addObject:emptyItem]; } @@ -213,7 +213,7 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes) { - SVGParser *self = (SVGParser *) ctx; + SVGKParser *self = (SVGKParser *) ctx; NSString *name = NSStringFromLibxmlString(localname); NSMutableDictionary *attrs = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); @@ -266,7 +266,7 @@ but it keeps returning nil pointer (not always, but often). WTF? Not sure what w - (void)handleEndElement:(NSString *)name { //DELETE DEBUG NSLog(@"ending element, name = %@", name); - SVGParserStackItem* stackItem = [_elementStack lastObject]; + SVGKParserStackItem* stackItem = [_elementStack lastObject]; [_elementStack removeLastObject]; @@ -277,9 +277,9 @@ - (void)handleEndElement:(NSString *)name { } else { - SVGParserStackItem* parentStackItem = [_elementStack lastObject]; + SVGKParserStackItem* parentStackItem = [_elementStack lastObject]; - NSObject* parserHandlingTheParentItem = parentStackItem.parserForThisItem; + NSObject* parserHandlingTheParentItem = parentStackItem.parserForThisItem; BOOL closingRootTag = FALSE; if( parentStackItem.item == nil ) @@ -314,7 +314,7 @@ - (void)handleEndElement:(NSString *)name { } static void endElementSAX (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI) { - SVGParser *self = (SVGParser *) ctx; + SVGKParser *self = (SVGKParser *) ctx; [self handleEndElement:NSStringFromLibxmlString(localname)]; } @@ -329,13 +329,13 @@ - (void)handleFoundCharacters:(const xmlChar *)chars length:(int)len { } static void charactersFoundSAX (void *ctx, const xmlChar *chars, int len) { - SVGParser *self = (SVGParser *) ctx; + SVGKParser *self = (SVGKParser *) ctx; [self handleFoundCharacters:chars length:len]; } static void errorEncounteredSAX (void *ctx, const char *msg, ...) { NSLog(@"Error encountered during parse: %s", msg); - SVGParseResult* parseResult = ((SVGParser*) ctx).currentParseRun; + SVGKParseResult* parseResult = ((SVGKParser*) ctx).currentParseRun; [parseResult addSAXError:[NSError errorWithDomain:@"SVG-SAX" code:1 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: (NSString*) msg, NSLocalizedDescriptionKey, nil]]]; @@ -375,7 +375,7 @@ static void structuredError (void * userData, NSError* objcError = [NSError errorWithDomain:[[NSNumber numberWithInt:error->domain] stringValue] code:error->code userInfo:details]; - SVGParseResult* parseResult = ((SVGParser*) userData).currentParseRun; + SVGKParseResult* parseResult = ((SVGKParser*) userData).currentParseRun; switch( errorLevel ) { case XML_ERR_WARNING: diff --git a/Core/SKPattern.h b/Core/SVGKPattern.h similarity index 100% rename from Core/SKPattern.h rename to Core/SVGKPattern.h diff --git a/Core/SKPattern.m b/Core/SVGKPattern.m similarity index 95% rename from Core/SKPattern.m rename to Core/SVGKPattern.m index b09ee2e13..c42e9850a 100644 --- a/Core/SKPattern.m +++ b/Core/SVGKPattern.m @@ -1,4 +1,4 @@ -#import "SKPattern.h" +#import "SVGKPattern.h" @implementation SKPattern diff --git a/Core/SKSvgSource.h b/Core/SVGKSource.h similarity index 78% rename from Core/SKSvgSource.h rename to Core/SVGKSource.h index c1f367697..3d8a626b1 100644 --- a/Core/SKSvgSource.h +++ b/Core/SVGKSource.h @@ -1,7 +1,7 @@ /** - SKSvgSource.h + SKSVGKSource.h - SKSvgSource represents the info about a file that was read from disk or over the web during parsing. + SKSVGKSource represents the info about a file that was read from disk or over the web during parsing. Once it has been parsed / loaded, that info is NOT PART OF the in-memory SVG any more - if you were to save the file, you could save it in a different location, with a different SVG Spec, etc. @@ -15,15 +15,15 @@ #import -@interface SKSvgSource : NSObject +@interface SVGKSource : NSObject @property(nonatomic,retain) NSString* svgLanguageVersion; /*< */ @property(nonatomic) BOOL hasSourceFile, hasSourceURL; @property(nonatomic,retain) NSString* filePath; @property(nonatomic,retain) NSURL* URL; -+(SKSvgSource*) sourceFromFilename:(NSString*) p; -+(SKSvgSource*) sourceFromURL:(NSURL*) u; ++(SVGKSource*) sourceFromFilename:(NSString*) p; ++(SVGKSource*) sourceFromURL:(NSURL*) u; -(id) newHandle:(NSError**) error; -(void) closeHandle:(id) handle; diff --git a/Core/SKSvgSource.m b/Core/SVGKSource.m similarity index 91% rename from Core/SKSvgSource.m rename to Core/SVGKSource.m index 265fd7082..5a7b3dd9e 100644 --- a/Core/SKSvgSource.m +++ b/Core/SVGKSource.m @@ -1,15 +1,15 @@ -#import "SKSvgSource.h" +#import "SVGKSource.h" -@implementation SKSvgSource +@implementation SVGKSource @synthesize svgLanguageVersion; @synthesize hasSourceFile, hasSourceURL; @synthesize filePath, URL; -+(SKSvgSource*) sourceFromFilename:(NSString*) p ++(SVGKSource*) sourceFromFilename:(NSString*) p { - SKSvgSource* d = [[[SKSvgSource alloc] init] autorelease]; + SVGKSource* d = [[[SVGKSource alloc] init] autorelease]; d.hasSourceFile = TRUE; d.filePath = p; @@ -17,9 +17,9 @@ +(SKSvgSource*) sourceFromFilename:(NSString*) p return d; } -+(SKSvgSource*) sourceFromURL:(NSURL*) u ++(SVGKSource*) sourceFromURL:(NSURL*) u { - SKSvgSource* d = [[[SKSvgSource alloc] init] autorelease]; + SVGKSource* d = [[[SVGKSource alloc] init] autorelease]; d.hasSourceURL = TRUE; d.URL = u; diff --git a/Core/SVGKView.h b/Core/SVGKView.h new file mode 100644 index 000000000..d7ca5f876 --- /dev/null +++ b/Core/SVGKView.h @@ -0,0 +1,14 @@ +@class SVGKImage; + +#if TARGET_OS_IPHONE +#import +@interface SVGKView :UIView { } +#else +@interface SVGKView : NSView { } +#endif + +@property (nonatomic, retain) SVGKImage *image; + +- (id)initWithImage:(SVGKImage *)image; // set frame to position + +@end diff --git a/Core/SKSvgView.m b/Core/SVGKView.m similarity index 79% rename from Core/SKSvgView.m rename to Core/SVGKView.m index d6eb24de1..41299bf7e 100644 --- a/Core/SKSvgView.m +++ b/Core/SVGKView.m @@ -4,17 +4,17 @@ // // -#import "SVGView.h" +#import "SVGKView.h" -#import "SVGImage.h" -#import "SVGImage+CA.h" +#import "SVGKImage.h" +#import "SVGKImage+CA.h" -@implementation SVGView +@implementation SVGKView @synthesize image = _image; -- (id)initWithImage:(SVGImage *) im { - NSAssert( im != nil, @"Cannot init with a nil SVGImage; this class requires a pre-loaded SVGImage instance" ); +- (id)initWithImage:(SVGKImage *) im { + NSAssert( im != nil, @"Cannot init with a nil SVGKImage; this class requires a pre-loaded SVGKImage instance" ); self = [self initWithFrame:CGRectMake(0.0f, 0.0f, im.size.width, im.size.height)]; if (self) { @@ -38,7 +38,7 @@ - (BOOL)isFlipped { #endif -- (void)setImage:(SVGImage *) newImage { +- (void)setImage:(SVGKImage *) newImage { if (_image != newImage) { [_image release]; _image = [newImage retain]; diff --git a/Core/SVGKit.h b/Core/SVGKit.h index afdac8d66..ea2948a99 100644 --- a/Core/SVGKit.h +++ b/Core/SVGKit.h @@ -11,34 +11,34 @@ #import "SVGCircleElement.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" - #import "SVGImage.h" - #import "SVGImage+CA.h" + #import "SVGKImage.h" + #import "SVGKImage+CA.h" #import "SVGElement.h" #import "SVGEllipseElement.h" #import "SVGGroupElement.h" - #import "SVGImageElement.h" + #import "SVGKImageElement.h" #import "SVGLineElement.h" #import "SVGPathElement.h" #import "SVGPolygonElement.h" #import "SVGPolylineElement.h" #import "SVGRectElement.h" #import "SVGShapeElement.h" -#import "SVGSource.h" +#import "SVGKSource.h" #import "SVGTitleElement.h" #import "SVGUtils.h" #import "SVGView.h" #import "SVGPathView.h" - #import "SVGPattern.h" + #import "SVGKPattern.h" #else #import #import #import - #import - #import + #import + #import #import #import #import - #import + #import #import #import #import diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 6d533f006..5124437ee 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -20,191 +20,191 @@ 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141E015697534000F3A27 /* SKSvgSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SKSvgSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141E815697534000F3A27 /* SKSvgImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SKSvgImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141EA15697534000F3A27 /* SKSvgImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SKSvgImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141E815697534000F3A27 /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141EA15697534000F3A27 /* SVGKImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGKImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141EE15697534000F3A27 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141F115697534000F3A27 /* SKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141FA15697534000F3A27 /* SKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141F115697534000F3A27 /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666141FA15697534000F3A27 /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661420C15697534000F3A27 /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661420E15697534000F3A27 /* SKSvgView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SKSvgView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6661420E15697534000F3A27 /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142121569756C000F3A27 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; }; - 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; }; + 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; }; - 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; }; + 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; }; - 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; }; + 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; }; - 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; }; + 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142B3156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; 666142B4156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; }; - 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; }; + 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142B7156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; 666142B8156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; }; - 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; }; + 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142BB156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; 666142BC156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; }; - 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; }; + 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142BF156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; 666142C0156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; }; - 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; }; + 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142C3156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; 666142C4156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; }; - 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; }; + 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142C7156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; 666142C8156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; }; - 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; }; + 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142CB156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; 666142CC156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; }; - 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; }; + 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142CF156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; 666142D0156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; }; - 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; }; + 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142D3156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; 666142D4156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; }; - 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; }; + 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142D7156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; 666142D8156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; }; - 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; }; + 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; }; - 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; }; + 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; }; - 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; }; + 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; - 666142E5156C2E6A000F3A27 /* SKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SKParseResult.h */; }; - 666142E6156C2E6A000F3A27 /* SKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SKParseResult.h */; }; - 666142E7156C2E6A000F3A27 /* SKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SKParseResult.m */; }; - 666142E8156C2E6A000F3A27 /* SKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SKParseResult.m */; }; - 666142E9156C2E6A000F3A27 /* SKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SKParserExtension.h */; }; - 666142EA156C2E6A000F3A27 /* SKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SKParserExtension.h */; }; - 666142EB156C2E6A000F3A27 /* SKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SKParserSVG.h */; }; - 666142EC156C2E6A000F3A27 /* SKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SKParserSVG.h */; }; - 666142ED156C2E6A000F3A27 /* SKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SKParserSVG.m */; }; - 666142EE156C2E6A000F3A27 /* SKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SKParserSVG.m */; }; - 666142EF156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */; }; - 666142F0156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */; }; - 666142F1156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */; }; - 666142F2156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */; }; + 666142E5156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; }; + 666142E6156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142E7156C2E6A000F3A27 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */; }; + 666142E8156C2E6A000F3A27 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */; }; + 666142E9156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; }; + 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142EB156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; }; + 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142ED156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */; }; + 666142EE156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */; }; + 666142EF156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; }; + 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666142F1156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */; }; + 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */; }; 666142F5156C2E87000F3A27 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142F3156C2E87000F3A27 /* SVGDocument.h */; }; - 666142F6156C2E87000F3A27 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142F3156C2E87000F3A27 /* SVGDocument.h */; }; + 666142F6156C2E87000F3A27 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142F3156C2E87000F3A27 /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142F7156C2E87000F3A27 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142F4156C2E87000F3A27 /* SVGDocument.m */; }; 666142F8156C2E87000F3A27 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142F4156C2E87000F3A27 /* SVGDocument.m */; }; 666142FC156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; }; - 666142FD156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; }; + 666142FD156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142FE156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; 666142FF156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; 66614302156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; }; - 66614303156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; }; + 66614303156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614304156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; 66614305156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; 66614308156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; }; - 66614309156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; }; + 66614309156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661430A156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; 6661430B156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; }; - 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; }; + 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614310156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; 66614311156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; 66614314156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; }; - 66614315156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; }; + 66614315156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614316156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; 66614317156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; }; - 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; }; + 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661431C156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; 6661431D156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; 66614320156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; }; - 66614321156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; }; + 66614321156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614322156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; 66614323156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; 66614326156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; }; - 66614327156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; }; + 66614327156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614328156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; 66614329156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; 6661432C156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; }; - 6661432D156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; }; + 6661432D156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661432E156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; 6661432F156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; }; - 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; }; + 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614334156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; 66614335156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; 66614338156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; }; - 66614339156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; }; + 66614339156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661433A156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; 6661433B156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; }; - 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; }; + 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614340156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; 66614341156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; 66614344156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; }; - 66614345156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; }; + 66614345156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614346156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; 66614347156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; - 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; + 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614351156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; }; - 66614352156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; }; + 66614352156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614353156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; 66614354156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; - 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; + 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; }; - 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; }; + 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; - 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; - 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */; }; - 6684CD4B1566D07400A46247 /* SKSvgView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SKSvgView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6684CD4D1566D07400A46247 /* SKSvgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SKSvgView.m */; }; - 6684CD4E1566D07400A46247 /* SKSvgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SKSvgView.m */; }; + 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; + 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; + 6684CD4B1566D07400A46247 /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6684CD4D1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; + 6684CD4E1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SKBasicDataTypes.m */; }; 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SKBasicDataTypes.m */; }; - 66B79B1D15475254002F99FF /* SKSvgSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SKSvgSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B1F15475254002F99FF /* SKSvgSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SKSvgSource.m */; }; - 66B79B2015475254002F99FF /* SKSvgSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SKSvgSource.m */; }; - 66B79B2D15475254002F99FF /* SKSvgImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SKSvgImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B2F15475254002F99FF /* SKSvgImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SKSvgImage.m */; }; - 66B79B3015475254002F99FF /* SKSvgImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SKSvgImage.m */; }; - 66B79B3115475254002F99FF /* SKSvgImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SKSvgImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B3315475254002F99FF /* SKSvgImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SKSvgImage+CA.m */; }; - 66B79B3415475254002F99FF /* SKSvgImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SKSvgImage+CA.m */; }; + 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGKSource.m */; }; + 66B79B2015475254002F99FF /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGKSource.m */; }; + 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGKImage.m */; }; + 66B79B3015475254002F99FF /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGKImage.m */; }; + 66B79B3115475254002F99FF /* SVGKImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGKImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B3315475254002F99FF /* SVGKImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGKImage+CA.m */; }; + 66B79B3415475254002F99FF /* SVGKImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGKImage+CA.m */; }; 66B79B3915475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B3F15475254002F99FF /* SKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B4115475254002F99FF /* SKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SKParser.m */; }; - 66B79B4215475254002F99FF /* SKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SKParser.m */; }; - 66B79B4D15475254002F99FF /* SKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B4F15475254002F99FF /* SKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SKPattern.m */; }; - 66B79B5015475254002F99FF /* SKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SKPattern.m */; }; + 66B79B3F15475254002F99FF /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B4115475254002F99FF /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGKParser.m */; }; + 66B79B4215475254002F99FF /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGKParser.m */; }; + 66B79B4D15475254002F99FF /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66B79B4F15475254002F99FF /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGKPattern.m */; }; + 66B79B5015475254002F99FF /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGKPattern.m */; }; 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; @@ -262,13 +262,13 @@ 6661429A156C2E69000F3A27 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; 6661429B156C2E69000F3A27 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; 6661429C156C2E69000F3A27 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 6661429E156C2E6A000F3A27 /* SKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParseResult.h; sourceTree = ""; }; - 6661429F156C2E6A000F3A27 /* SKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKParseResult.m; sourceTree = ""; }; - 666142A0156C2E6A000F3A27 /* SKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParserExtension.h; sourceTree = ""; }; - 666142A1156C2E6A000F3A27 /* SKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParserSVG.h; sourceTree = ""; }; - 666142A2156C2E6A000F3A27 /* SKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKParserSVG.m; sourceTree = ""; }; - 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKPointsAndPathsParser.h; sourceTree = ""; }; - 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKPointsAndPathsParser.m; sourceTree = ""; }; + 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; + 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; + 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; + 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; + 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; + 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; + 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; 666142F3156C2E87000F3A27 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; 666142F4156C2E87000F3A27 /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; 666142FA156C2F14000F3A27 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; @@ -303,25 +303,25 @@ 66614355156C625E000F3A27 /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; 6661435B156C645A000F3A27 /* DOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementation.h; sourceTree = ""; }; 6661435C156C645C000F3A27 /* DOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMImplementation.m; sourceTree = ""; }; - 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGImage+SVGPathView.h"; path = "../../Core/SVGImage+SVGPathView.h"; sourceTree = ""; }; - 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGImage+SVGPathView.m"; path = "../../Core/SVGImage+SVGPathView.m"; sourceTree = ""; }; - 6684CD491566D07400A46247 /* SKSvgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgView.h; sourceTree = ""; }; - 6684CD4A1566D07400A46247 /* SKSvgView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSvgView.m; sourceTree = ""; }; + 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGKImage+SVGPathView.h"; path = "../../Core/SVGKImage+SVGPathView.h"; sourceTree = ""; }; + 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGKImage+SVGPathView.m"; path = "../../Core/SVGKImage+SVGPathView.m"; sourceTree = ""; }; + 6684CD491566D07400A46247 /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; + 6684CD4A1566D07400A46247 /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; 66B79AD315475254002F99FF /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; 66B79AD415475254002F99FF /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; 66B79AD515475254002F99FF /* SKBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBasicDataTypes.h; sourceTree = ""; }; 66B79AD615475254002F99FF /* SKBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBasicDataTypes.m; sourceTree = ""; }; - 66B79ADD15475254002F99FF /* SKSvgSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgSource.h; sourceTree = ""; }; - 66B79ADE15475254002F99FF /* SKSvgSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSvgSource.m; sourceTree = ""; }; - 66B79AE515475254002F99FF /* SKSvgImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKSvgImage.h; sourceTree = ""; }; - 66B79AE615475254002F99FF /* SKSvgImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKSvgImage.m; sourceTree = ""; }; - 66B79AE715475254002F99FF /* SKSvgImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SKSvgImage+CA.h"; sourceTree = ""; }; - 66B79AE815475254002F99FF /* SKSvgImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SKSvgImage+CA.m"; sourceTree = ""; }; + 66B79ADD15475254002F99FF /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; + 66B79ADE15475254002F99FF /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; + 66B79AE515475254002F99FF /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; + 66B79AE615475254002F99FF /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; + 66B79AE715475254002F99FF /* SVGKImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+CA.h"; sourceTree = ""; }; + 66B79AE815475254002F99FF /* SVGKImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+CA.m"; sourceTree = ""; }; 66B79AEB15475254002F99FF /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 66B79AEE15475254002F99FF /* SKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKParser.h; sourceTree = ""; }; - 66B79AEF15475254002F99FF /* SKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKParser.m; sourceTree = ""; }; - 66B79AF515475254002F99FF /* SKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKPattern.h; sourceTree = ""; }; - 66B79AF615475254002F99FF /* SKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKPattern.m; sourceTree = ""; }; + 66B79AEE15475254002F99FF /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; + 66B79AEF15475254002F99FF /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; + 66B79AF515475254002F99FF /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; + 66B79AF615475254002F99FF /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -368,8 +368,8 @@ 0867D691FE84028FC02AAC07 /* SVGKit */ = { isa = PBXGroup; children = ( - 6684CD431566CF1300A46247 /* SVGImage+SVGPathView.h */, - 6684CD441566CF1300A46247 /* SVGImage+SVGPathView.m */, + 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */, + 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */, C952623F12711D8600434805 /* Framework */, 66213434148AF2CF006881E1 /* SVGKitLibrary */, ); @@ -510,13 +510,13 @@ 6661429D156C2E69000F3A27 /* Parsing */ = { isa = PBXGroup; children = ( - 6661429E156C2E6A000F3A27 /* SKParseResult.h */, - 6661429F156C2E6A000F3A27 /* SKParseResult.m */, - 666142A0156C2E6A000F3A27 /* SKParserExtension.h */, - 666142A1156C2E6A000F3A27 /* SKParserSVG.h */, - 666142A2156C2E6A000F3A27 /* SKParserSVG.m */, - 666142A3156C2E6A000F3A27 /* SKPointsAndPathsParser.h */, - 666142A4156C2E6A000F3A27 /* SKPointsAndPathsParser.m */, + 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */, + 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */, + 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */, + 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */, + 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */, + 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */, + 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */, ); path = Parsing; sourceTree = ""; @@ -590,21 +590,21 @@ 66B79AD415475254002F99FF /* CGPathAdditions.m */, 66B79AD515475254002F99FF /* SKBasicDataTypes.h */, 66B79AD615475254002F99FF /* SKBasicDataTypes.m */, - 66B79ADD15475254002F99FF /* SKSvgSource.h */, - 66B79ADE15475254002F99FF /* SKSvgSource.m */, - 66B79AE515475254002F99FF /* SKSvgImage.h */, - 66B79AE615475254002F99FF /* SKSvgImage.m */, - 66B79AE715475254002F99FF /* SKSvgImage+CA.h */, - 66B79AE815475254002F99FF /* SKSvgImage+CA.m */, + 66B79ADD15475254002F99FF /* SVGKSource.h */, + 66B79ADE15475254002F99FF /* SVGKSource.m */, + 66B79AE515475254002F99FF /* SVGKImage.h */, + 66B79AE615475254002F99FF /* SVGKImage.m */, + 66B79AE715475254002F99FF /* SVGKImage+CA.h */, + 66B79AE815475254002F99FF /* SVGKImage+CA.m */, 66B79AEB15475254002F99FF /* SVGKit.h */, - 66B79AEE15475254002F99FF /* SKParser.h */, - 66B79AEF15475254002F99FF /* SKParser.m */, - 66B79AF515475254002F99FF /* SKPattern.h */, - 66B79AF615475254002F99FF /* SKPattern.m */, + 66B79AEE15475254002F99FF /* SVGKParser.h */, + 66B79AEF15475254002F99FF /* SVGKParser.m */, + 66B79AF515475254002F99FF /* SVGKPattern.h */, + 66B79AF615475254002F99FF /* SVGKPattern.m */, 66B79B0715475254002F99FF /* SVGUtils.h */, 66B79B0815475254002F99FF /* SVGUtils.m */, - 6684CD491566D07400A46247 /* SKSvgView.h */, - 6684CD4A1566D07400A46247 /* SKSvgView.m */, + 6684CD491566D07400A46247 /* SVGKView.h */, + 6684CD4A1566D07400A46247 /* SVGKView.m */, ); name = Core; path = ../../Core; @@ -627,14 +627,14 @@ files = ( 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */, 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */, - 666141E015697534000F3A27 /* SKSvgSource.h in Headers */, - 666141E815697534000F3A27 /* SKSvgImage.h in Headers */, - 666141EA15697534000F3A27 /* SKSvgImage+CA.h in Headers */, + 666141E015697534000F3A27 /* SVGKSource.h in Headers */, + 666141E815697534000F3A27 /* SVGKImage.h in Headers */, + 666141EA15697534000F3A27 /* SVGKImage+CA.h in Headers */, 666141EE15697534000F3A27 /* SVGKit.h in Headers */, - 666141F115697534000F3A27 /* SKParser.h in Headers */, - 666141FA15697534000F3A27 /* SKPattern.h in Headers */, + 666141F115697534000F3A27 /* SVGKParser.h in Headers */, + 666141FA15697534000F3A27 /* SVGKPattern.h in Headers */, 6661420C15697534000F3A27 /* SVGUtils.h in Headers */, - 6661420E15697534000F3A27 /* SKSvgView.h in Headers */, + 6661420E15697534000F3A27 /* SVGKView.h in Headers */, 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */, 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */, 666142121569756C000F3A27 /* SVGPathView.h in Headers */, @@ -654,10 +654,10 @@ 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */, 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */, 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */, - 666142E6156C2E6A000F3A27 /* SKParseResult.h in Headers */, - 666142EA156C2E6A000F3A27 /* SKParserExtension.h in Headers */, - 666142EC156C2E6A000F3A27 /* SKParserSVG.h in Headers */, - 666142F0156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */, + 666142E6156C2E6A000F3A27 /* SVGKParseResult.h in Headers */, + 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */, + 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */, + 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */, 666142F6156C2E87000F3A27 /* SVGDocument.h in Headers */, 666142FD156C2F14000F3A27 /* Document.h in Headers */, 66614303156C3A0B000F3A27 /* Node.h in Headers */, @@ -687,15 +687,15 @@ 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */, 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */, 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */, - 66B79B1D15475254002F99FF /* SKSvgSource.h in Headers */, - 66B79B2D15475254002F99FF /* SKSvgImage.h in Headers */, - 66B79B3115475254002F99FF /* SKSvgImage+CA.h in Headers */, + 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */, + 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */, + 66B79B3115475254002F99FF /* SVGKImage+CA.h in Headers */, 66B79B3915475254002F99FF /* SVGKit.h in Headers */, - 66B79B3F15475254002F99FF /* SKParser.h in Headers */, - 66B79B4D15475254002F99FF /* SKPattern.h in Headers */, + 66B79B3F15475254002F99FF /* SVGKParser.h in Headers */, + 66B79B4D15475254002F99FF /* SVGKPattern.h in Headers */, 66B79B7115475254002F99FF /* SVGUtils.h in Headers */, - 6684CD451566CF1300A46247 /* SVGImage+SVGPathView.h in Headers */, - 6684CD4B1566D07400A46247 /* SKSvgView.h in Headers */, + 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */, + 6684CD4B1566D07400A46247 /* SVGKView.h in Headers */, 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */, 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */, 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */, @@ -712,10 +712,10 @@ 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */, 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */, 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */, - 666142E5156C2E6A000F3A27 /* SKParseResult.h in Headers */, - 666142E9156C2E6A000F3A27 /* SKParserExtension.h in Headers */, - 666142EB156C2E6A000F3A27 /* SKParserSVG.h in Headers */, - 666142EF156C2E6A000F3A27 /* SKPointsAndPathsParser.h in Headers */, + 666142E5156C2E6A000F3A27 /* SVGKParseResult.h in Headers */, + 666142E9156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */, + 666142EB156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */, + 666142EF156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */, 666142F5156C2E87000F3A27 /* SVGDocument.h in Headers */, 666142FC156C2F14000F3A27 /* Document.h in Headers */, 66614302156C3A0B000F3A27 /* Node.h in Headers */, @@ -843,14 +843,14 @@ 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */, 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */, - 66B79B2015475254002F99FF /* SKSvgSource.m in Sources */, - 66B79B3015475254002F99FF /* SKSvgImage.m in Sources */, - 66B79B3415475254002F99FF /* SKSvgImage+CA.m in Sources */, - 66B79B4215475254002F99FF /* SKParser.m in Sources */, - 66B79B5015475254002F99FF /* SKPattern.m in Sources */, + 66B79B2015475254002F99FF /* SVGKSource.m in Sources */, + 66B79B3015475254002F99FF /* SVGKImage.m in Sources */, + 66B79B3415475254002F99FF /* SVGKImage+CA.m in Sources */, + 66B79B4215475254002F99FF /* SVGKParser.m in Sources */, + 66B79B5015475254002F99FF /* SVGKPattern.m in Sources */, 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, - 6684CD481566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */, - 6684CD4E1566D07400A46247 /* SKSvgView.m in Sources */, + 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */, + 6684CD4E1566D07400A46247 /* SVGKView.m in Sources */, 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */, 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */, 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */, @@ -867,9 +867,9 @@ 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */, 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */, 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, - 666142E8156C2E6A000F3A27 /* SKParseResult.m in Sources */, - 666142EE156C2E6A000F3A27 /* SKParserSVG.m in Sources */, - 666142F2156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */, + 666142E8156C2E6A000F3A27 /* SVGKParseResult.m in Sources */, + 666142EE156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */, + 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */, 666142F8156C2E87000F3A27 /* SVGDocument.m in Sources */, 666142FF156C2F14000F3A27 /* Document.m in Sources */, 66614305156C3A0B000F3A27 /* Node.m in Sources */, @@ -897,14 +897,14 @@ 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */, 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */, - 66B79B1F15475254002F99FF /* SKSvgSource.m in Sources */, - 66B79B2F15475254002F99FF /* SKSvgImage.m in Sources */, - 66B79B3315475254002F99FF /* SKSvgImage+CA.m in Sources */, - 66B79B4115475254002F99FF /* SKParser.m in Sources */, - 66B79B4F15475254002F99FF /* SKPattern.m in Sources */, + 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */, + 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */, + 66B79B3315475254002F99FF /* SVGKImage+CA.m in Sources */, + 66B79B4115475254002F99FF /* SVGKParser.m in Sources */, + 66B79B4F15475254002F99FF /* SVGKPattern.m in Sources */, 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, - 6684CD471566CF1300A46247 /* SVGImage+SVGPathView.m in Sources */, - 6684CD4D1566D07400A46247 /* SKSvgView.m in Sources */, + 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */, + 6684CD4D1566D07400A46247 /* SVGKView.m in Sources */, 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */, 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */, 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */, @@ -921,9 +921,9 @@ 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */, 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */, 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, - 666142E7156C2E6A000F3A27 /* SKParseResult.m in Sources */, - 666142ED156C2E6A000F3A27 /* SKParserSVG.m in Sources */, - 666142F1156C2E6A000F3A27 /* SKPointsAndPathsParser.m in Sources */, + 666142E7156C2E6A000F3A27 /* SVGKParseResult.m in Sources */, + 666142ED156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */, + 666142F1156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */, 666142F7156C2E87000F3A27 /* SVGDocument.m in Sources */, 666142FE156C2F14000F3A27 /* Document.m in Sources */, 66614304156C3A0B000F3A27 /* Node.m in Sources */, diff --git a/iOS/SVGPathView.h b/iOS/SVGPathView.h index 79150a2cb..1b0a6b292 100644 --- a/iOS/SVGPathView.h +++ b/iOS/SVGPathView.h @@ -12,7 +12,7 @@ #import #import -#import "SKSvgView.h" +#import "SVGKView.h" #define ENABLE_SVGPATHVIEW_CLASS 0 diff --git a/iOS/SVGPathView.m b/iOS/SVGPathView.m index 722df74af..ce37499e0 100755 --- a/iOS/SVGPathView.m +++ b/iOS/SVGPathView.m @@ -5,11 +5,11 @@ #import "SVGPathView.h" -#import "SVGImage+SVGPathView.h" -#import "SVGImage.h" +#import "SVGKImage+SVGPathView.h" +#import "SVGKImage.h" #import "SVGPathElement.h" #import "CGPathAdditions.h" -#import "SVGImage+CA.h" +#import "SVGKImage+CA.h" #if ENABLE_SVGPATHVIEW_CLASS @@ -46,7 +46,7 @@ - (id)initWithPathElement:(SVGPathElement*)pathElement translateTowardOrigin:(BO _pathElement = newPathElement; - SVGImage* doc = [[SVGImage alloc] initWithFrame:viewRect]; + SVGKImage* doc = [[SVGKImage alloc] initWithFrame:viewRect]; [doc addChild:newPathElement]; [self setDocument:doc]; From bffaf0e56296fa1fe328b3fd04057a163fc9b312 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 25 May 2012 01:34:29 +0100 Subject: [PATCH 035/110] Merged the SVGKImage+CA (the old SVGDocument+CA) into the main SVGKImage class, and corrected a minor silly bug in SVGGroupElement and SVGSVGElement that's been around for years. --- Core/DOM classes/SVGGroupElement.m | 5 +- Core/DOM classes/SVGSVGElement.m | 5 +- Core/SVGKImage+CA.h | 21 -- Core/SVGKImage+CA.m | 111 ---------- Core/SVGKImage.h | 28 +-- Core/SVGKImage.m | 209 +++++++++++------- Core/SVGKView.m | 3 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 12 - iOS/SVGPathView.m | 1 - 9 files changed, 143 insertions(+), 252 deletions(-) delete mode 100644 Core/SVGKImage+CA.h delete mode 100644 Core/SVGKImage+CA.m diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index e89bb813f..402dca4e4 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -68,16 +68,15 @@ - (void)layoutLayer:(CALayer *)layer { } } - mainRect = CGRectIntegral(mainRect); // round values to integers - layer.frame = mainRect; + // TODO: this code looks insanely wrong to me. WTF is it doing? Why? WHY? for (CALayer *currentLayer in sublayers) { CGRect frame = currentLayer.frame; frame.origin.x -= mainRect.origin.x; frame.origin.y -= mainRect.origin.y; - currentLayer.frame = CGRectIntegral(frame); + currentLayer.frame = frame; } } diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index b7eefc0cd..ae511f583 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -92,16 +92,15 @@ - (void)layoutLayer:(CALayer *)layer { } } - mainRect = CGRectIntegral(mainRect); // round values to integers - layer.frame = mainRect; + // TODO: this code looks insanely wrong to me. WTF is it doing? Why? WHY? for (CALayer *currentLayer in sublayers) { CGRect frame = currentLayer.frame; frame.origin.x -= mainRect.origin.x; frame.origin.y -= mainRect.origin.y; - currentLayer.frame = CGRectIntegral(frame); + currentLayer.frame = frame; } } diff --git a/Core/SVGKImage+CA.h b/Core/SVGKImage+CA.h deleted file mode 100644 index 80f5dcc00..000000000 --- a/Core/SVGKImage+CA.h +++ /dev/null @@ -1,21 +0,0 @@ - -#import "SVGKImage.h" -#import - -@interface SVGKImage (CA) - -- (CALayer *)layerWithIdentifier:(NSString *)identifier; - -/*! One and only one instance ever returned */ -- (CALayer *)layerTreeCached; -/*! Creates a new instance each time you call it */ -- (CALayer *)newLayerTree; - -- (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer; - -- (CALayer *)newLayerWithElement:(SVGElement < SVGLayeredElement > *)element; - -/*! returns all the individual CALayer's in the full layer tree, indexed by the SVG identifier of the SVG node that created that layer */ -- (NSDictionary*) dictionaryOfLayers; - -@end diff --git a/Core/SVGKImage+CA.m b/Core/SVGKImage+CA.m deleted file mode 100644 index 10ff1003b..000000000 --- a/Core/SVGKImage+CA.m +++ /dev/null @@ -1,111 +0,0 @@ -#import "SVGKImage+CA.h" - -#import - -@implementation SVGKImage (CA) - -static const char *kLayerTreeKey = "svgkit.layertree"; - -- (CALayer *)layerWithIdentifier:(NSString *)identifier { - return [self layerWithIdentifier:identifier layer:self.layerTreeCached]; -} - -- (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { - - if ([[layer valueForKey:kSVGElementIdentifier] isEqualToString:identifier]) { - return layer; - } - - for (CALayer *child in layer.sublayers) { - CALayer *resultingLayer = [self layerWithIdentifier:identifier layer:child]; - - if (resultingLayer) - return resultingLayer; - } - - return nil; -} - -- (CALayer *)layerTreeCached { - CALayer *cachedLayerTree = objc_getAssociatedObject(self, (void *) kLayerTreeKey); - - if (!cachedLayerTree) { - cachedLayerTree = [[self newLayerTree] autorelease]; // we're going to associate it using OBJC_ASSOCIATION_RETAIN_NONATOMIC - objc_setAssociatedObject(self, (void *) kLayerTreeKey, cachedLayerTree, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - } - - return cachedLayerTree; -} - --(CALayer *)newLayerTree -{ - return [self newLayerWithElement:self.DOMTree]; -} - -- (CALayer *)newLayerWithElement:(SVGElement *)element { - CALayer *layer = [element newLayer]; - - NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), element.identifier); - - if (![element.children count]) { - return layer; - } - - for (SVGElement *child in element.children) { - if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - CALayer *sublayer = [self newLayerWithElement:(id)child]; - - if (!sublayer) { - continue; - } - - [layer addSublayer:sublayer]; - } - } - - if (element != self.DOMTree) { - [element layoutLayer:layer]; - } - - [layer setNeedsDisplay]; - - return layer; -} - -- (void) addSVGLayerTree:(CALayer*) layer withIdentifier:(NSString*) layerID toDictionary:(NSMutableDictionary*) layersByID -{ - [layersByID setValue:layer forKey:layerID]; - - if ( [layer.sublayers count] < 1 ) - { - return; - } - - for (CALayer *subLayer in layer.sublayers) - { - NSString* subLayerID = [subLayer valueForKey:kSVGElementIdentifier]; - - if( subLayerID != nil ) - { - NSLog(@"[%@] element id: %@ => layer: %@", [self class], subLayerID, subLayer); - - [self addSVGLayerTree:subLayer withIdentifier:subLayerID toDictionary:layersByID]; - - } - } -} - -- (NSDictionary*) dictionaryOfLayers -{ - NSMutableDictionary* layersByElementId = [NSMutableDictionary dictionary]; - - CALayer* rootLayer = [self layerTreeCached]; - - [self addSVGLayerTree:rootLayer withIdentifier:self.DOMTree.identifier toDictionary:layersByElementId]; - - NSLog(@"[%@] ROOT element id: %@ => layer: %@", [self class], self.DOMTree.identifier, rootLayer); - - return layersByElementId; -} - -@end diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index 807d0b9d3..1d1052d19 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -21,9 +21,6 @@ - svgWidth: the internal SVGLength used to generate the correct .size - svgHeight: the internal SVGLength used to generate the correct .size - rootElement: the SVGSVGElement instance that is the root of the parse SVG tree. Use this to access the full SVG document - - svgDescription: ??? - - title: ??? - - defs: the root element */ @@ -48,13 +45,8 @@ @property (nonatomic, readonly) SVGLength svgWidth; @property (nonatomic, readonly) SVGLength svgHeight; -@property (nonatomic, readonly) SVGKSource* source; -@property (nonatomic, readonly) SVGKParseResult* parseErrorsAndWarnings; - -// convenience accessors to parsed children -@property (nonatomic, readonly) NSString *title; -@property (nonatomic, readonly) NSString *svgDescription; // 'description' is reserved by NSObject -@property (nonatomic, readonly) SVGDefsElement *defs; // needs renaming + (possibly) refactoring +@property (nonatomic, retain, readonly) SVGKSource* source; +@property (nonatomic, retain, readonly) SVGKParseResult* parseErrorsAndWarnings; @property (nonatomic, retain, readonly) SVGSVGElement* DOMTree; @property (nonatomic, retain, readonly) CALayer* CALayerTree; @@ -113,9 +105,19 @@ + (SVGKImage*)imageWithContentsOfURL:(NSURL *)url; -- (id)initWithContentsOfFile:(NSString *)aPath; -- (id)initWithFrame:(CGRect)frame; - #pragma mark - core methods for interacting with an SVG image usefully (not from UIImage) +/*! This is used internally by the main UIImage cloned methods anyway, so we might as well expose it */ +- (id)initWithSource:(SVGKSource *)source; + + +/*! Creates a new instance each time you call it */ +- (CALayer *)newLayerTree; + +- (CALayer *)layerWithIdentifier:(NSString *)identifier; +- (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer; + +/*! returns all the individual CALayer's in the full layer tree, indexed by the SVG identifier of the SVG node that created that layer */ +- (NSDictionary*) dictionaryOfLayers; + @end \ No newline at end of file diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 3596d44a2..e7b5df63c 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -10,17 +10,11 @@ @interface SVGKImage () -/*! Only preserved for temporary backwards compatibility */ -- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath; -/*! Only preserved for temporary backwards compatibility */ --(SVGSVGElement*)parseFileAtURL:(NSURL *)url; - -- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error; -- (SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error; - @property (nonatomic, readwrite) SVGLength svgWidth; @property (nonatomic, readwrite) SVGLength svgHeight; -@property (nonatomic, readwrite) SVGKParseResult* parseErrorsAndWarnings; +@property (nonatomic, retain, readwrite) SVGKParseResult* parseErrorsAndWarnings; + +@property (nonatomic, retain, readwrite) SVGKSource* source; @property (nonatomic, retain, readwrite) SVGSVGElement* DOMTree; // needs renaming + (possibly) refactoring @property (nonatomic, retain, readwrite) CALayer* CALayerTree; @@ -40,8 +34,6 @@ @implementation SVGKImage @synthesize source; @synthesize parseErrorsAndWarnings; -@dynamic title, svgDescription, defs; - + (SVGKImage *)imageNamed:(NSString *)name { NSParameterAssert(name != nil); @@ -67,51 +59,34 @@ + (SVGKImage *)imageNamed:(NSString *)name { return [self imageWithContentsOfFile:path]; } -+ (id)imageWithContentsOfURL:(NSURL *)url { ++ (SVGKImage*) imageWithContentsOfURL:(NSURL *)url { NSParameterAssert(url != nil); return [[[[self class] alloc] initWithContentsOfURL:url] autorelease]; } -+ (SVGKImage*)imageWithContentsOfFile:(NSString *)aPath { ++ (SVGKImage*) imageWithContentsOfFile:(NSString *)aPath { return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; } -- (id)initWithContentsOfFile:(NSString *)aPath { - NSParameterAssert(aPath != nil); - +- (id)initWithSource:(SVGKSource *)source { self = [super init]; if (self) { self.svgWidth = SVGLengthZero; self.svgHeight = SVGLengthZero; + self.source = source; - NSError* parseError = nil; - self.DOMTree = [self parseFileAtPath:aPath error:&parseError]; - - if ( self.DOMTree == nil ) { - - } - else { - self.svgWidth = self.DOMTree.documentWidth; - self.svgHeight = self.DOMTree.documentHeight; - } - + self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:self.source]; - } - return self; -} - -- (id)initWithContentsOfURL:(NSURL *)url { - NSParameterAssert(url != nil); - - self = [super init]; - if (self) { - _width = SVGLengthZero; - _height = SVGLengthZero; + if( parseErrorsAndWarnings.rootOfSVGTree != nil ) + self.DOMTree = (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; + else + self.DOMTree = nil; - self.DOMTree = [self parseFileAtURL:url]; - if ( self.DOMTree == nil ) { - + if ( self.DOMTree == nil ) + { + NSLog(@"[%@] ERROR: failed to init SVGKImage with source = %@, returning nil from init methods", [self class], source ); + self = nil; } else { @@ -122,20 +97,23 @@ - (id)initWithContentsOfURL:(NSURL *)url { return self; } -- (id) initWithFrame:(CGRect)frame -{ - self = [super init]; - if (self) { - self.DOMTree = [[[SVGSVGElement alloc] initWithName:@"svg"] autorelease]; - - _width = SVGLengthGetWidth(frame); - _height = SVGLengthGetHeight(frame); - } - return self; +- (id)initWithContentsOfFile:(NSString *)aPath { + NSParameterAssert(aPath != nil); + + return [self initWithSource:[SVGKSource sourceFromFilename:aPath]]; +} + +- (id)initWithContentsOfURL:(NSURL *)url { + NSParameterAssert(url != nil); + + return [self initWithSource:[SVGKSource sourceFromURL:url]]; } - (void)dealloc { self.DOMTree = nil; + self.CALayerTree = nil; + self.source = nil; + self.parseErrorsAndWarnings = nil; [super dealloc]; } @@ -221,56 +199,115 @@ + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval) } #endif -- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath error:(NSError**) error { - - SVGKSource* parsedDocument = [SVGKSource sourceFromFilename:aPath]; - self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:parsedDocument]; - - if( parseErrorsAndWarnings.rootOfSVGTree != nil ) - return (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; - else - return nil; -} +#pragma mark - CALayer methods: generate the CALayerTree -- (SVGSVGElement*)parseFileAtPath:(NSString *)aPath { - return [self parseFileAtPath:aPath error:nil]; +- (CALayer *)layerWithIdentifier:(NSString *)identifier +{ + return [self layerWithIdentifier:identifier layer:self.CALayerTree]; } - --(SVGSVGElement*)parseFileAtURL:(NSURL *)url error:(NSError**) error { - SVGKSource* parsedDocument = [SVGKSource sourceFromURL:url]; - self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:parsedDocument]; +- (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { - if( parseErrorsAndWarnings.rootOfSVGTree != nil ) - return (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; - else - return nil; -} - --(SVGSVGElement*)parseFileAtURL:(NSURL *)url { - return [self parseFileAtURL:url error:nil]; + if ([[layer valueForKey:kSVGElementIdentifier] isEqualToString:identifier]) { + return layer; + } + + for (CALayer *child in layer.sublayers) { + CALayer *resultingLayer = [self layerWithIdentifier:identifier layer:child]; + + if (resultingLayer) + return resultingLayer; + } + + return nil; } -- (CALayer *)newLayer { +- (CALayer *)newLayerWithElement:(SVGElement *)element { + CALayer *layer = [element newLayer]; - CALayer* _layer = [[CALayer layer] retain]; - _layer.frame = CGRectMake(0.0f, 0.0f, SVGLengthAsPixels(self.svgWidth), SVGLengthAsPixels(self.svgHeight)); + NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), element.identifier); - return _layer; + if (![element.children count]) { + return layer; + } + + for (SVGElement *child in element.children) { + if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { + CALayer *sublayer = [self newLayerWithElement:(id)child]; + + if (!sublayer) { + continue; + } + + [layer addSublayer:sublayer]; + } + } + + if (element != self.DOMTree) { + [element layoutLayer:layer]; + } + + [layer setNeedsDisplay]; + + return layer; } -- (void)layoutLayer:(CALayer *)layer { } +-(CALayer *)newLayerTree +{ + if( self.DOMTree == nil ) + return nil; + else + return [self newLayerWithElement:self.DOMTree]; +} -- (NSString *)title { - return [self.DOMTree findFirstElementOfClass:[SVGTitleElement class]].stringValue; +-(CALayer *)CALayerTree +{ + if( CALayerTree == nil ) + { + self.CALayerTree = [[self newLayerTree] autorelease]; + } + + return CALayerTree; } -- (NSString *)desc { - return [self.DOMTree findFirstElementOfClass:[SVGDescriptionElement class]].stringValue; + +- (void) addSVGLayerTree:(CALayer*) layer withIdentifier:(NSString*) layerID toDictionary:(NSMutableDictionary*) layersByID +{ + // TODO: consider removing this method: it caches the lookup of individual items in the CALayerTree. It's a performance boost, but is it enough to be worthwhile? + [layersByID setValue:layer forKey:layerID]; + + if ( [layer.sublayers count] < 1 ) + { + return; + } + + for (CALayer *subLayer in layer.sublayers) + { + NSString* subLayerID = [subLayer valueForKey:kSVGElementIdentifier]; + + if( subLayerID != nil ) + { + NSLog(@"[%@] element id: %@ => layer: %@", [self class], subLayerID, subLayer); + + [self addSVGLayerTree:subLayer withIdentifier:subLayerID toDictionary:layersByID]; + + } + } } -- (SVGDefsElement *)defs { - return (SVGDefsElement *) [self.DOMTree findFirstElementOfClass:[SVGDefsElement class]]; +- (NSDictionary*) dictionaryOfLayers +{ + // TODO: consider removing this method: it caches the lookup of individual items in the CALayerTree. It's a performance boost, but is it enough to be worthwhile? + NSMutableDictionary* layersByElementId = [NSMutableDictionary dictionary]; + + CALayer* rootLayer = self.CALayerTree; + + [self addSVGLayerTree:rootLayer withIdentifier:self.DOMTree.identifier toDictionary:layersByElementId]; + + NSLog(@"[%@] ROOT element id: %@ => layer: %@", [self class], self.DOMTree.identifier, rootLayer); + + return layersByElementId; } @end + diff --git a/Core/SVGKView.m b/Core/SVGKView.m index 41299bf7e..8ffdfb340 100644 --- a/Core/SVGKView.m +++ b/Core/SVGKView.m @@ -7,7 +7,6 @@ #import "SVGKView.h" #import "SVGKImage.h" -#import "SVGKImage+CA.h" @implementation SVGKView @@ -57,7 +56,7 @@ - (void)setImage:(SVGKImage *) newImage { [sublayer removeFromSuperlayer]; } - [self.layer addSublayer:[_image layerTreeCached]]; + [self.layer addSublayer:_image.CALayerTree]; } } diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 5124437ee..cc72090ca 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E815697534000F3A27 /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141EA15697534000F3A27 /* SVGKImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGKImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141EE15697534000F3A27 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141F115697534000F3A27 /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141FA15697534000F3A27 /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -195,9 +194,6 @@ 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGKImage.m */; }; 66B79B3015475254002F99FF /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGKImage.m */; }; - 66B79B3115475254002F99FF /* SVGKImage+CA.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE715475254002F99FF /* SVGKImage+CA.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B3315475254002F99FF /* SVGKImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGKImage+CA.m */; }; - 66B79B3415475254002F99FF /* SVGKImage+CA.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE815475254002F99FF /* SVGKImage+CA.m */; }; 66B79B3915475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B3F15475254002F99FF /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B4115475254002F99FF /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGKParser.m */; }; @@ -315,8 +311,6 @@ 66B79ADE15475254002F99FF /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; 66B79AE515475254002F99FF /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; 66B79AE615475254002F99FF /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; - 66B79AE715475254002F99FF /* SVGKImage+CA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+CA.h"; sourceTree = ""; }; - 66B79AE815475254002F99FF /* SVGKImage+CA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+CA.m"; sourceTree = ""; }; 66B79AEB15475254002F99FF /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; 66B79AEE15475254002F99FF /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; 66B79AEF15475254002F99FF /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; @@ -594,8 +588,6 @@ 66B79ADE15475254002F99FF /* SVGKSource.m */, 66B79AE515475254002F99FF /* SVGKImage.h */, 66B79AE615475254002F99FF /* SVGKImage.m */, - 66B79AE715475254002F99FF /* SVGKImage+CA.h */, - 66B79AE815475254002F99FF /* SVGKImage+CA.m */, 66B79AEB15475254002F99FF /* SVGKit.h */, 66B79AEE15475254002F99FF /* SVGKParser.h */, 66B79AEF15475254002F99FF /* SVGKParser.m */, @@ -629,7 +621,6 @@ 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */, 666141E015697534000F3A27 /* SVGKSource.h in Headers */, 666141E815697534000F3A27 /* SVGKImage.h in Headers */, - 666141EA15697534000F3A27 /* SVGKImage+CA.h in Headers */, 666141EE15697534000F3A27 /* SVGKit.h in Headers */, 666141F115697534000F3A27 /* SVGKParser.h in Headers */, 666141FA15697534000F3A27 /* SVGKPattern.h in Headers */, @@ -689,7 +680,6 @@ 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */, 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */, 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */, - 66B79B3115475254002F99FF /* SVGKImage+CA.h in Headers */, 66B79B3915475254002F99FF /* SVGKit.h in Headers */, 66B79B3F15475254002F99FF /* SVGKParser.h in Headers */, 66B79B4D15475254002F99FF /* SVGKPattern.h in Headers */, @@ -845,7 +835,6 @@ 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */, 66B79B2015475254002F99FF /* SVGKSource.m in Sources */, 66B79B3015475254002F99FF /* SVGKImage.m in Sources */, - 66B79B3415475254002F99FF /* SVGKImage+CA.m in Sources */, 66B79B4215475254002F99FF /* SVGKParser.m in Sources */, 66B79B5015475254002F99FF /* SVGKPattern.m in Sources */, 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, @@ -899,7 +888,6 @@ 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */, 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */, 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */, - 66B79B3315475254002F99FF /* SVGKImage+CA.m in Sources */, 66B79B4115475254002F99FF /* SVGKParser.m in Sources */, 66B79B4F15475254002F99FF /* SVGKPattern.m in Sources */, 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, diff --git a/iOS/SVGPathView.m b/iOS/SVGPathView.m index ce37499e0..f36bbf980 100755 --- a/iOS/SVGPathView.m +++ b/iOS/SVGPathView.m @@ -9,7 +9,6 @@ #import "SVGKImage.h" #import "SVGPathElement.h" #import "CGPathAdditions.h" -#import "SVGKImage+CA.h" #if ENABLE_SVGPATHVIEW_CLASS From 55345386f67235d3228c3955aa34d8a5ca581500 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 25 May 2012 02:53:20 +0100 Subject: [PATCH 036/110] Xcode is giving runtime warnings of a major problem - Apple named one of their private, global classes "DOMImplementation", which clashes with the DOM class of the same name. Can we re-use Apple's? I have no idea... --- Core/DOM classes/Core DOM/DOMImplementation.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/DOM classes/Core DOM/DOMImplementation.m b/Core/DOM classes/Core DOM/DOMImplementation.m index 8fba9adc3..aa09833e4 100644 --- a/Core/DOM classes/Core DOM/DOMImplementation.m +++ b/Core/DOM classes/Core DOM/DOMImplementation.m @@ -12,6 +12,8 @@ @implementation DOMImplementation -(BOOL) hasFeature:(NSString*) feature version:(NSString*) version { + NSAssert( FALSE, @"Apple has made a private class with the same name as this class - we have to rename it because ObjectiveC sucks, and Apple used a foolish name, so we CANNOT adhere to the spec now" ); + NSAssert( FALSE, @"Not implemented yet" ); return FALSE; } @@ -19,6 +21,8 @@ -(BOOL) hasFeature:(NSString*) feature version:(NSString*) version // Introduced in DOM Level 2: -(DocumentType*) createDocumentType:(NSString*) qualifiedName publicId:(NSString*) publicId systemId:(NSString*) systemId { + NSAssert( FALSE, @"Apple has made a private class with the same name as this class - we have to rename it because ObjectiveC sucks, and Apple used a foolish name, so we CANNOT adhere to the spec now" ); + NSAssert( FALSE, @"Not implemented yet" ); return nil; } @@ -27,6 +31,8 @@ -(DocumentType*) createDocumentType:(NSString*) qualifiedName publicId:(NSString // Introduced in DOM Level 2: -(Document*) createDocument:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName doctype:(DocumentType*) doctype { + NSAssert( FALSE, @"Apple has made a private class with the same name as this class - we have to rename it because ObjectiveC sucks, and Apple used a foolish name, so we CANNOT adhere to the spec now" ); + NSAssert( FALSE, @"Not implemented yet" ); return nil; } From bae815ffec438e046579091e9ce70ff2d7bd6e24 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 28 May 2012 23:16:52 +0100 Subject: [PATCH 037/110] FIXED demo SVGPad to work with new SVGKImage, but also added support for transform=matrix commands (not fully working yet) For some reason, the test image "a1-Location-European_nation_states" is currently generating commands for "bogus layer size (apple error)" of 3 million pixels. I can't find anything in the code that would cause this! --- Core/DOM classes/SVGDocument.h | 22 ------------------- Core/DOM classes/SVGDocument.m | 22 ------------------- ...=> a1-Location_European_nation_states.svg} | 0 3 files changed, 44 deletions(-) delete mode 100644 Core/DOM classes/SVGDocument.h delete mode 100644 Core/DOM classes/SVGDocument.m rename Samples/{map-test-Location_European_nation_states-adam1.svg => a1-Location_European_nation_states.svg} (100%) diff --git a/Core/DOM classes/SVGDocument.h b/Core/DOM classes/SVGDocument.h deleted file mode 100644 index a7bb3890e..000000000 --- a/Core/DOM classes/SVGDocument.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// SVGDocument.h -// SVGKit -// -// Created by adam on 22/05/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#import - -#import "Document.h" -#import "SVGSVGElement.h" - -@interface SVGDocument : Document - -@property (nonatomic, retain, readonly) NSString* title; -@property (nonatomic, retain, readonly) NSString* referrer; -@property (nonatomic, retain, readonly) NSString* domain; -@property (nonatomic, retain, readonly) NSString* URL; -@property (nonatomic, retain, readonly) SVGSVGElement* rootElement; - -@end diff --git a/Core/DOM classes/SVGDocument.m b/Core/DOM classes/SVGDocument.m deleted file mode 100644 index 367533edc..000000000 --- a/Core/DOM classes/SVGDocument.m +++ /dev/null @@ -1,22 +0,0 @@ -/** - SVGDocument - - SVG spec defines this as part of the DOM version of SVG: - - http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGDocument - */ - -#import "SVGDocument.h" - -#import "SKBasicDataTypes.h" - -@implementation SVGDocument - - -@synthesize title; -@synthesize referrer; -@synthesize domain; -@synthesize URL; -@synthesize rootElement; - -@end diff --git a/Samples/map-test-Location_European_nation_states-adam1.svg b/Samples/a1-Location_European_nation_states.svg similarity index 100% rename from Samples/map-test-Location_European_nation_states-adam1.svg rename to Samples/a1-Location_European_nation_states.svg From 299bdc99947a48a19b49df3e410f9048f18dd699 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 28 May 2012 23:17:29 +0100 Subject: [PATCH 038/110] This is the same commit as the last commit. There is no difference. GitHub is rubbish --- Core/DOM classes/Core DOM/Element.m | 2 +- Core/DOM classes/SVG-DOM/SVGDocument.h | 29 + Core/DOM classes/SVG-DOM/SVGDocument.m | 22 + Core/DOM classes/SVGElement.h | 7 +- Core/DOM classes/SVGElement.m | 17 + Core/DOM classes/SVGGroupElement.m | 3 +- Core/DOM classes/SVGImageElement.m | 8 +- Core/DOM classes/SVGSVGElement.m | 3 +- Core/DOM classes/SVGShapeElement.m | 35 +- Core/DOM classes/SVGTextElement.m | 5 +- Core/Parsing/SVGKParseResult.h | 20 + Core/Parsing/SVGKParseResult.m | 49 ++ Core/Parsing/SVGKParserExtension.h | 38 ++ Core/Parsing/SVGKParserSVG.h | 10 + Core/Parsing/SVGKParserSVG.m | 188 ++++++ Core/Parsing/SVGKPointsAndPathsParser.h | 65 ++ Core/Parsing/SVGKPointsAndPathsParser.m | 581 ++++++++++++++++++ Core/SVGKImage.m | 19 +- Core/SVGKSource.m | 9 +- Core/SVGKit.h | 5 +- .../a1-Location_European_nation_states.svg | 5 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 24 +- .../SVGPadDemo/Classes/DetailViewController.h | 2 +- .../SVGPadDemo/Classes/DetailViewController.m | 4 +- .../SVGPadDemo/Classes/RootViewController.m | 2 +- .../SVGPad.xcodeproj/project.pbxproj | 462 +++++++++----- 26 files changed, 1378 insertions(+), 236 deletions(-) create mode 100644 Core/DOM classes/SVG-DOM/SVGDocument.h create mode 100644 Core/DOM classes/SVG-DOM/SVGDocument.m create mode 100644 Core/Parsing/SVGKParseResult.h create mode 100644 Core/Parsing/SVGKParseResult.m create mode 100644 Core/Parsing/SVGKParserExtension.h create mode 100644 Core/Parsing/SVGKParserSVG.h create mode 100644 Core/Parsing/SVGKParserSVG.m create mode 100644 Core/Parsing/SVGKPointsAndPathsParser.h create mode 100644 Core/Parsing/SVGKPointsAndPathsParser.m diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index 5e6383e44..0e3f9514e 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -32,7 +32,7 @@ -(NSString*) getAttribute:(NSString*) name -(void) setAttribute:(NSString*) name value:(NSString*) value { - Attr* att = [[Attr alloc] initAttr:name value:value]; + Attr* att = [[[Attr alloc] initAttr:name value:value] autorelease]; [self.attributesByName setValue:att forKey:name]; } diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.h b/Core/DOM classes/SVG-DOM/SVGDocument.h new file mode 100644 index 000000000..32300c48c --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGDocument.h @@ -0,0 +1,29 @@ +/* + SVG DOM, cf: + + http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGDocument + + interface SVGDocument : Document, + DocumentEvent { + readonly attribute DOMString title; + readonly attribute DOMString referrer; + readonly attribute DOMString domain; + readonly attribute DOMString URL; + readonly attribute SVGSVGElement rootElement; + }; + */ + +#import + +#import "Document.h" +#import "SVGSVGElement.h" + +@interface SVGDocument : Document + +@property (nonatomic, retain, readonly) NSString* title; +@property (nonatomic, retain, readonly) NSString* referrer; +@property (nonatomic, retain, readonly) NSString* domain; +@property (nonatomic, retain, readonly) NSString* URL; +@property (nonatomic, retain, readonly) SVGSVGElement* rootElement; + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m new file mode 100644 index 000000000..367533edc --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -0,0 +1,22 @@ +/** + SVGDocument + + SVG spec defines this as part of the DOM version of SVG: + + http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGDocument + */ + +#import "SVGDocument.h" + +#import "SKBasicDataTypes.h" + +@implementation SVGDocument + + +@synthesize title; +@synthesize referrer; +@synthesize domain; +@synthesize URL; +@synthesize rootElement; + +@end diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index b206f1ad4..db730598e 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -73,12 +73,17 @@ @protocol SVGLayeredElement < NSObject > /*! + SVG's can be specified in any arbitrary resolution; many on the internet have impossibly huge co-ordinates, e.g. "1 million x 1 million", + but when you render them, you're expected to scale that co-ord down to your local co-ords - e.g. "1024x768" for an iPad 1 screen. So, when + generating layers, we provide the transform that will perform that scale (NB: this is the compound transform from all "viewbox / width,height" + found in higher layers of the tree) + NB: the returned layer has - as its "name" property - the "identifier" property of the SVGElement that created it; but that can be overwritten by applications (for valid reasons), so we ADDITIONALLY store the identifier into a custom key - kSVGElementIdentifier - on the CALayer. Because it's a custom key, it's (almost) guaranteed not to be overwritten / altered by other application code */ -- (CALayer *)newLayer; +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform; - (void)layoutLayer:(CALayer *)layer; @end diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index e0c7f8216..21e7795e2 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -160,6 +160,23 @@ - (void)parseAttributes:(NSDictionary *)attributes { self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); } + else if( [command isEqualToString:@"matrix"] ) + { + CGFloat a = [(NSString*)[parameterStrings objectAtIndex:0] floatValue]; + CGFloat b = [(NSString*)[parameterStrings objectAtIndex:1] floatValue]; + CGFloat c = [(NSString*)[parameterStrings objectAtIndex:2] floatValue]; + CGFloat d = [(NSString*)[parameterStrings objectAtIndex:3] floatValue]; + CGFloat tx = [(NSString*)[parameterStrings objectAtIndex:4] floatValue]; + CGFloat ty = [(NSString*)[parameterStrings objectAtIndex:5] floatValue]; + + CGAffineTransform nt = CGAffineTransformMake(a, b, c, d, tx, ty ); + self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); + + } + else + { + NSLog(@"[%@] ERROR: unsupported SVG transform command (probably legal, but not implemented yet by SVGKit): %@", [self class], command ); + } }]; NSLog(@"[%@] Set local / relative transform = (%2.2f, %2.2f // %2.2f, %2.2f) + (%2.2f, %2.2f translate)", [self class], self.transformRelative.a, self.transformRelative.b, self.transformRelative.c, self.transformRelative.d, self.transformRelative.tx, self.transformRelative.ty ); diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index 402dca4e4..5e0dbc0a4 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -37,7 +37,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { } } -- (CALayer *)newLayer { +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +{ CALayer* _layer = [[CALayerWithChildHitTest layer] retain]; diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 6c7a85e23..4228415c3 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -82,12 +82,16 @@ - (void)parseAttributes:(NSDictionary *)attributes { } } -- (CALayer *)newLayer { +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +{ __block CALayer *layer = [[CALayer layer] retain]; layer.name = self.identifier; [layer setValue:self.identifier forKey:kSVGElementIdentifier]; - layer.frame = CGRectMake(_x, _y, _width, _height); + + CGRect frame = CGRectMake(_x, _y, _width, _height); + frame = CGRectApplyAffineTransform(frame, preTransform); + layer.frame = frame; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:_href]]; diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index ae511f583..826013301 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -20,6 +20,7 @@ -(void)dealloc { self.graphicsGroups = nil; self.anonymousGraphicsGroups = nil; + self.viewBoxFrame = CGRectNull; [super dealloc]; } @@ -61,7 +62,7 @@ - (SVGElement *)findFirstElementOfClass:(Class)class { return nil; } -- (CALayer *)newLayer +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { CALayer* _layer = [[CALayerWithChildHitTest layer] retain]; diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index e8c0a0f0e..edc6bb233 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -12,7 +12,7 @@ #import "SVGKPattern.h" #import "CAShapeLayerWithHitTest.h" -#define ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE 0 +#define ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE 1 @implementation SVGShapeElement @@ -111,7 +111,7 @@ - (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath { } } -- (CALayer *) newLayer { +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { CAShapeLayer* _shapeLayer = [[CAShapeLayerWithHitTest layer] retain]; _shapeLayer.name = self.identifier; [_shapeLayer setValue:self.identifier forKey:kSVGElementIdentifier]; @@ -130,15 +130,6 @@ - (CALayer *) newLayer { _shapeLayer.borderWidth = 1.0f; #endif -#if ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE - To fix this, and to test the code that follows, you need to: - - 1. create a simple SVG file with a single square - 2. Set the viewport to be straingely shaped (e.g. a fat short rectangle) - 3. set the square to fill the exact bottom right of viewport - - ...which will let you see easily if/when the viewbox is being correctly used to scale the contents - /** We've parsed this shape using the size values specified RAW inside the SVG. @@ -149,23 +140,12 @@ - (CALayer *) newLayer { attribute on the SVG document. As per the SVG spec, this defines an alternative conversion from unit space to screenspace */ -#endif CGAffineTransform transformFromSVGUnitsToScreenUnits; - - #if ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE - if( CGRectIsNull( self.document.viewBoxFrame ) ) -#endif - transformFromSVGUnitsToScreenUnits = CGAffineTransformIdentity; - #if ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE - else - transformFromSVGUnitsToScreenUnits = CGAffineTransformMakeScale( self.document.width / self.document.viewBoxFrame.size.width, - self.document.height / self.document.viewBoxFrame.size.height ); -#endif CGMutablePathRef pathToPlaceInLayer = CGPathCreateMutable(); - CGPathAddPath( pathToPlaceInLayer, &transformFromSVGUnitsToScreenUnits, _pathRelative); + CGPathAddPath( pathToPlaceInLayer, &preTransform, _pathRelative); - CGRect rect = CGRectIntegral(CGPathGetPathBoundingBox( pathToPlaceInLayer )); + CGRect rect = CGPathGetPathBoundingBox( pathToPlaceInLayer ); CGPathRef finalPath = CGPathCreateByOffsettingPath( pathToPlaceInLayer, rect.origin.x, rect.origin.y ); @@ -176,13 +156,6 @@ - (CALayer *) newLayer { CGPathRelease(pathToPlaceInLayer); #if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES - /** - ADAM: this is an INCOMPLETE implementation of SVG transform. The original code only deals with offsets (translate). - We're actually correctly parsing + calculating SVG's arbitrary transforms - but it will require a lot more work at - this point here to interpret those arbitrary transforms correctly. - - For now, we're just going to assume we're only doing translates. - */ /** NB: this line, by changing the FRAME of the layer, has the side effect of also changing the CGPATH's position in absolute space! diff --git a/Core/DOM classes/SVGTextElement.m b/Core/DOM classes/SVGTextElement.m index b31100867..d4d8b225e 100644 --- a/Core/DOM classes/SVGTextElement.m +++ b/Core/DOM classes/SVGTextElement.m @@ -73,7 +73,8 @@ - (void)parseAttributes:(NSDictionary *)attributes } -- (CALayer *) newLayer { +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +{ #if TARGET_OS_IPHONE NSString* textToDraw = self.stringValue; @@ -85,7 +86,7 @@ - (CALayer *) newLayer { [label setName:self.identifier]; [label setFont:_fontFamily]; [label setFontSize:_fontSize]; - [label setFrame:CGRectMake(_x, _y, sizeOfTextRect.width, sizeOfTextRect.height)]; + [label setFrame:CGRectApplyAffineTransform( CGRectMake(_x, _y, sizeOfTextRect.width, sizeOfTextRect.height), preTransform ) ]; [label setString:textToDraw]; [label setAlignmentMode:kCAAlignmentLeft]; [label setForegroundColor:[[UIColor blackColor] CGColor]]; diff --git a/Core/Parsing/SVGKParseResult.h b/Core/Parsing/SVGKParseResult.h new file mode 100644 index 000000000..3fe8437e2 --- /dev/null +++ b/Core/Parsing/SVGKParseResult.h @@ -0,0 +1,20 @@ +/** + Reports detailed information from an attempted run of the SVG Parser + */ +#import + +#import "SVGElement.h" + +@interface SVGKParseResult : NSObject + +@property(nonatomic, retain) NSMutableArray* warnings, * errorsRecoverable, * errorsFatal; +@property(nonatomic) BOOL libXMLFailed; + +@property(nonatomic,retain) SVGElement* rootOfSVGTree; + +-(void) addSourceError:(NSError*) fatalError; +-(void) addParseWarning:(NSError*) warning; +-(void) addParseErrorRecoverable:(NSError*) recoverableError; +-(void) addParseErrorFatal:(NSError*) fatalError; +-(void) addSAXError:(NSError*) saxError; +@end diff --git a/Core/Parsing/SVGKParseResult.m b/Core/Parsing/SVGKParseResult.m new file mode 100644 index 000000000..6d6df517b --- /dev/null +++ b/Core/Parsing/SVGKParseResult.m @@ -0,0 +1,49 @@ +#import "SVGKParseResult.h" + +@implementation SVGKParseResult + +@synthesize libXMLFailed; +@synthesize rootOfSVGTree; +@synthesize warnings, errorsRecoverable, errorsFatal; + +- (id)init +{ + self = [super init]; + if (self) { + self.warnings = [NSMutableArray array]; + self.errorsRecoverable = [NSMutableArray array]; + self.errorsFatal = [NSMutableArray array]; + } + return self; +} +-(void) addSourceError:(NSError*) fatalError +{ + NSLog(@"[%@] SVG ERROR: %@", [self class], fatalError); + [self.errorsRecoverable addObject:fatalError]; +} + +-(void) addParseWarning:(NSError*) warning +{ + NSLog(@"[%@] SVG WARNING: %@", [self class], warning); + [self.warnings addObject:warning]; +} + +-(void) addParseErrorRecoverable:(NSError*) recoverableError +{ + NSLog(@"[%@] SVG WARNING (recoverable): %@", [self class], recoverableError); + [self.errorsRecoverable addObject:recoverableError]; +} + +-(void) addParseErrorFatal:(NSError*) fatalError +{ + NSLog(@"[%@] SVG ERROR: %@", [self class], fatalError); + [self.errorsFatal addObject:fatalError]; +} + +-(void) addSAXError:(NSError*) saxError +{ + NSLog(@"[%@] SVG ERROR: %@", [self class], [saxError localizedDescription]); + [self.errorsFatal addObject:saxError]; +} + +@end diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h new file mode 100644 index 000000000..cf35cd6e1 --- /dev/null +++ b/Core/Parsing/SVGKParserExtension.h @@ -0,0 +1,38 @@ +/** + SVGParserExtension.h + + A protocol that lets us split "parsing an SVG" into lots of smaller parsing classes + + PARSING + --- + Actual parsing of an SVG is split into three places: + + 1. High level, XML parsing: SVGParser + 2. ALL THE REST, this class: parsing the structure of a document, and special XML tags: any class that extends "SVGParserExtension" + + */ + +#import + +#import "SVGKSource.h" + +@protocol SVGKParserExtension + +/*! Array of URI's as NSString's, one string for each XMLnamespace that this parser-extension can parse + * + * e.g. the main parser returns "[NSArray arrayWithObjects:@"http://www.w3.org/2000/svg", nil];" + */ +-(NSArray*) supportedNamespaces; + +/*! Array of NSString's, one string for each XML tag (within a supported namespace!) that this parser-extension can parse + * + * e.g. the main parser returns "[NSArray arrayWithObjects:@"svg", @"title", @"defs", @"path", @"line", @"circle", ...etc... , nil];" + */ +-(NSArray*) supportedTags; + +- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent;// NOT SURE IF THIS IS NEEDED ANYWHERE ANY MORE: inDocument:(SVGSource*) svgSource; +-(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; +-(BOOL) createdItemShouldStoreContent:(NSObject*) item; + +@end diff --git a/Core/Parsing/SVGKParserSVG.h b/Core/Parsing/SVGKParserSVG.h new file mode 100644 index 000000000..3d1a08992 --- /dev/null +++ b/Core/Parsing/SVGKParserSVG.h @@ -0,0 +1,10 @@ +#import + +#import "SVGKParser.h" + +@interface SVGKParserSVG : NSObject { + NSMutableDictionary *_graphicsGroups; + NSMutableArray *_anonymousGraphicsGroups; +} + +@end diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m new file mode 100644 index 000000000..04fb046ad --- /dev/null +++ b/Core/Parsing/SVGKParserSVG.m @@ -0,0 +1,188 @@ +#import "SVGKParserSVG.h" + +#import "SVGSVGElement.h" +#import "SVGCircleElement.h" +#import "SVGDefsElement.h" +#import "SVGDescriptionElement.h" +//#import "SVGKSource.h" +#import "SVGEllipseElement.h" +#import "SVGGroupElement.h" +#import "SVGImageElement.h" +#import "SVGLineElement.h" +#import "SVGPathElement.h" +#import "SVGPolygonElement.h" +#import "SVGPolylineElement.h" +#import "SVGRectElement.h" +#import "SVGTitleElement.h" + +@implementation SVGKParserSVG + +static NSDictionary *elementMap; + +- (id)init { + self = [super init]; + if (self) { + + if (!elementMap) { + elementMap = [[NSDictionary dictionaryWithObjectsAndKeys: + [SVGSVGElement class], @"svg", + [SVGCircleElement class], @"circle", + [SVGDefsElement class], @"defs", + [SVGDescriptionElement class], @"description", + [SVGEllipseElement class], @"ellipse", + [SVGGroupElement class], @"g", + [SVGImageElement class], @"image", + [SVGLineElement class], @"line", + [SVGPathElement class], @"path", + [SVGPolygonElement class], @"polygon", + [SVGPolylineElement class], @"polyline", + [SVGRectElement class], @"rect", + [SVGTitleElement class], @"title", nil] retain]; + } + } + return self; +} + +- (void)dealloc { + [_anonymousGraphicsGroups release]; + [_graphicsGroups release]; + + [super dealloc]; +} + +-(NSArray*) supportedNamespaces +{ + return [NSArray arrayWithObjects: + @"http://www.w3.org/2000/svg", + nil]; +} + +/** "tags supported" is exactly the set of all SVGElement subclasses that already exist */ +-(NSArray*) supportedTags +{ + return [NSMutableArray arrayWithArray:[elementMap allKeys]]; +} + +- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { + if( [[self supportedNamespaces] containsObject:prefix] ) + { + Class elementClass = [elementMap objectForKey:name]; + + if (!elementClass) { + elementClass = [SVGElement class]; + NSLog(@"Support for '%@' element has not been implemented", name); + } + + id style = nil; + + if ((style = [attributes objectForKey:@"style"])) { + [attributes removeObjectForKey:@"style"]; + [attributes addEntriesFromDictionary:[SVGKParser NSDictionaryFromCSSAttributes:style]]; + } + + SVGElement *element = [[[elementClass alloc] initWithName:name] autorelease]; + [element parseAttributes:attributes]; + + /** special case: */ + if( [@"svg" isEqualToString:name] ) + { + NSString* svgVersion = nil; + if ((svgVersion = [attributes objectForKey:@"version"])) { + SVGKSource.svgLanguageVersion = svgVersion; + } + } + + + return element; + } + + return nil; +} + +-(BOOL) createdItemShouldStoreContent:(NSObject*) item +{ + if( [item isKindOfClass:[SVGElement class]] ) + { + if ([[item class] shouldStoreContent]) { + return TRUE; + } + else { + return FALSE; + } + } + else + return false; +} + +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent// inDocument:(SVGKSource*) SVGKSource +{ + SVGElement *parentElement = (SVGElement*) parent; + + if( [child isKindOfClass:[SVGElement class]] ) + { + SVGElement *childElement = (SVGElement*) child; + + if ( parent == nil ) // i.e. the root SVG tag + { + NSAssert( [child isKindOfClass:[SVGSVGElement class]], @"Unexpected root element: expected root tag to be an '' tag. Instead found an: %@", childElement.identifier ); + + NSLog(@"[%@] PARSER_INFO: asked to add object to nil parent; i.e. we've hit the root of the tree; setting global variables on the SVG rootElement now", [self class]); + SVGSVGElement *rootSVGElement = (SVGSVGElement*) childElement; + [rootSVGElement setGraphicsGroups:_graphicsGroups]; + [rootSVGElement setAnonymousGraphicsGroups:_anonymousGraphicsGroups]; + + [_graphicsGroups release]; + [_anonymousGraphicsGroups release]; + _graphicsGroups = nil; + _anonymousGraphicsGroups = nil; + + } + else + { + [parentElement addChild:childElement]; + + /*! + SVG Spec attaches special meaning to the "g" tag - and applications + need to be able to pull-out the "g"-tagged items later on + */ + if( [childElement.localName isEqualToString:@"g"] ) + { + if( childElement.identifier == nil ) + { + if( _anonymousGraphicsGroups == nil ) + _anonymousGraphicsGroups = [NSMutableArray new]; + + [_anonymousGraphicsGroups addObject:childElement]; + +#if PARSER_WARN_FOR_ANONYMOUS_SVG_G_TAGS + NSLog(@"[%@] PARSER_WARN: Found anonymous g tag (tag has no XML 'id=' attribute). Loading OK, but check your SVG file (id tags are highly recommended!)...", [self class] ); +#endif + } + else + { + if( _graphicsGroups == nil ) + _graphicsGroups = [NSMutableDictionary new]; + + [_graphicsGroups setValue:childElement forKey:childElement.identifier]; + } + } + } + } + else + { + /*! + Unknown metadata + */ + + [parentElement addMetadataChild:child]; + } +} + +-(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item +{ + SVGElement* element = (SVGElement*) item; + + [element parseContent:content]; +} + +@end diff --git a/Core/Parsing/SVGKPointsAndPathsParser.h b/Core/Parsing/SVGKPointsAndPathsParser.h new file mode 100644 index 000000000..a6c33e544 --- /dev/null +++ b/Core/Parsing/SVGKPointsAndPathsParser.h @@ -0,0 +1,65 @@ +/*! +// SVGKPointsAndPathsParser.h + + This class really needs to be "upgraded" by wrapping it in a class named + + SVGPathElement + + and naming methods in that new class so that they adhere to the method names used in the official SVG standard's SVGPathElement spec: + + http://www.w3.org/TR/SVG11/paths.html#InterfaceSVGPathElement + + ... + + */ +#import + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +typedef struct SVGCurve +{ + CGPoint c1; + CGPoint c2; + CGPoint p; +} SVGCurve; + +SVGCurve SVGCurveMake(CGFloat cx1, CGFloat cy1, CGFloat cx2, CGFloat cy2, CGFloat px, CGFloat py); +BOOL SVGCurveEqualToCurve(SVGCurve curve1, SVGCurve curve2); + +#define SVGCurveZero SVGCurveMake(0.,0.,0.,0.,0.,0.) + +@interface SVGKPointsAndPathsParser : NSObject + ++ (void) readWhitespace:(NSScanner*)scanner; ++ (void) readCommaAndWhitespace:(NSScanner*)scanner; + ++ (CGFloat) readCoordinate:(NSScanner*)scanner; ++ (CGPoint) readCoordinatePair:(NSScanner*)scanner; + ++ (CGPoint) readMovetoDrawtoCommandGroups:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (CGPoint) readMovetoDrawtoCommandGroup:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (CGPoint) readMovetoDrawto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (CGPoint) readMoveto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (CGPoint) readMovetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; + ++ (CGPoint) readLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (CGPoint) readLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (CGPoint) readVerticalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; ++ (CGPoint) readVerticalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; ++ (CGPoint) readHorizontalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; ++ (CGPoint) readHorizontalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; + ++ (SVGCurve) readCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (SVGCurve) readCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (SVGCurve) readCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; ++ (SVGCurve) readSmoothCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve; ++ (SVGCurve) readSmoothCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve; ++ (SVGCurve) readSmoothCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve; + ++ (CGPoint) readCloseCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; + +@end diff --git a/Core/Parsing/SVGKPointsAndPathsParser.m b/Core/Parsing/SVGKPointsAndPathsParser.m new file mode 100644 index 000000000..140953522 --- /dev/null +++ b/Core/Parsing/SVGKPointsAndPathsParser.m @@ -0,0 +1,581 @@ +#import "SVGKPointsAndPathsParser.h" + +// TODO: support quadratic-bezier-curveto +// TODO: support smooth-quadratic-bezier-curveto +// TODO: support elliptical-arc + +/*! Very useful for debugging the parser - this will output one line of logging + * for every CGPath command that's actually done; you can then compare these lines + * to the input source file, and manually check what's being sent to the renderer + * versus what was expected + */ +#define DEBUG_PATH_CREATION 0 + +inline SVGCurve SVGCurveMake(CGFloat cx1, CGFloat cy1, CGFloat cx2, CGFloat cy2, CGFloat px, CGFloat py) +{ + SVGCurve curve; + curve.c1 = CGPointMake(cx1, cy1); + curve.c2 = CGPointMake(cx2, cy2); + curve.p = CGPointMake(px, py); + return curve; +} +inline BOOL SVGCurveEqualToCurve(SVGCurve curve1, SVGCurve curve2) +{ + return ( + CGPointEqualToPoint(curve1.c1, curve2.c1) + && + CGPointEqualToPoint(curve1.c2, curve2.c2) + && + CGPointEqualToPoint(curve1.p, curve2.p) + ); +} + +@implementation SVGKPointsAndPathsParser + + +/* references + http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataBNF + http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PointsBNF + + */ + +/* + http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataBNF + svg-path: + wsp* moveto-drawto-command-groups? wsp* + moveto-drawto-command-groups: + moveto-drawto-command-group + | moveto-drawto-command-group wsp* moveto-drawto-command-groups + moveto-drawto-command-group: + moveto wsp* drawto-commands? + drawto-commands: + drawto-command + | drawto-command wsp* drawto-commands + drawto-command: + closepath + | lineto + | horizontal-lineto + | vertical-lineto + | curveto + | smooth-curveto + | quadratic-bezier-curveto + | smooth-quadratic-bezier-curveto + | elliptical-arc + moveto: + ( "M" | "m" ) wsp* moveto-argument-sequence + moveto-argument-sequence: + coordinate-pair + | coordinate-pair comma-wsp? lineto-argument-sequence + closepath: + ("Z" | "z") + lineto: + ( "L" | "l" ) wsp* lineto-argument-sequence + lineto-argument-sequence: + coordinate-pair + | coordinate-pair comma-wsp? lineto-argument-sequence + horizontal-lineto: + ( "H" | "h" ) wsp* horizontal-lineto-argument-sequence + horizontal-lineto-argument-sequence: + coordinate + | coordinate comma-wsp? horizontal-lineto-argument-sequence + vertical-lineto: + ( "V" | "v" ) wsp* vertical-lineto-argument-sequence + vertical-lineto-argument-sequence: + coordinate + | coordinate comma-wsp? vertical-lineto-argument-sequence + curveto: + ( "C" | "c" ) wsp* curveto-argument-sequence + curveto-argument-sequence: + curveto-argument + | curveto-argument comma-wsp? curveto-argument-sequence + curveto-argument: + coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair + smooth-curveto: + ( "S" | "s" ) wsp* smooth-curveto-argument-sequence + smooth-curveto-argument-sequence: + smooth-curveto-argument + | smooth-curveto-argument comma-wsp? smooth-curveto-argument-sequence + smooth-curveto-argument: + coordinate-pair comma-wsp? coordinate-pair + quadratic-bezier-curveto: + ( "Q" | "q" ) wsp* quadratic-bezier-curveto-argument-sequence + quadratic-bezier-curveto-argument-sequence: + quadratic-bezier-curveto-argument + | quadratic-bezier-curveto-argument comma-wsp? + quadratic-bezier-curveto-argument-sequence + quadratic-bezier-curveto-argument: + coordinate-pair comma-wsp? coordinate-pair + smooth-quadratic-bezier-curveto: + ( "T" | "t" ) wsp* smooth-quadratic-bezier-curveto-argument-sequence + smooth-quadratic-bezier-curveto-argument-sequence: + coordinate-pair + | coordinate-pair comma-wsp? smooth-quadratic-bezier-curveto-argument-sequence + elliptical-arc: + ( "A" | "a" ) wsp* elliptical-arc-argument-sequence + elliptical-arc-argument-sequence: + elliptical-arc-argument + | elliptical-arc-argument comma-wsp? elliptical-arc-argument-sequence + elliptical-arc-argument: + nonnegative-number comma-wsp? nonnegative-number comma-wsp? + number comma-wsp flag comma-wsp? flag comma-wsp? coordinate-pair + coordinate-pair: + coordinate comma-wsp? coordinate + coordinate: + number + nonnegative-number: + integer-constant + | floating-point-constant + number: + sign? integer-constant + | sign? floating-point-constant + flag: + "0" | "1" + comma-wsp: + (wsp+ comma? wsp*) | (comma wsp*) + comma: + "," + integer-constant: + digit-sequence + floating-point-constant: + fractional-constant exponent? + | digit-sequence exponent + fractional-constant: + digit-sequence? "." digit-sequence + | digit-sequence "." + exponent: + ( "e" | "E" ) sign? digit-sequence + sign: + "+" | "-" + digit-sequence: + digit + | digit digit-sequence + digit: + "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" + */ + +/* + http://www.w3.org/TR/2011/REC-SVG11-20110816/shapes.html#PointsBNF + + list-of-points: + wsp* coordinate-pairs? wsp* + coordinate-pairs: + coordinate-pair + | coordinate-pair comma-wsp coordinate-pairs + coordinate-pair: + coordinate comma-wsp coordinate + | coordinate negative-coordinate + coordinate: + number + number: + sign? integer-constant + | sign? floating-point-constant + negative-coordinate: + "-" integer-constant + | "-" floating-point-constant + comma-wsp: + (wsp+ comma? wsp*) | (comma wsp*) + comma: + "," + integer-constant: + digit-sequence + floating-point-constant: + fractional-constant exponent? + | digit-sequence exponent + fractional-constant: + digit-sequence? "." digit-sequence + | digit-sequence "." + exponent: + ( "e" | "E" ) sign? digit-sequence + sign: + "+" | "-" + digit-sequence: + digit + | digit digit-sequence + digit: + "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" + */ + +/** + wsp: + (#x20 | #x9 | #xD | #xA) + */ ++ (void) readWhitespace:(NSScanner*)scanner +{ + + NSCharacterSet* whitespace = [NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@"%c%c%c%c", 0x20, 0x9, 0xD, 0xA]]; + [scanner scanCharactersFromSet:whitespace + intoString:NULL]; +} + ++ (void) readCommaAndWhitespace:(NSScanner*)scanner +{ + [SVGKPointsAndPathsParser readWhitespace:scanner]; + static NSString* comma = @","; + [scanner scanString:comma intoString:NULL]; + [SVGKPointsAndPathsParser readWhitespace:scanner]; +} + +/** + moveto-drawto-command-groups: + moveto-drawto-command-group + | moveto-drawto-command-group wsp* moveto-drawto-command-groups + */ ++ (CGPoint) readMovetoDrawtoCommandGroups:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + CGPoint lastCoord = [SVGKPointsAndPathsParser readMovetoDrawtoCommandGroup:scanner path:path relativeTo:origin isRelative:isRelative]; + return lastCoord; +} + +/** + moveto-drawto-command-group: + moveto wsp* drawto-commands? + */ ++ (CGPoint) readMovetoDrawtoCommandGroup:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + CGPoint lastCoord = [SVGKPointsAndPathsParser readMovetoDrawto:scanner path:path relativeTo:origin isRelative:isRelative]; + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + if (![scanner isAtEnd]) { + [SVGKPointsAndPathsParser readWhitespace:scanner]; + lastCoord = [SVGKPointsAndPathsParser readMovetoDrawtoCommandGroup:scanner path:path relativeTo:origin isRelative:isRelative]; + } + + return lastCoord; +} + +/** moveto-drawto-command-group: + moveto wsp* drawto-commands? + */ ++ (CGPoint) readMovetoDrawto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + CGPoint lastMove = [SVGKPointsAndPathsParser readMoveto:scanner path:path relativeTo:origin isRelative:isRelative]; + [SVGKPointsAndPathsParser readWhitespace:scanner]; + return lastMove; +} + +/** + moveto: + ( "M" | "m" ) wsp* moveto-argument-sequence + */ ++ (CGPoint) readMoveto:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Mm"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan move to command"); + if (!ok) return origin; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + CGPoint lastCoordinate = [SVGKPointsAndPathsParser readMovetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; + return lastCoordinate; +} + +/** moveto-argument-sequence: + coordinate-pair + | coordinate-pair comma-wsp? lineto-argument-sequence + */ ++ (CGPoint) readMovetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + CGPoint p = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord = CGPointMake(p.x+origin.x, p.y+origin.y); + CGPathMoveToPoint(path, NULL, coord.x, coord.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: MOVED to %2.2f, %2.2f", [SVGKPointsAndPathsParser class], coord.x, coord.y ); +#endif + + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + if (![scanner isAtEnd]) { + coord = [SVGKPointsAndPathsParser readLinetoArgumentSequence:scanner path:path relativeTo:(isRelative)?coord:origin isRelative:isRelative]; + } + + return coord; +} + +/** + coordinate-pair: + coordinate comma-wsp? coordinate + */ + ++ (CGPoint) readCoordinatePair:(NSScanner*)scanner +{ + CGFloat x = [SVGKPointsAndPathsParser readCoordinate:scanner]; + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + CGFloat y = [SVGKPointsAndPathsParser readCoordinate:scanner]; + + CGPoint p = CGPointMake(x, y); + return p; +} + ++ (CGFloat) readCoordinate:(NSScanner*)scanner +{ + float f; + BOOL ok; + ok = [scanner scanFloat:&f]; + NSAssert(ok, @"invalid coord"); + return f; +} + +/** + lineto: + ( "L" | "l" ) wsp* lineto-argument-sequence + */ ++ (CGPoint) readLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Ll"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan line to command"); + if (!ok) return origin; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + CGPoint lastCoordinate = [SVGKPointsAndPathsParser readLinetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; + return lastCoordinate; +} + +/** + lineto-argument-sequence: + coordinate-pair + | coordinate-pair comma-wsp? lineto-argument-sequence + */ ++ (CGPoint) readLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + CGPoint p = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord = CGPointMake(p.x+origin.x, p.y+origin.y); + CGPathAddLineToPoint(path, NULL, coord.x, coord.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: LINE to %2.2f, %2.2f", [SVGKPointsAndPathsParser class], coord.x, coord.y ); +#endif + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + if (![scanner isAtEnd]) { + coord = [SVGKPointsAndPathsParser readLinetoArgumentSequence:scanner path:path relativeTo:(isRelative)?coord:origin isRelative:isRelative]; + } + + return coord; +} + +/** + curveto: + ( "C" | "c" ) wsp* curveto-argument-sequence + */ ++ (SVGCurve) readCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Cc"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan curve to command"); + if (!ok) return SVGCurveZero; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + SVGCurve lastCurve = [SVGKPointsAndPathsParser readCurvetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; + return lastCurve; +} + +/** + curveto-argument-sequence: + curveto-argument + | curveto-argument comma-wsp? curveto-argument-sequence + */ ++ (SVGCurve) readCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + SVGCurve curve = [SVGKPointsAndPathsParser readCurvetoArgument:scanner path:path relativeTo:origin]; + + if (![scanner isAtEnd]) { + curve = [SVGKPointsAndPathsParser readCurvetoArgumentSequence:scanner path:path relativeTo:(isRelative ? curve.p : origin) isRelative:isRelative]; + } + + return curve; +} +/** + curveto-argument: + coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair + */ ++ (SVGCurve) readCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + CGPoint p1 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord1 = CGPointMake(p1.x+origin.x, p1.y+origin.y); + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + CGPoint p2 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord2 = CGPointMake(p2.x+origin.x, p2.y+origin.y); + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + CGPoint p3 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord3 = CGPointMake(p3.x+origin.x, p3.y+origin.y); + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + CGPathAddCurveToPoint(path, NULL, coord1.x, coord1.y, coord2.x, coord2.y, coord3.x, coord3.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: CURVE to (%2.2f, %2.2f)..(%2.2f, %2.2f)..(%2.2f, %2.2f)", [SVGKPointsAndPathsParser class], coord1.x, coord1.y, coord2.x, coord2.y, coord3.x, coord3.y ); +#endif + + return SVGCurveMake(coord1.x, coord1.y, coord2.x, coord2.y, coord3.x, coord3.y); +} + +/** + smooth-curveto: + ( "S" | "s" ) wsp* smooth-curveto-argument-sequence + */ ++ (SVGCurve) readSmoothCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Ss"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan smooth curve to command"); + if (!ok) return SVGCurveZero; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + SVGCurve lastCurve = [SVGKPointsAndPathsParser readSmoothCurvetoArgumentSequence:scanner path:path relativeTo:origin withPrevCurve:prevCurve]; + return lastCurve; +} + +/** + smooth-curveto-argument-sequence: + smooth-curveto-argument + | smooth-curveto-argument comma-wsp? smooth-curveto-argument-sequence + */ ++ (SVGCurve) readSmoothCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve +{ + SVGCurve curve = [SVGKPointsAndPathsParser readSmoothCurvetoArgument:scanner path:path relativeTo:origin withPrevCurve:prevCurve]; + + if (![scanner isAtEnd]) { + curve = [SVGKPointsAndPathsParser readSmoothCurvetoArgumentSequence:scanner path:path relativeTo:origin withPrevCurve:prevCurve]; + } + + return curve; +} + +/** + smooth-curveto-argument: + coordinate-pair comma-wsp? coordinate-pair + */ ++ (SVGCurve) readSmoothCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin withPrevCurve:(SVGCurve)prevCurve +{ + CGPoint p1 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord1 = CGPointMake(p1.x+origin.x, p1.y+origin.y); + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + CGPoint p2 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord2 = CGPointMake(p2.x+origin.x, p2.y+origin.y); + + SVGCurve thisCurve; + if (SVGCurveEqualToCurve(SVGCurveZero, prevCurve)) { + // assume control point is coincident with the current point + thisCurve = SVGCurveMake(coord1.x, coord1.y, coord2.x, coord2.y, coord1.x, coord1.y); + } else { + // calculate the mirror of the previous control point + CGPoint currentPoint = prevCurve.p; + CGPoint controlPoint = prevCurve.c2; + CGPoint mirrorCoord = CGPointMake(currentPoint.x+(currentPoint.x-controlPoint.x), currentPoint.y+(currentPoint.y-controlPoint.y)); + thisCurve = SVGCurveMake(mirrorCoord.x, mirrorCoord.y, coord1.x, coord1.y, coord2.x, coord2.y); + } + + CGPathAddCurveToPoint(path, NULL, thisCurve.c1.x, thisCurve.c1.y, thisCurve.c2.x, thisCurve.c2.y, thisCurve.p.x, thisCurve.p.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: SMOOTH CURVE to (%2.2f, %2.2f)..(%2.2f, %2.2f)..(%2.2f, %2.2f)", [SVGKPointsAndPathsParser class], thisCurve.c1.x, thisCurve.c1.y, thisCurve.c2.x, thisCurve.c2.y, thisCurve.p.x, thisCurve.p.y ); +#endif + + return thisCurve; +} + +/** + vertical-lineto-argument-sequence: + coordinate + | coordinate comma-wsp? vertical-lineto-argument-sequence + */ ++ (CGPoint) readVerticalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + CGFloat yValue = [SVGKPointsAndPathsParser readCoordinate:scanner]; + CGPoint vertCoord = CGPointMake(origin.x, origin.y+yValue); + CGPoint currentPoint = CGPathGetCurrentPoint(path); + CGPoint coord = CGPointMake(currentPoint.x, currentPoint.y+(vertCoord.y-currentPoint.y)); + CGPathAddLineToPoint(path, NULL, coord.x, coord.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: VERTICAL LINE to (%2.2f, %2.2f)", [SVGKPointsAndPathsParser class], coord.x, coord.y ); +#endif + return coord; +} + +/** + vertical-lineto: + ( "V" | "v" ) wsp* vertical-lineto-argument-sequence + */ ++ (CGPoint) readVerticalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Vv"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan vertical line to command"); + if (!ok) return origin; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + CGPoint lastCoordinate = [SVGKPointsAndPathsParser readVerticalLinetoArgumentSequence:scanner path:path relativeTo:origin]; + return lastCoordinate; +} + +/** + horizontal-lineto-argument-sequence: + coordinate + | coordinate comma-wsp? horizontal-lineto-argument-sequence + */ ++ (CGPoint) readHorizontalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + CGFloat xValue = [SVGKPointsAndPathsParser readCoordinate:scanner]; + CGPoint horizCoord = CGPointMake(origin.x+xValue, origin.y); + CGPoint currentPoint = CGPathGetCurrentPoint(path); + CGPoint coord = CGPointMake(currentPoint.x+(horizCoord.x-currentPoint.x), currentPoint.y); + CGPathAddLineToPoint(path, NULL, coord.x, coord.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: HORIZONTAL LINE to (%2.2f, %2.2f)", [SVGKPointsAndPathsParser class], coord.x, coord.y ); +#endif + return coord; +} + +/** + horizontal-lineto: + ( "H" | "h" ) wsp* horizontal-lineto-argument-sequence + */ ++ (CGPoint) readHorizontalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Hh"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan horizontal line to command"); + if (!ok) return origin; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + CGPoint lastCoordinate = [SVGKPointsAndPathsParser readHorizontalLinetoArgumentSequence:scanner path:path relativeTo:origin]; + return lastCoordinate; +} + ++ (CGPoint) readCloseCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Zz"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan close command"); + if (!ok) return origin; + + CGPathCloseSubpath(path); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: finished path", [SVGKPointsAndPathsParser class] ); +#endif + + return origin; +} + +@end diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index e7b5df63c..be999af4b 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -222,8 +222,8 @@ - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { return nil; } -- (CALayer *)newLayerWithElement:(SVGElement *)element { - CALayer *layer = [element newLayer]; +- (CALayer *)newLayerWithElement:(SVGElement *)element preTransform:(CGAffineTransform) preTransform { + CALayer *layer = [element newLayerPreTransformed:preTransform]; NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), element.identifier); @@ -233,7 +233,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element { for (SVGElement *child in element.children) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - CALayer *sublayer = [self newLayerWithElement:(id)child]; + CALayer *sublayer = [self newLayerWithElement:(id)child preTransform:preTransform]; if (!sublayer) { continue; @@ -257,7 +257,18 @@ -(CALayer *)newLayerTree if( self.DOMTree == nil ) return nil; else - return [self newLayerWithElement:self.DOMTree]; + { + CGAffineTransform preTransform = CGAffineTransformIdentity; + + // TODO: calc the correct transform! + CGRect frameViewBox = self.DOMTree.viewBoxFrame; + CGRect frameImage = CGRectMake(0,0, SVGLengthAsPixels( self.DOMTree.documentWidth), SVGLengthAsPixels( self.DOMTree.documentHeight ) ); + + if( ! CGRectIsEmpty( frameViewBox ) ) + preTransform = CGAffineTransformMakeScale( frameImage.size.width / frameViewBox.size.width, frameImage.size.height / frameViewBox.size.height); + + return [self newLayerWithElement:self.DOMTree preTransform:preTransform]; + } } -(CALayer *)CALayerTree diff --git a/Core/SVGKSource.m b/Core/SVGKSource.m index 5a7b3dd9e..961154af0 100644 --- a/Core/SVGKSource.m +++ b/Core/SVGKSource.m @@ -50,7 +50,7 @@ -(id) newHandle:(NSError**) error NSURLRequest* request = [NSURLRequest requestWithURL:self.URL]; - httpData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error]; + httpData = [[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error] retain]; if( error != nil ) { @@ -67,11 +67,14 @@ -(id) newHandle:(NSError**) error file = fopen(cPath, "r"); if (!file) - *error = [NSError errorWithDomain:@"SVGKit" code:1 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + { + if( error != nil ) + *error = [NSError errorWithDomain:@"SVGKit" code:1 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"Couldn't open the file %@ for reading", self.filePath], NSLocalizedDescriptionKey, nil]]; + } - return [NSValue valueWithPointer:file]; // objc cannot cope with using C-pointers as pointers, without some help + return [[NSValue valueWithPointer:file] retain]; // objc cannot cope with using C-pointers as pointers, without some help } } diff --git a/Core/SVGKit.h b/Core/SVGKit.h index ea2948a99..9aff020a0 100644 --- a/Core/SVGKit.h +++ b/Core/SVGKit.h @@ -12,11 +12,10 @@ #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" #import "SVGKImage.h" - #import "SVGKImage+CA.h" #import "SVGElement.h" #import "SVGEllipseElement.h" #import "SVGGroupElement.h" - #import "SVGKImageElement.h" + #import "SVGImageElement.h" #import "SVGLineElement.h" #import "SVGPathElement.h" #import "SVGPolygonElement.h" @@ -26,7 +25,7 @@ #import "SVGKSource.h" #import "SVGTitleElement.h" #import "SVGUtils.h" - #import "SVGView.h" + #import "SVGKView.h" #import "SVGPathView.h" #import "SVGKPattern.h" #else diff --git a/Samples/a1-Location_European_nation_states.svg b/Samples/a1-Location_European_nation_states.svg index 095eb9659..aca253092 100644 --- a/Samples/a1-Location_European_nation_states.svg +++ b/Samples/a1-Location_European_nation_states.svg @@ -16,12 +16,12 @@ id="svg6785" sodipodi:version="0.32" inkscape:version="0.48+devel r9812" - sodipodi:docname="map-test-Location_European_nation_states-adam1.svg" + sodipodi:docname="a1-Location_European_nation_states.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.0">image/svg+xml Date: Tue, 29 May 2012 01:00:24 +0100 Subject: [PATCH 039/110] FIXED: Europe example now renders an extra couple of countries. NB: this also adds support for some transform=matrix SVG's --- Core/DOM classes/SVGElement.m | 5 ++++- Core/DOM classes/SVGGroupElement.m | 6 ++++-- Core/DOM classes/SVGShapeElement.m | 25 +++++++++++++++++++------ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 21e7795e2..98892497b 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -193,8 +193,11 @@ -(CGAffineTransform) transformAbsolute else { CGAffineTransform inheritedTransform = [self.parent transformAbsolute]; + CGAffineTransform localTransform = self.transformRelative; // Apple's debugger is appallingly bad - return CGAffineTransformConcat( inheritedTransform, self.transformRelative ); + CGAffineTransform absoluteTransform = CGAffineTransformConcat( self.transformRelative, inheritedTransform ); + + return absoluteTransform; } } #endif diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index 5e0dbc0a4..2e0051e78 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -61,11 +61,13 @@ - (void)layoutLayer:(CALayer *)layer { for (NSUInteger n = 0; n < [sublayers count]; n++) { CALayer *currentLayer = [sublayers objectAtIndex:n]; + CGRect subLayerFrame = currentLayer.frame; + if (n == 0) { - mainRect = currentLayer.frame; + mainRect = subLayerFrame; } else { - mainRect = CGRectUnion(mainRect, currentLayer.frame); + mainRect = CGRectUnion(mainRect, subLayerFrame); } } diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index edc6bb233..0ed4f3128 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -139,15 +139,25 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { Most SVG docs have screenspace == unit space - but some docs have an explicit "viewBox" attribute on the SVG document. As per the SVG spec, this defines an alternative conversion from unit space to screenspace + + NB: if you DO NOT do this, many SVG's will *crash* your system, because they use ultra-large co-ordinate systems, + and "assume" you will scale them down to sane numbers before rendering. e.g. many Wikipedia maps are specified in + "hundreds of thousands" of pixels (or higher) - which would lead to multi-gigabyte images in memory, enough to crash + most OS's */ - CGAffineTransform transformFromSVGUnitsToScreenUnits; + CGAffineTransform transformAbsoluteThenGlobalViewBoxFix = CGAffineTransformConcat(svgEffectiveTransform, preTransform); CGMutablePathRef pathToPlaceInLayer = CGPathCreateMutable(); - CGPathAddPath( pathToPlaceInLayer, &preTransform, _pathRelative); + CGPathAddPath( pathToPlaceInLayer, &transformAbsoluteThenGlobalViewBoxFix, _pathRelative); - CGRect rect = CGPathGetPathBoundingBox( pathToPlaceInLayer ); + CGRect rect = CGPathGetPathBoundingBox( _pathRelative ); + CGRect unTransformedPathBB = CGPathGetBoundingBox( _pathRelative ); + CGRect transformedPathBB = CGPathGetBoundingBox( pathToPlaceInLayer ); - CGPathRef finalPath = CGPathCreateByOffsettingPath( pathToPlaceInLayer, rect.origin.x, rect.origin.y ); + /** NB: when we set the _shapeLayer.frame, it has a *side effect* of moving the path itself - so, in order to prevent that, + because Apple didn't provide a BOOL to disable that "feature", we have to pre-shift the path forwards by the amount it + will be shifted backwards */ + CGPathRef finalPath = CGPathCreateByOffsettingPath( pathToPlaceInLayer, transformedPathBB.origin.x, transformedPathBB.origin.y ); /** Can't use this - iOS 5 only! path = CGPathCreateCopyByTransformingPath(path, transformFromSVGUnitsToScreenUnits ); */ @@ -158,13 +168,16 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { #if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES /** NB: this line, by changing the FRAME of the layer, has the side effect of also changing the CGPATH's position in absolute - space! + space! This is why we needed the "CGPathRef finalPath =" line a few lines above... */ - _shapeLayer.frame = CGRectApplyAffineTransform( rect, svgEffectiveTransform ); + _shapeLayer.frame = CGRectApplyAffineTransform( rect, CGAffineTransformConcat( svgEffectiveTransform, preTransform ) ); + #else _shapeLayer.frame = rect; #endif + CGRect shapeLayerFrame = _shapeLayer.frame; + if (_strokeWidth) { _shapeLayer.lineWidth = _strokeWidth; _shapeLayer.strokeColor = CGColorWithSVGColor(_strokeColor); From 6b1bccab587e04d303a1038a0a95cb489697fb41 Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 29 May 2012 01:27:42 +0100 Subject: [PATCH 040/110] FIXED: Europe now renders correctly! Most SVG's using matrix transforms should now be fine! --- Core/DOM classes/SVGElement.h | 6 ---- Core/DOM classes/SVGElement.m | 15 ++-------- Core/DOM classes/SVGShapeElement.m | 16 ++++------- .../a1-Location_European_nation_states.svg | 28 +++++++++---------- 4 files changed, 22 insertions(+), 43 deletions(-) diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index db730598e..cc54977f5 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -18,8 +18,6 @@ */ #import -#define EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES 1 - @interface SVGElement : NSObject { @private NSMutableArray *_children; @@ -36,12 +34,10 @@ @property (nonatomic, retain) NSMutableArray* metadataChildren; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES /*! Transform to be applied to this node and all sub-nodes; does NOT take account of any transforms applied by parent / ancestor nodes */ @property (nonatomic) CGAffineTransform transformRelative; /*! Required by SVG transform and SVG viewbox: you have to be able to query your parent nodes at all times to find out your actual values */ @property (nonatomic, retain) SVGElement *parent; -#endif #pragma mark - ORIGINALLY PACKAGE-PROTECTED - (void)parseAttributes:(NSDictionary *)attributes; @@ -62,10 +58,8 @@ /*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; */ - (void)parseAttributes:(NSDictionary *)attributes; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES /*! Re-calculates the absolute transform on-demand by querying parent's absolute transform and appending self's relative transform */ -(CGAffineTransform) transformAbsolute; -#endif @end diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 98892497b..354254923 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -30,10 +30,8 @@ @implementation SVGElement @synthesize stringValue = _stringValue; @synthesize localName = _localName; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES @synthesize parent = _parent; @synthesize transformRelative = _transformRelative; -#endif @synthesize identifier = _identifier; @@ -48,9 +46,7 @@ - (id)init { if (self) { [self loadDefaults]; _children = [[NSMutableArray alloc] init]; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES self.transformRelative = CGAffineTransformIdentity; -#endif self.metadataChildren = [NSMutableArray array]; } return self; @@ -60,9 +56,7 @@ - (id)initWithName:(NSString *)name { self = [self init]; if (self) { _localName = [name retain]; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES self.transformRelative = CGAffineTransformIdentity; -#endif } return self; } @@ -83,9 +77,7 @@ - (void)loadDefaults { - (void)addChild:(SVGElement *)element { [_children addObject:element]; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES element.parent = self; -#endif } -(void) addMetadataChild:(NSObject*) child @@ -103,7 +95,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { _identifier = [value copy]; } -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES + /** http://www.w3.org/TR/SVG/coords.html#TransformAttribute @@ -132,7 +124,7 @@ - (void)parseAttributes:(NSDictionary *)attributes { */ #if !(TARGET_OS_IPHONE) && ( !defined( __MAC_10_7 ) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6_7 ) - NSLog(@"[%@] WARNING: the transform attribute requires OS X 10.7 or above. Ignoring TRANSFORMs in SVG!", [self class] ); + NSLog(@"[%@] WARNING: the transform attribute requires OS X 10.7 or above (we need Regular Expressions! Apple was slow to add them :( ). Ignoring TRANSFORMs in SVG!", [self class] ); #else NSError* error = nil; NSRegularExpression* regexpTransformListItem = [NSRegularExpression regularExpressionWithPattern:@"[^\\(,]*\\([^\\)]*\\)" options:0 error:&error]; @@ -182,10 +174,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { NSLog(@"[%@] Set local / relative transform = (%2.2f, %2.2f // %2.2f, %2.2f) + (%2.2f, %2.2f translate)", [self class], self.transformRelative.a, self.transformRelative.b, self.transformRelative.c, self.transformRelative.d, self.transformRelative.tx, self.transformRelative.ty ); #endif } -#endif } -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES -(CGAffineTransform) transformAbsolute { if( self.parent == nil ) @@ -200,7 +190,6 @@ -(CGAffineTransform) transformAbsolute return absoluteTransform; } } -#endif - (void)parseContent:(NSString *)content { self.stringValue = content; diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 0ed4f3128..92d5bfa0c 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -12,8 +12,6 @@ #import "SVGKPattern.h" #import "CAShapeLayerWithHitTest.h" -#define ADAM_IS_FIXING_THE_TRANSFORM_AND_VIEW_BOX_CODE 1 - @implementation SVGShapeElement #define IDENTIFIER_LEN 256 @@ -117,9 +115,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { [_shapeLayer setValue:self.identifier forKey:kSVGElementIdentifier]; _shapeLayer.opacity = _opacity; -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES CGAffineTransform svgEffectiveTransform = [self transformAbsolute]; -#endif #if OUTLINE_SHAPES @@ -165,21 +161,21 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { CGPathRelease(finalPath); CGPathRelease(pathToPlaceInLayer); -#if EXPERIMENTAL_SUPPORT_FOR_SVG_TRANSFORM_ATTRIBUTES /** NB: this line, by changing the FRAME of the layer, has the side effect of also changing the CGPATH's position in absolute space! This is why we needed the "CGPathRef finalPath =" line a few lines above... */ _shapeLayer.frame = CGRectApplyAffineTransform( rect, CGAffineTransformConcat( svgEffectiveTransform, preTransform ) ); -#else - _shapeLayer.frame = rect; -#endif - CGRect shapeLayerFrame = _shapeLayer.frame; if (_strokeWidth) { - _shapeLayer.lineWidth = _strokeWidth; + /* + We have to apply any scale-factor part of the affine transform to the stroke itself (this is bizarre and horrible, yes, but that's the spec for you!) + */ + CGPoint fakePoint = CGPointMake( _strokeWidth, 0); + fakePoint = CGPointApplyAffineTransform( fakePoint, preTransform ); + _shapeLayer.lineWidth = fakePoint.x; _shapeLayer.strokeColor = CGColorWithSVGColor(_strokeColor); } diff --git a/Samples/a1-Location_European_nation_states.svg b/Samples/a1-Location_European_nation_states.svg index aca253092..4f4381bfc 100644 --- a/Samples/a1-Location_European_nation_states.svg +++ b/Samples/a1-Location_European_nation_states.svg @@ -148,7 +148,20 @@ + + @@ -593,20 +606,7 @@ - - - + From 24656180cb70ad07222aa9591dfa932b357e515a Mon Sep 17 00:00:00 2001 From: adamgit Date: Tue, 29 May 2012 01:37:18 +0100 Subject: [PATCH 041/110] Simplified map names, updated the licenses.txt to be accurate --- ...n_states.svg => Europe_states_reduced.svg} | 0 Samples/Sample Licenses.txt | 9 ++++++- ...s_blank.svg => australia_states_blank.svg} | 0 ...n_nation_states-ukonly.svg => uk-only.svg} | 0 .../SVGPadDemo/Classes/RootViewController.m | 2 +- .../SVGPad.xcodeproj/project.pbxproj | 24 +++++++++---------- 6 files changed, 21 insertions(+), 14 deletions(-) rename Samples/{a1-Location_European_nation_states.svg => Europe_states_reduced.svg} (100%) rename Samples/{map-test-australia_states_blank.svg => australia_states_blank.svg} (100%) rename Samples/{map-test-Location_European_nation_states-ukonly.svg => uk-only.svg} (100%) diff --git a/Samples/a1-Location_European_nation_states.svg b/Samples/Europe_states_reduced.svg similarity index 100% rename from Samples/a1-Location_European_nation_states.svg rename to Samples/Europe_states_reduced.svg diff --git a/Samples/Sample Licenses.txt b/Samples/Sample Licenses.txt index 071ee972a..44a239f82 100644 --- a/Samples/Sample Licenses.txt +++ b/Samples/Sample Licenses.txt @@ -2,6 +2,10 @@ This file exists to document where each sample file came from, in case anyone ne Also, it's helpful to know which SVG-editing software created / exported each file - helps us to check compatibility with particular editors. +australia_states_blank.svg + -- Creative Commons + -- http://commons.wikimedia.org/wiki/File:Australia_states_blank.svg + Blank_Map-Africa.svg -- Public Domain, c.f. - http://en.wikipedia.org/wiki/File:Blank_Map-Africa.svg @@ -18,4 +22,7 @@ test-wave-1.svg Location_European_nation_states -- Creative Commons - -- http://en.wikipedia.org/wiki/File:Location_European_nation_states.svg \ No newline at end of file + -- http://en.wikipedia.org/wiki/File:Location_European_nation_states.svg + + uk-only.svg, Europe_states_reduced.svg + -- Adam Martin's modified versions of Location_European_nation_states, same license \ No newline at end of file diff --git a/Samples/map-test-australia_states_blank.svg b/Samples/australia_states_blank.svg similarity index 100% rename from Samples/map-test-australia_states_blank.svg rename to Samples/australia_states_blank.svg diff --git a/Samples/map-test-Location_European_nation_states-ukonly.svg b/Samples/uk-only.svg similarity index 100% rename from Samples/map-test-Location_European_nation_states-ukonly.svg rename to Samples/uk-only.svg diff --git a/XCodeProjects/SVGPadDemo/Classes/RootViewController.m b/XCodeProjects/SVGPadDemo/Classes/RootViewController.m index 707d0a16a..5893c5e13 100644 --- a/XCodeProjects/SVGPadDemo/Classes/RootViewController.m +++ b/XCodeProjects/SVGPadDemo/Classes/RootViewController.m @@ -16,7 +16,7 @@ @implementation RootViewController - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if (self) { - _sampleNames = [[NSArray alloc] initWithObjects:@"map-test-australia_states_blank", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"map-test-Location_European_nation_states-ukonly", @"a1-Location_European_nation_states", nil]; + _sampleNames = [[NSArray alloc] initWithObjects:@"australia_states_blank", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", nil]; } return self; } diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index e2aca2731..55e4cf49f 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -28,7 +28,7 @@ 3BF50427148C63F500CC7D17 /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50420148C63F500CC7D17 /* test-wave-1.svg */; }; 3BF50428148C63F500CC7D17 /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50421148C63F500CC7D17 /* Text.svg */; }; 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */; }; - 663DEFEF14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */; }; + 663DEFEF14BFDAC100C56E07 /* uk-only.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* uk-only.svg */; }; 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; @@ -76,8 +76,8 @@ 669471C61574221200EA533D /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719A1574221200EA533D /* SVGKPattern.m */; }; 669471C71574221200EA533D /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719C1574221200EA533D /* SVGKSource.m */; }; 669471C81574221200EA533D /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719E1574221200EA533D /* SVGKView.m */; }; - 66BBD74315028F0A00102FEF /* map-test-australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */; }; - 66BBD7461502A4EE00102FEF /* a1-Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD7451502A4EE00102FEF /* a1-Location_European_nation_states.svg */; }; + 66BBD74315028F0A00102FEF /* australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* australia_states_blank.svg */; }; + 66BBD7461502A4EE00102FEF /* Europe_states_reduced.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */; }; C94B6C5D1274BBFC00B456EB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */; }; /* End PBXBuildFile section */ @@ -111,7 +111,7 @@ 3BF50420148C63F500CC7D17 /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; 3BF50421148C63F500CC7D17 /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; - 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-Location_European_nation_states-ukonly.svg"; sourceTree = ""; }; + 663DEFEE14BFDAC100C56E07 /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; 66436E5214A0BCEF001CC769 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; @@ -208,8 +208,8 @@ 6694719C1574221200EA533D /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; 6694719D1574221200EA533D /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; 6694719E1574221200EA533D /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; - 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "map-test-australia_states_blank.svg"; sourceTree = ""; }; - 66BBD7451502A4EE00102FEF /* a1-Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "a1-Location_European_nation_states.svg"; sourceTree = ""; }; + 66BBD74215028F0A00102FEF /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; + 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; 8D1107310486CEB800E47090 /* SVGPad-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SVGPad-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -353,9 +353,9 @@ 3BF5041A148C63F500CC7D17 /* Samples */ = { isa = PBXGroup; children = ( - 66BBD7451502A4EE00102FEF /* a1-Location_European_nation_states.svg */, - 66BBD74215028F0A00102FEF /* map-test-australia_states_blank.svg */, - 663DEFEE14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg */, + 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */, + 66BBD74215028F0A00102FEF /* australia_states_blank.svg */, + 663DEFEE14BFDAC100C56E07 /* uk-only.svg */, 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */, 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */, 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */, @@ -549,9 +549,9 @@ 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */, 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */, 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */, - 663DEFEF14BFDAC100C56E07 /* map-test-Location_European_nation_states-ukonly.svg in Resources */, - 66BBD74315028F0A00102FEF /* map-test-australia_states_blank.svg in Resources */, - 66BBD7461502A4EE00102FEF /* a1-Location_European_nation_states.svg in Resources */, + 663DEFEF14BFDAC100C56E07 /* uk-only.svg in Resources */, + 66BBD74315028F0A00102FEF /* australia_states_blank.svg in Resources */, + 66BBD7461502A4EE00102FEF /* Europe_states_reduced.svg in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 3d608b5ccd9d7d157f664801fb461f0d536a2f51 Mon Sep 17 00:00:00 2001 From: adamgit Date: Thu, 31 May 2012 12:58:20 +0100 Subject: [PATCH 042/110] Added clearer method docs for some of the new SVGKImage methods --- Core/SVGKImage.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index 1d1052d19..ad4ab8ffb 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -111,10 +111,29 @@ - (id)initWithSource:(SVGKSource *)source; -/*! Creates a new instance each time you call it */ +/*! Creates a new instance each time you call it. This should ONLY be used if you specifically need to duplicate + the CALayer's (e.g. because you want to render a temporary clone of the CALayers somewhere else on screen, + and you're going to modify them). + + For all other use-cases, you should probably use the .CALayerTree property, which is automatically cached between + calls - but MUST NOT be altered! + */ - (CALayer *)newLayerTree; +/*! uses the current .CALayerTree property to find the layer, recursing down the tree (or creates a new + CALayerTree on demand, and caches it) + + i.e. this takes advantage of the cached CALayerTree instance, and also correctly uses the SVG.viewBox info + that was used when generating the original CALayerTree + */ - (CALayer *)layerWithIdentifier:(NSString *)identifier; + +/*! uses the current .CALayerTree property to find the layer, recursing down the tree (or creates a new + CALayerTree on demand, and caches it) + + i.e. this takes advantage of the cached CALayerTree instance, and also correctly uses the SVG.viewBox info + that was used when generating the original CALayerTree + */ - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer; /*! returns all the individual CALayer's in the full layer tree, indexed by the SVG identifier of the SVG node that created that layer */ From 3600c0c66e398ff9fe28389a8447ca7f5d633d58 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 11 Jun 2012 12:29:37 +0100 Subject: [PATCH 043/110] ADDED: you can request any CALayer from the CALayerTree by id, and have it returned in absolute co-ordinates --- Core/SVGKImage.h | 8 ++++++++ Core/SVGKImage.m | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index ad4ab8ffb..619818fae 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -136,6 +136,14 @@ */ - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer; +/*! As for layerWithIdentifier: but works out the absolute position of the layer, + effectively pulling it out of the layer-tree (the newly created layer has NO SUPERLAYER, + because it no longer needs one) + + Useful for extracting individual features from an SVG + */ +-(CALayer*) newCopyPositionedAbsoluteLayerWithIdentifier:(NSString *)identifier; + /*! returns all the individual CALayer's in the full layer tree, indexed by the SVG identifier of the SVG node that created that layer */ - (NSDictionary*) dictionaryOfLayers; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index be999af4b..31b7afb21 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -222,6 +222,52 @@ - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { return nil; } +-(CALayer*) newCopyPositionedAbsoluteLayerWithIdentifier:(NSString *)identifier +{ + CALayer* originalLayer = [self layerWithIdentifier:identifier]; + CALayer* clonedLayer = [[[[originalLayer class] alloc] init] autorelease]; + + clonedLayer.frame = originalLayer.frame; + if( [originalLayer isKindOfClass:[CAShapeLayer class]] ) + { + ((CAShapeLayer*)clonedLayer).path = ((CAShapeLayer*)originalLayer).path; + ((CAShapeLayer*)clonedLayer).lineCap = ((CAShapeLayer*)originalLayer).lineCap; + ((CAShapeLayer*)clonedLayer).lineWidth = ((CAShapeLayer*)originalLayer).lineWidth; + ((CAShapeLayer*)clonedLayer).strokeColor = ((CAShapeLayer*)originalLayer).strokeColor; + ((CAShapeLayer*)clonedLayer).fillColor = ((CAShapeLayer*)originalLayer).fillColor; + } + + if( clonedLayer == nil ) + return nil; + else + { + CGRect lFrame = clonedLayer.frame; + CGFloat xOffset = 0.0; + CGFloat yOffset = 0.0; + CALayer* currentLayer = originalLayer; + + if( currentLayer.superlayer == nil ) + { + NSLog(@"AWOOGA: layer %@ has no superlayer!", originalLayer ); + } + + while( currentLayer.superlayer != nil ) + { + //NSLog(@"shifting (%2.2f, %2.2f) to accomodate offset of layer = %@ inside superlayer = %@", currentLayer.superlayer.frame.origin.x, currentLayer.superlayer.frame.origin.y, currentLayer, currentLayer.superlayer ); + + currentLayer = currentLayer.superlayer; + xOffset += currentLayer.frame.origin.x; + yOffset += currentLayer.frame.origin.y; + } + + lFrame.origin = CGPointMake( lFrame.origin.x + xOffset, lFrame.origin.y + yOffset ); + clonedLayer.frame = lFrame; + + + return clonedLayer; + } +} + - (CALayer *)newLayerWithElement:(SVGElement *)element preTransform:(CGAffineTransform) preTransform { CALayer *layer = [element newLayerPreTransformed:preTransform]; From bd862f605d62ed45822af53a16b5fd3453ca38e4 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 11 Jun 2012 12:43:23 +0100 Subject: [PATCH 044/110] Tweaked a method name to fit the convention used elsewhere, Updated the README with some new features and corrected typos --- Core/SVGKImage.h | 2 +- Core/SVGKImage.m | 4 ++-- README.mdown | 33 +++++++++++++++++++++------------ 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index 619818fae..5715e395a 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -118,7 +118,7 @@ For all other use-cases, you should probably use the .CALayerTree property, which is automatically cached between calls - but MUST NOT be altered! */ -- (CALayer *)newLayerTree; +-(CALayer *)newCALayerTree; /*! uses the current .CALayerTree property to find the layer, recursing down the tree (or creates a new CALayerTree on demand, and caches it) diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 31b7afb21..52fe7da58 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -298,7 +298,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element preTr return layer; } --(CALayer *)newLayerTree +-(CALayer *)newCALayerTree { if( self.DOMTree == nil ) return nil; @@ -321,7 +321,7 @@ -(CALayer *)CALayerTree { if( CALayerTree == nil ) { - self.CALayerTree = [[self newLayerTree] autorelease]; + self.CALayerTree = [[self newCALayerTree] autorelease]; } return CALayerTree; diff --git a/README.mdown b/README.mdown index 6b24088f1..0438a62be 100644 --- a/README.mdown +++ b/README.mdown @@ -14,13 +14,22 @@ Usage - Basic (iPhone/iPad) To use this, you must: 1. Load an SVG file - 2. Convert the document to CALayer's which Apple can render + 2. EITHER: + 2a. Convert the document to CALayer's which Apple can render + 2b. Read the SVG data directly by looking at the tree of SVGElement subclasses -The easiest way to do this is: - 1. SVGImage *im = [SVGImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object - 2. [self.view.layer addSublayer:[im layerTree]]; // SVGImage objects can export themselves as Apple's CALayer's -NB: if you want to render the same SVG in different places on screen, you cannot do that right now. This is because the refactored code has gone back to old code that prevented you from doing this. Will be fixed in future! +2a: The easiest way to do this is: + 1. SVGKImage *im = [SVGKImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object + 2. [self.view.layer addSublayer:im.CALayerTree]; // SVGKImage can export itself as Apple's CALayer's + +...and if you want to display the same SVG somewhere else simultaneously, you don't have to re-parse it, you can just call: + 3. [self.view.layer addSublayer:[im newCALayerTree]; // Creates a clone of the CALayers, you can edit without affecting originals + + +2b: The easiest way to do this is: + 1. SVGKImage *im = [SVGKImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object + 2. SVGSVGElement* rootOfTree = im.DOMTree; // NB: this is a partial implementation of the official "SVG DOM" standard. See the header file for this class and its superclass to see what you can do with it Usage - Advanced (iPHone/iPad) @@ -28,16 +37,16 @@ Usage - Advanced (iPHone/iPad) The big change with this branch, apart from requiring fewer lines of code, is that you can now do easy loading of different files. e.g. - - [SVGParser parse: (SVGSource*)]; // anything that's an "SVGSource" can be parsed + - [SVGKParser parse: (SVGKSource*)]; // anything that's an "SVGKSource" can be parsed - - [SVGSource sourceWithFile:@"monkey.svg"]; // create a source from disk... - - [SVGSource sourceWithURL:@"http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg"]; // create a source from disk... + - [SVGKSource sourceWithFile:@"monkey.svg"]; // create a source from disk... + - [SVGKSource sourceWithURL:@"http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg"]; // create a source from disk... - - (SVGParser*).currentParseRun.warnings; // array of NSError objects, each one a "WARNING" from the parser - - (SVGParser*).currentParseRun.errorsFatal; // array of NSError objects, each one a "FATAL ERROR" from the parser - if your SVG didn't render at all, this is why! - - (SVGParser*).currentParseRun.errorsRecoverable; // array of NSError objects, each one a "RECOVERABLE ERROR" from the parser - if your SVG didn't render correctly, this is why! (although you probably still got to see something) + - (SVGKParser*).currentParseRun.warnings; // array of NSError objects, each one a "WARNING" from the parser + - (SVGKParser*).currentParseRun.errorsFatal; // array of NSError objects, each one a "FATAL ERROR" from the parser - if your SVG didn't render at all, this is why! + - (SVGKParser*).currentParseRun.errorsRecoverable; // array of NSError objects, each one a "RECOVERABLE ERROR" from the parser - if your SVG didn't render correctly, this is why! (although you probably still got to see something) - - (SVGImage*).parseErrorsAndWarnings; // this is a convenience pointer to (SVGParder*).currentParseRun used above + - (SVGKImage*).parseErrorsAndWarnings; // this is a convenience pointer to (SVGKParser*).currentParseRun used above Usage - OS X ----- From 4ae502afbb54251c3b85a433eb9dcfbd4617af0b Mon Sep 17 00:00:00 2001 From: adamgit Date: Thu, 28 Jun 2012 13:09:58 +0100 Subject: [PATCH 045/110] Further improved the error-handling of the parser. Added a Pattern and Gradient sub-parser (instead of failing the parse with a strange error!) --- Core/Parsing/SVGKParserExtension.h | 4 +- Core/Parsing/SVGKParserPatternsAndGradients.h | 15 ++++ Core/Parsing/SVGKParserPatternsAndGradients.m | 70 +++++++++++++++++++ Core/Parsing/SVGKParserSVG.m | 15 +++- Core/SVGKParser.m | 23 ++++-- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 17 ++++- 6 files changed, 131 insertions(+), 13 deletions(-) create mode 100644 Core/Parsing/SVGKParserPatternsAndGradients.h create mode 100644 Core/Parsing/SVGKParserPatternsAndGradients.m diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index cf35cd6e1..33d0f3f25 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -30,8 +30,8 @@ */ -(NSArray*) supportedTags; -- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes; --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent;// NOT SURE IF THIS IS NEEDED ANYWHERE ANY MORE: inDocument:(SVGSource*) svgSource; +- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult; +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult;// NOT SURE IF THIS IS NEEDED ANYWHERE ANY MORE: inDocument:(SVGSource*) svgSource; -(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; -(BOOL) createdItemShouldStoreContent:(NSObject*) item; diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.h b/Core/Parsing/SVGKParserPatternsAndGradients.h new file mode 100644 index 000000000..3bd0afe80 --- /dev/null +++ b/Core/Parsing/SVGKParserPatternsAndGradients.h @@ -0,0 +1,15 @@ +// +// SVGKParserPatternsAndGradients.h +// SVGKit +// +// Created by adam applecansuckmybigtodger on 28/06/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +#import "SVGKParser.h" + +@interface SVGKParserPatternsAndGradients : NSObject + +@end diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.m b/Core/Parsing/SVGKParserPatternsAndGradients.m new file mode 100644 index 000000000..84b3bfca0 --- /dev/null +++ b/Core/Parsing/SVGKParserPatternsAndGradients.m @@ -0,0 +1,70 @@ +// +// SVGKParserPatternsAndGradients.m +// SVGKit +// +// Created by adam applecansuckmybigtodger on 28/06/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "SVGKParserPatternsAndGradients.h" + +#import "SVGSVGElement.h" +#import "SVGCircleElement.h" +#import "SVGDefsElement.h" +#import "SVGDescriptionElement.h" +//#import "SVGKSource.h" +#import "SVGEllipseElement.h" +#import "SVGGroupElement.h" +#import "SVGImageElement.h" +#import "SVGLineElement.h" +#import "SVGPathElement.h" +#import "SVGPolygonElement.h" +#import "SVGPolylineElement.h" +#import "SVGRectElement.h" +#import "SVGTitleElement.h" + +@implementation SVGKParserPatternsAndGradients + +- (void)dealloc { + + [super dealloc]; +} + +-(NSArray*) supportedNamespaces +{ + return [NSArray arrayWithObjects: + @"http://www.w3.org/2000/svg", + nil]; +} + +/** "tags supported" is exactly the set of all SVGElement subclasses that already exist */ +-(NSArray*) supportedTags +{ + return [NSMutableArray arrayWithObjects:@"pattern", @"gradient", nil]; +} + +- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + + NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); + + return nil; +} + +-(BOOL) createdItemShouldStoreContent:(NSObject*) item +{ + NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); + + return false; +} + +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult +{ + NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); +} + +-(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item +{ + NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); +} + +@end diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 04fb046ad..6a0c70077 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -63,7 +63,7 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } -- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { +- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { if( [[self supportedNamespaces] containsObject:prefix] ) { Class elementClass = [elementMap objectForKey:name]; @@ -114,7 +114,7 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent// inDocument:(SVGKSource*) SVGKSource +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult { SVGElement *parentElement = (SVGElement*) parent; @@ -124,7 +124,16 @@ -(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent// inDocument: if ( parent == nil ) // i.e. the root SVG tag { - NSAssert( [child isKindOfClass:[SVGSVGElement class]], @"Unexpected root element: expected root tag to be an '' tag. Instead found an: %@", childElement.identifier ); + if( ! [child isKindOfClass:[SVGSVGElement class]] ) + { + NSError* fatalError = [NSError errorWithDomain:@"SVGKit" code:5324 userInfo: + [NSDictionary dictionaryWithObjectsAndKeys: + [NSString stringWithFormat:@"Unexpected root element: expected root tag to be an '' tag. Instead found a: %@", childElement.identifier], NSLocalizedDescriptionKey, + nil]]; + + [parseResult addParseErrorFatal:fatalError]; + return; + } NSLog(@"[%@] PARSER_INFO: asked to add object to nil parent; i.e. we've hit the root of the tree; setting global variables on the SVG rootElement now", [self class]); SVGSVGElement *rootSVGElement = (SVGSVGElement*) childElement; diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index 3755a25a4..fb84513e9 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -9,6 +9,7 @@ #import #import "SVGKParserSVG.h" +#import "SVGKParserPatternsAndGradients.h" @interface SVGKParserStackItem : NSObject @property(nonatomic,retain) NSObject* parserForThisItem; @@ -57,8 +58,10 @@ + (SVGKParseResult*) parseSourceUsingDefaultSVGKParser:(SVGKSource*) source; SVGKParser *parser = [[[SVGKParser alloc] initWithSource:source] autorelease]; SVGKParserSVG *subParserSVG = [[[SVGKParserSVG alloc] init] autorelease]; + SVGKParserPatternsAndGradients *subParserGradients = [[[SVGKParserPatternsAndGradients alloc] init] autorelease]; [parser.parserExtensions addObject:subParserSVG]; + [parser.parserExtensions addObject:subParserGradients]; SVGKParseResult* result = [parser parseSynchronously]; @@ -133,12 +136,20 @@ - (SVGKParseResult*) parseSynchronously if( [currentParseRun.errorsFatal count] > 0 ) { - /** NB this old code is no longer needed - we're doing higher-quality error handling! - if ( (libXmlParserParseError != 0) - {*/ // 3. if libxml failed chunk, break + if( libXmlParserParseError > 0 ) + { NSLog(@"[%@] libXml reported internal parser error with magic libxml code = %i (look this up on http://xmlsoft.org/html/libxml-xmlerror.html#xmlParserErrors)", [self class], libXmlParserParseError ); currentParseRun.libXMLFailed = YES; + } + else + { + NSLog(@"[%@] SVG parser generated one or more FATAL errors (not the XML parser), errors follow:", [self class] ); + for( NSError* error in currentParseRun.errorsFatal ) + { + NSLog(@"[%@] ... FATAL ERRRO in SVG parse: %@", [self class], error ); + } + } break; } @@ -179,9 +190,9 @@ - (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes: { NSObject* subParserResult = nil; - if( nil != (subParserResult = [subParser handleStartElement:name document:source xmlns:prefix attributes:attributes]) ) + if( nil != (subParserResult = [subParser handleStartElement:name document:source xmlns:prefix attributes:attributes parseResult:self.currentParseRun]) ) { - NSLog(@"[%@] tag: <%@:%@> -- handled by subParser: %@", [self class], prefix, name, subParser ); + NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); SVGKParserStackItem* stackItem = [[[SVGKParserStackItem alloc] init] autorelease];; stackItem.parserForThisItem = subParser; @@ -297,7 +308,7 @@ - (void)handleEndElement:(NSString *)name { } NSLog(@"[%@] DEBUG-PARSER: ended tag (): telling parser (%@) to add that item to tree-parent = %@", [self class], name, parserHandlingTheParentItem, parentStackItem.item ); - [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item];// inDocument:_document]; + [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item parseResult:self.currentParseRun]; if ( [stackItem.parserForThisItem createdItemShouldStoreContent:stackItem.item]) { [stackItem.parserForThisItem parseContent:_storedChars forItem:stackItem.item]; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 8a6e14c9c..12f55201f 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -172,6 +172,10 @@ 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; + 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; }; + 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; + 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; @@ -179,7 +183,7 @@ 6684CD4D1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; 6684CD4E1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; 6694713B157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; }; - 6694713C157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; }; + 6694713C157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6694713D157421B800EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694713A157421B800EA533D /* SVGDocument.m */; }; 6694713E157421B800EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694713A157421B800EA533D /* SVGDocument.m */; }; 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -297,6 +301,8 @@ 66614355156C625E000F3A27 /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; 6661435B156C645A000F3A27 /* DOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementation.h; sourceTree = ""; }; 6661435C156C645C000F3A27 /* DOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMImplementation.m; sourceTree = ""; }; + 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; + 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGKImage+SVGPathView.h"; path = "../../Core/SVGKImage+SVGPathView.h"; sourceTree = ""; }; 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGKImage+SVGPathView.m"; path = "../../Core/SVGKImage+SVGPathView.m"; sourceTree = ""; }; 6684CD491566D07400A46247 /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; @@ -507,6 +513,8 @@ 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */, 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */, 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */, + 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */, + 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */, 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */, 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */, ); @@ -667,6 +675,7 @@ 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */, 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */, 6694713C157421B800EA533D /* SVGDocument.h in Headers */, + 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -724,6 +733,7 @@ 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */, 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */, 6694713B157421B800EA533D /* SVGDocument.h in Headers */, + 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -828,6 +838,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */, 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */, 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */, 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, @@ -858,7 +869,6 @@ 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, 666142E8156C2E6A000F3A27 /* SVGKParseResult.m in Sources */, 666142EE156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */, - 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */, 666142FF156C2F14000F3A27 /* Document.m in Sources */, 66614305156C3A0B000F3A27 /* Node.m in Sources */, 6661430B156C3B95000F3A27 /* NodeList.m in Sources */, @@ -875,6 +885,7 @@ 66614354156C619F000F3A27 /* DocumentType.m in Sources */, 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */, 6694713E157421B800EA533D /* SVGDocument.m in Sources */, + 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -928,6 +939,7 @@ 66614353156C619F000F3A27 /* DocumentType.m in Sources */, 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */, 6694713D157421B800EA533D /* SVGDocument.m in Sources */, + 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1035,6 +1047,7 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = /usr/include/libxml2; IPHONEOS_DEPLOYMENT_TARGET = 4.0; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; From 2eb3f0670fedc2b92daac5b7a59cece866365c42 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 13 Jul 2012 14:47:42 +0100 Subject: [PATCH 046/110] Partial commit - WILL NOT BUILD - in process of implementing SVGDocument (and parser) according to spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVGKit's implementation of SVGDocument has always been a big violator of the spec, it's hard to fix - lots and lots needs to be committed here! More commits to come later… --- Core/DOM classes/SVG-DOM/SVGDocument.m | 1 + .../DOM classes/SVG-DOM/SVGDocument_Mutable.h | 13 + Core/DOM classes/SVG-DOM/SVGMatrix.h | 51 ++ Core/DOM classes/SVG-DOM/SVGMatrix.m | 20 + Core/DOM classes/SVG-DOM/SVGPoint.h | 22 + Core/DOM classes/SVG-DOM/SVGPoint.m | 13 + Core/DOM classes/SVG-DOM/SVGRect.h | 19 + Core/DOM classes/SVG-DOM/SVGViewSpec.h | 27 + Core/DOM classes/SVGSVGElement.h | 114 +++- Core/DOM classes/SVGSVGElement.m | 35 +- Core/Parsing/SVGKParseResult.h | 17 +- Core/Parsing/SVGKParseResult.m | 24 +- Core/Parsing/SVGKParserExtension.h | 11 +- Core/Parsing/SVGKParserSVG.m | 72 ++- Core/SKBasicDataTypes.h | 8 + Core/SVGKImage.h | 8 +- Core/SVGKImage.m | 18 +- Core/SVGKParser.h | 2 +- Core/SVGKParser.m | 60 +-- Core/SVGKParserStackItem.h | 6 + Core/SVGKParserStackItem.m | 14 + Core/SVGKSource.h | 4 +- Core/SVGKit.h | 27 +- Samples/Reinel_compass_rose-ADAM.svg | 206 ++++++++ Samples/breaking-1.svg | 491 ++++++++++++++++++ .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 46 ++ 26 files changed, 1239 insertions(+), 90 deletions(-) create mode 100644 Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h create mode 100644 Core/DOM classes/SVG-DOM/SVGMatrix.h create mode 100644 Core/DOM classes/SVG-DOM/SVGMatrix.m create mode 100644 Core/DOM classes/SVG-DOM/SVGPoint.h create mode 100644 Core/DOM classes/SVG-DOM/SVGPoint.m create mode 100644 Core/DOM classes/SVG-DOM/SVGRect.h create mode 100644 Core/DOM classes/SVG-DOM/SVGViewSpec.h create mode 100644 Core/SVGKParserStackItem.h create mode 100644 Core/SVGKParserStackItem.m create mode 100644 Samples/Reinel_compass_rose-ADAM.svg create mode 100644 Samples/breaking-1.svg diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m index 367533edc..2b62e17e0 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.m +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -7,6 +7,7 @@ */ #import "SVGDocument.h" +#import "SVGDocument_Mutable.h" #import "SKBasicDataTypes.h" diff --git a/Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h b/Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h new file mode 100644 index 000000000..7b62f9a4b --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h @@ -0,0 +1,13 @@ +/** + Makes the writable properties all package-private, effectively + */ + +#import "SVGDocument.h" + +@interface SVGDocument () +@property (nonatomic, retain, readwrite) NSString* title; +@property (nonatomic, retain, readwrite) NSString* referrer; +@property (nonatomic, retain, readwrite) NSString* domain; +@property (nonatomic, retain, readwrite) NSString* URL; +@property (nonatomic, retain, readwrite) SVGSVGElement* rootElement; +@end diff --git a/Core/DOM classes/SVG-DOM/SVGMatrix.h b/Core/DOM classes/SVG-DOM/SVGMatrix.h new file mode 100644 index 000000000..d53124ca3 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGMatrix.h @@ -0,0 +1,51 @@ +/*! + + http://www.w3.org/TR/SVG/coords.html#InterfaceSVGMatrix + + interface SVGMatrix { + + attribute float a setraises(DOMException); + attribute float b setraises(DOMException); + attribute float c setraises(DOMException); + attribute float d setraises(DOMException); + attribute float e setraises(DOMException); + attribute float f setraises(DOMException); + + SVGMatrix multiply(in SVGMatrix secondMatrix); + SVGMatrix inverse() raises(SVGException); + SVGMatrix translate(in float x, in float y); + SVGMatrix scale(in float scaleFactor); + SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY); + SVGMatrix rotate(in float angle); + SVGMatrix rotateFromVector(in float x, in float y) raises(SVGException); + SVGMatrix flipX(); + SVGMatrix flipY(); + SVGMatrix skewX(in float angle); + SVGMatrix skewY(in float angle); + }; + */ + +#import + +@interface SVGMatrix : NSObject + +@property(nonatomic) float a; +@property(nonatomic) float b; +@property(nonatomic) float c; +@property(nonatomic) float d; +@property(nonatomic) float e; +@property(nonatomic) float f; + +-(SVGMatrix*) multiply:(SVGMatrix*) secondMatrix; +-(SVGMatrix*) inverse; +-(SVGMatrix*) translate:(float) x y:(float) y; +-(SVGMatrix*) scale:(float) scaleFactor; +-(SVGMatrix*) scaleNonUniform:(float) scaleFactorX scaleFactorY:(float) scaleFactorY; +-(SVGMatrix*) rotate:(float) angle; +-(SVGMatrix*) rotateFromVector:(float) x y:(float) y; +-(SVGMatrix*) flipX; +-(SVGMatrix*) flipY; +-(SVGMatrix*) skewX:(float) angle; +-(SVGMatrix*) skewY:(float) angle; + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGMatrix.m b/Core/DOM classes/SVG-DOM/SVGMatrix.m new file mode 100644 index 000000000..9b26de9f3 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGMatrix.m @@ -0,0 +1,20 @@ + +#import "SVGMatrix.h" + +@implementation SVGMatrix + +@synthesize a,b,c,d,e,f; + +-(SVGMatrix*) multiply:(SVGMatrix*) secondMatrix { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) inverse { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) translate:(float) x y:(float) y { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) scale:(float) scaleFactor { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) scaleNonUniform:(float) scaleFactorX scaleFactorY:(float) scaleFactorY { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) rotate:(float) angle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) rotateFromVector:(float) x y:(float) y { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) flipX { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) flipY { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) skewX:(float) angle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) skewY:(float) angle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGPoint.h b/Core/DOM classes/SVG-DOM/SVGPoint.h new file mode 100644 index 000000000..04ed0f592 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGPoint.h @@ -0,0 +1,22 @@ +/*! + http://www.w3.org/TR/SVG/coords.html#InterfaceSVGPoint + + interface SVGPoint { + + attribute float x setraises(DOMException); + attribute float y setraises(DOMException); + + SVGPoint matrixTransform(in SVGMatrix matrix); + }; + */ +#import + +#import "SVGMatrix.h" + +@interface SVGPoint : NSObject + +@property(nonatomic,readonly) float x, y; + +-(SVGPoint*) matrixTransform:(SVGMatrix*) matrix; + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGPoint.m b/Core/DOM classes/SVG-DOM/SVGPoint.m new file mode 100644 index 000000000..d4fdb58b6 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGPoint.m @@ -0,0 +1,13 @@ + +#import "SVGPoint.h" + +@implementation SVGPoint + +@synthesize x, y; + +-(SVGPoint*) matrixTransform:(SVGMatrix*) matrix +{ + NSAssert( FALSE, @"Not implemented yet" ); +} + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGRect.h b/Core/DOM classes/SVG-DOM/SVGRect.h new file mode 100644 index 000000000..6db6f648b --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGRect.h @@ -0,0 +1,19 @@ +/* + http://www.w3.org/TR/SVG/types.html#InterfaceSVGRect + + interface SVGRect { + attribute float x setraises(DOMException); + attribute float y setraises(DOMException); + attribute float width setraises(DOMException); + attribute float height setraises(DOMException); + }; + */ +#import + +typedef struct +{ + float x; + float y; + float width; + float height; +} SVGRect; \ No newline at end of file diff --git a/Core/DOM classes/SVG-DOM/SVGViewSpec.h b/Core/DOM classes/SVG-DOM/SVGViewSpec.h new file mode 100644 index 000000000..9faac661f --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGViewSpec.h @@ -0,0 +1,27 @@ +/*! + SVGViewSpec + + interface SVGViewSpec : SVGZoomAndPan, + SVGFitToViewBox { + readonly attribute SVGTransformList transform; + readonly attribute SVGElement viewTarget; + readonly attribute DOMString viewBoxString; + readonly attribute DOMString preserveAspectRatioString; + readonly attribute DOMString transformString; + readonly attribute DOMString viewTargetString; + }; + */ +#import + +#import "SVGElement.h" + +@interface SVGViewSpec : NSObject + +/* FIXME: SVGTransformList not implemented yet: @property(nonatomic,readonly) SVGTransformList transform; */ +@property(nonatomic,readonly) SVGElement* viewTarget; +@property(nonatomic,readonly) NSString* viewBoxString; +@property(nonatomic,readonly) NSString* preserveAspectRatioString; +@property(nonatomic,readonly) NSString* transformString; +@property(nonatomic,readonly) NSString* viewTargetString; + +@end diff --git a/Core/DOM classes/SVGSVGElement.h b/Core/DOM classes/SVGSVGElement.h index 51acdfc58..e7378676e 100644 --- a/Core/DOM classes/SVGSVGElement.h +++ b/Core/DOM classes/SVGSVGElement.h @@ -1,40 +1,106 @@ /** SVGSVGElement.m - Represents the "" tag in an SVG document + Represents the "" tag in an SVG file - Data: - - documentWidth: the attribute - - documentHeight: the attribute - - viewBoxFrame: ??? - ...data that might be deprecated / removed in future versions of SVGKit: - - graphicsGroups: the collection of all tags in the doc that have "id" attributes - - anonymousGraphicsGroups: the collection of all tags in the doc that DO NOT have "id" attributes + http://www.w3.org/TR/SVG/struct.html#InterfaceSVGSVGElement + + readonly attribute SVGAnimatedLength x; + readonly attribute SVGAnimatedLength y; + readonly attribute SVGAnimatedLength width; + readonly attribute SVGAnimatedLength height; + attribute DOMString contentScriptType setraises(DOMException); + attribute DOMString contentStyleType setraises(DOMException); + readonly attribute SVGRect viewport; + readonly attribute float pixelUnitToMillimeterX; + readonly attribute float pixelUnitToMillimeterY; + readonly attribute float screenPixelToMillimeterX; + readonly attribute float screenPixelToMillimeterY; + readonly attribute boolean useCurrentView; + readonly attribute SVGViewSpec currentView; + attribute float currentScale; + readonly attribute SVGPoint currentTranslate; + + unsigned long suspendRedraw(in unsigned long maxWaitMilliseconds); + void unsuspendRedraw(in unsigned long suspendHandleID); + void unsuspendRedrawAll(); + void forceRedraw(); + void pauseAnimations(); + void unpauseAnimations(); + boolean animationsPaused(); + float getCurrentTime(); + void setCurrentTime(in float seconds); + NodeList getIntersectionList(in SVGRect rect, in SVGElement referenceElement); + NodeList getEnclosureList(in SVGRect rect, in SVGElement referenceElement); + boolean checkIntersection(in SVGElement element, in SVGRect rect); + boolean checkEnclosure(in SVGElement element, in SVGRect rect); + void deselectAll(); + SVGNumber createSVGNumber(); + SVGLength createSVGLength(); + SVGAngle createSVGAngle(); + SVGPoint createSVGPoint(); + SVGMatrix createSVGMatrix(); + SVGRect createSVGRect(); + SVGTransform createSVGTransform(); + SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix); + Element getElementById(in DOMString elementId); */ #import "SVGElement.h" #import "SKBasicDataTypes.h" +#import "NodeList.h" +#import "SVGViewSpec.h" + @interface SVGSVGElement : SVGElement < SVGLayeredElement > -@property (nonatomic, readonly) SVGLength documentWidth; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? -@property (nonatomic, readonly) SVGLength documentHeight; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? -@property (nonatomic, readonly) CGRect viewBoxFrame; // FIXME: maybe can be merged with SVGElement ? -/*! from the SVG spec, each "g" tag in the XML is a separate "group of graphics things", - * this dictionary contains a mapping from "value of id attribute" to "SVGGroupElement" - * - * see also: anonymousGraphicsGroups (for groups that have no "id=" attribute) - */ -@property (nonatomic, retain) NSDictionary *graphicsGroups; -/*! from the SVG spec, each "g" tag in the XML is a separate "group of graphics things", - * this array contains all the groups that had no "id=" attribute - * - * see also: graphicsGroups (for groups that have an "id=" attribute) - */ -@property (nonatomic, retain) NSArray *anonymousGraphicsGroups; -- (SVGElement *)findFirstElementOfClass:(Class)class; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength x; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength y; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength width; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength height; +@property (nonatomic, readonly) NSString* contentScriptType; +@property (nonatomic, readonly) NSString* contentStyleType; +@property (nonatomic, readonly) SVGRect viewport; +@property (nonatomic, readonly) float pixelUnitToMillimeterX; +@property (nonatomic, readonly) float pixelUnitToMillimeterY; +@property (nonatomic, readonly) float screenPixelToMillimeterX; +@property (nonatomic, readonly) float screenPixelToMillimeterY; +@property (nonatomic, readonly) BOOL useCurrentView; +@property (nonatomic, readonly) SVGViewSpec* currentView; +@property (nonatomic, readonly) float currentScale; +@property (nonatomic, readonly) SVGPoint* currentTranslate; + +-(long) suspendRedraw:(long) maxWaitMilliseconds; +-(void) unsuspendRedraw:(long) suspendHandleID; +-(void) unsuspendRedrawAll; +-(void) forceRedraw; +-(void) pauseAnimations; +-(void) unpauseAnimations; +-(BOOL) animationsPaused; +-(float) getCurrentTime; +-(void) setCurrentTime:(float) seconds; +-(NodeList*) getIntersectionList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement; +-(NodeList*) getEnclosureList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement; +-(BOOL) checkIntersection:(SVGElement*) element rect:(SVGRect) rect; +-(BOOL) checkEnclosure:(SVGElement*) element rect:(SVGRect) rect; +-(void) deselectAll; +-(SVGNumber) createSVGNumber; +-(SVGLength) createSVGLength; +-(SVGAngle) createSVGAngle; +-(SVGPoint) createSVGPoint; +-(SVGMatrix) createSVGMatrix; +-(SVGRect) createSVGRect; +-(SVGTransform) createSVGTransform; +-(SVGTransform) createSVGTransformFromMatrix:(SVGMatrix) matrix; +-(Element*) getElementById:(NSString*) elementId; + +#pragma mark - below here VIOLATES THE STANDARD, but needs to be CAREFULLY merged with spec + +@property (nonatomic, readonly) CGRect viewBoxFrame; // FIXME: this has NON TRIVIAL relationship to the viewport property above + +- (SVGElement *)findFirstElementOfClass:(Class)class; /*< temporary convenience method until SVGDocument support is complete */ @end diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index 826013301..c84fc4406 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -3,15 +3,11 @@ #import "CALayerWithChildHitTest.h" @interface SVGSVGElement() -@property (nonatomic, readwrite) SVGLength documentWidth; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? -@property (nonatomic, readwrite) SVGLength documentHeight; // FIXME: maybe can be merged with SVGElement as "boundingBoxWidth" / height ? -@property (nonatomic, readwrite) CGRect viewBoxFrame; // FIXME: maybe can be merged with SVGElement ? +@property (nonatomic, readwrite) CGRect viewBoxFrame; @end @implementation SVGSVGElement -@synthesize documentWidth; -@synthesize documentHeight; @synthesize viewBoxFrame = _viewBoxFrame; @synthesize graphicsGroups, anonymousGraphicsGroups; @@ -24,6 +20,35 @@ -(void)dealloc [super dealloc]; } +#pragma mark - SVG Spec methods + +-(long) suspendRedraw:(long) maxWaitMilliseconds { NSAssert( FALSE, "Not implemented yet" ); } +-(void) unsuspendRedraw:(long) suspendHandleID { NSAssert( FALSE, "Not implemented yet" ); } +-(void) unsuspendRedrawAll { NSAssert( FALSE, "Not implemented yet" ); } +-(void) forceRedraw { NSAssert( FALSE, "Not implemented yet" ); } +-(void) pauseAnimations { NSAssert( FALSE, "Not implemented yet" ); } +-(void) unpauseAnimations { NSAssert( FALSE, "Not implemented yet" ); } +-(BOOL) animationsPaused { NSAssert( FALSE, "Not implemented yet" ); } +-(float) getCurrentTime { NSAssert( FALSE, "Not implemented yet" ); } +-(void) setCurrentTime:(float) seconds { NSAssert( FALSE, "Not implemented yet" ); } +-(NodeList*) getIntersectionList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement { NSAssert( FALSE, "Not implemented yet" ); } +-(NodeList*) getEnclosureList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement { NSAssert( FALSE, "Not implemented yet" ); } +-(BOOL) checkIntersection:(SVGElement*) element rect:(SVGRect) rect { NSAssert( FALSE, "Not implemented yet" ); } +-(BOOL) checkEnclosure:(SVGElement*) element rect:(SVGRect) rect { NSAssert( FALSE, "Not implemented yet" ); } +-(void) deselectAll { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGNumber) createSVGNumber { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGLength) createSVGLength { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGAngle) createSVGAngle { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGPoint) createSVGPoint { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGMatrix) createSVGMatrix { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGRect) createSVGRect { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGTransform) createSVGTransform { NSAssert( FALSE, "Not implemented yet" ); } +-(SVGTransform) createSVGTransformFromMatrix:(SVGMatrix) matrix { NSAssert( FALSE, "Not implemented yet" ); } +-(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, "Not implemented yet" ); } + + +#pragma mark - Objective C methods needed given our current non-compliant SVG Parser + - (void)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; diff --git a/Core/Parsing/SVGKParseResult.h b/Core/Parsing/SVGKParseResult.h index 3fe8437e2..96607f247 100644 --- a/Core/Parsing/SVGKParseResult.h +++ b/Core/Parsing/SVGKParseResult.h @@ -3,18 +3,31 @@ */ #import -#import "SVGElement.h" +#import "SVGSVGElement.h" +#import "SVGDocument.h" + +@protocol SVGKParserExtension; +#import "SVGKParserExtension.h" @interface SVGKParseResult : NSObject @property(nonatomic, retain) NSMutableArray* warnings, * errorsRecoverable, * errorsFatal; @property(nonatomic) BOOL libXMLFailed; -@property(nonatomic,retain) SVGElement* rootOfSVGTree; +@property(nonatomic,retain) SVGSVGElement* rootOfSVGTree; /*< both are needed, see spec */ +@property(nonatomic,retain) SVGDocument* parsedDocument; /*< both are needed, see spec */ -(void) addSourceError:(NSError*) fatalError; -(void) addParseWarning:(NSError*) warning; -(void) addParseErrorRecoverable:(NSError*) recoverableError; -(void) addParseErrorFatal:(NSError*) fatalError; -(void) addSAXError:(NSError*) saxError; + +#if ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA +/*! Each SVGKParserExtension can optionally save extra data here */ +@property(nonatomic,retain) NSMutableDictionary* extensionsData; + +-(NSMutableDictionary*) dictionaryForParserExtension:(NSObject*) extension; +#endif + @end diff --git a/Core/Parsing/SVGKParseResult.m b/Core/Parsing/SVGKParseResult.m index 6d6df517b..948aff708 100644 --- a/Core/Parsing/SVGKParseResult.m +++ b/Core/Parsing/SVGKParseResult.m @@ -3,9 +3,13 @@ @implementation SVGKParseResult @synthesize libXMLFailed; -@synthesize rootOfSVGTree; +@synthesize parsedDocument, rootOfSVGTree; @synthesize warnings, errorsRecoverable, errorsFatal; +#if ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA +@synthesize extensionsData; +#endif + - (id)init { self = [super init]; @@ -13,6 +17,10 @@ - (id)init self.warnings = [NSMutableArray array]; self.errorsRecoverable = [NSMutableArray array]; self.errorsFatal = [NSMutableArray array]; + + #if ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA + self.extensionsData = [NSMutableDictionary dictionary]; +#endif } return self; } @@ -46,4 +54,18 @@ -(void) addSAXError:(NSError*) saxError [self.errorsFatal addObject:saxError]; } +#if ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA +-(NSMutableDictionary*) dictionaryForParserExtension:(NSObject*) extension +{ + NSMutableDictionary* d = [self.extensionsData objectForKey:[extension class]]; + if( d == nil ) + { + d = [NSMutableDictionary dictionary]; + [self.extensionsData setObject:d forKey:[extension class]]; + } + + return d; +} +#endif + @end diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index 33d0f3f25..ed2af9146 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -14,8 +14,15 @@ #import +@class SVGKParseResult; +#import "SVGKParseResult.h" + +#import "SVGKParserStackItem.h" #import "SVGKSource.h" +/*! Experimental: allow SVGKit parser-extensions to insert custom data into an SVGKParseResult */ +#define ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA 0 + @protocol SVGKParserExtension /*! Array of URI's as NSString's, one string for each XMLnamespace that this parser-extension can parse @@ -30,8 +37,8 @@ */ -(NSArray*) supportedTags; -- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult; --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult;// NOT SURE IF THIS IS NEEDED ANYWHERE ANY MORE: inDocument:(SVGSource*) svgSource; +- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; -(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; -(BOOL) createdItemShouldStoreContent:(NSObject*) item; diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 6a0c70077..7d53fb907 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -15,6 +15,8 @@ #import "SVGRectElement.h" #import "SVGTitleElement.h" +#import "SVGDocument_Mutable.h" + @implementation SVGKParserSVG static NSDictionary *elementMap; @@ -63,7 +65,8 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } -- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { +- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem +{ if( [[self supportedNamespaces] containsObject:prefix] ) { Class elementClass = [elementMap objectForKey:name]; @@ -90,6 +93,73 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSou if ((svgVersion = [attributes objectForKey:@"version"])) { SVGKSource.svgLanguageVersion = svgVersion; } + + /** According to spec, if the first XML node is an SVG node, then it + becomes TWO THINGS: + + - An SVGSVGElement + *and* + - An SVGDocument + - ...and that becomes "the root SVGDocument" + + If it's NOT the first XML node, but it's the first SVG node, then it ONLY becomes: + + - An SVGSVGElement + + If it's NOT the first SVG node, then it becomes: + + - An SVGSVGElement + *and* + - An SVGDocument + + Yes. It's Very confusing! Go read the SVG Spec! + */ + + BOOL generateAnSVGDocument = FALSE; + BOOL overwriteRootSVGDocument = FALSE; + BOOL overwriteRootOfTree = FALSE; + + if( parentStackItem == nil ) + { + /** This start element is the first item in the document + PS: xcode has a new bug for Lion: it can't format single-line comments with two asterisks. This line added because Xcode sucks. + */ + generateAnSVGDocument = overwriteRootSVGDocument = overwriteRootOfTree = TRUE; + + } + else if( parseResult.rootOfSVGTree == nil ) + { + /** It's not the first XML, but it's the first SVG node */ + overwriteRootOfTree = TRUE; + } + else + { + /** It's not the first SVG node */ + generateAnSVGDocument = TRUE; + } + + /** + Handle the complex stuff above about SVGDocument and SVG node + */ + if( overwriteRootOfTree ) + { + parseResult.rootOfSVGTree = (SVGSVGElement*) element; + } + if( generateAnSVGDocument ) + { + SVGDocument* newDocument = [[[SVGDocument alloc] init] autorelease]; + newDocument.rootElement = (SVGSVGElement*) element; + + if( overwriteRootSVGDocument ) + { + parseResult.parsedDocument = newDocument; + } + else + { + NSAssert( FALSE, @"Currently not supported: multiple SVG nodes (ie secondary Document reference) inside one file" ); + } + } + } diff --git a/Core/SKBasicDataTypes.h b/Core/SKBasicDataTypes.h index 67ecaa093..759137e13 100644 --- a/Core/SKBasicDataTypes.h +++ b/Core/SKBasicDataTypes.h @@ -16,6 +16,14 @@ #endif +#import "SVGRect.h" +#import "SVGPoint.h" + +/*! NOT IMPLEMENTED YET */ +typedef struct +{ + /*! NOT IMPLEMENTED YET */ +} SVGAnimatedLength; /** http://www.w3.org/TR/SVG11/types.html#InterfaceSVGLength diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index 5715e395a..b458fd61c 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -3,6 +3,10 @@ The main class in SVGKit - this is the one you'll normally interact with + c.f. SVGKit.h for more info on using SVGKit + + What is an SVGKImage? + An SVGKImage is as close to "the SVG version of a UIImage" as we could possibly get. We cannot subclass UIImage because Apple has defined UIImage as immutable - and SVG images actually change (each time you zoom in, we want to re-render the SVG as a higher-resolution set of pixels) @@ -25,6 +29,7 @@ */ #import "SKBasicDataTypes.h" +#import "SVGDocument.h" #import "SVGElement.h" #import "SVGSVGElement.h" #import "SVGGroupElement.h" @@ -48,7 +53,8 @@ @property (nonatomic, retain, readonly) SVGKSource* source; @property (nonatomic, retain, readonly) SVGKParseResult* parseErrorsAndWarnings; -@property (nonatomic, retain, readonly) SVGSVGElement* DOMTree; +@property (nonatomic, retain, readonly) SVGDocument* DOMDocument; +@property (nonatomic, retain, readonly) SVGSVGElement* DOMTree; // needs renaming + (possibly) replacing by DOMDocument @property (nonatomic, retain, readonly) CALayer* CALayerTree; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 52fe7da58..d18778b48 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -16,7 +16,8 @@ @interface SVGKImage () @property (nonatomic, retain, readwrite) SVGKSource* source; -@property (nonatomic, retain, readwrite) SVGSVGElement* DOMTree; // needs renaming + (possibly) refactoring +@property (nonatomic, retain, readwrite) SVGDocument* DOMDocument; +@property (nonatomic, retain, readwrite) SVGSVGElement* DOMTree; // needs renaming + (possibly) replacing by DOMDocument @property (nonatomic, retain, readwrite) CALayer* CALayerTree; #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods @@ -27,7 +28,7 @@ @interface SVGKImage () #pragma mark - main class @implementation SVGKImage -@synthesize DOMTree, CALayerTree; +@synthesize DOMDocument, DOMTree, CALayerTree; @synthesize svgWidth = _width; @synthesize svgHeight = _height; @@ -78,12 +79,17 @@ - (id)initWithSource:(SVGKSource *)source { self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:self.source]; - if( parseErrorsAndWarnings.rootOfSVGTree != nil ) - self.DOMTree = (SVGSVGElement*) parseErrorsAndWarnings.rootOfSVGTree; + if( parseErrorsAndWarnings.parsedDocument != nil ) + { + self.DOMDocument = parseErrorsAndWarnings.parsedDocument; + self.DOMTree = DOMDocument.rootElement; + } else - self.DOMTree = nil; + { + self.DOMDocument = self.DOMTree = nil; + } - if ( self.DOMTree == nil ) + if ( self.DOMDocument == nil ) { NSLog(@"[%@] ERROR: failed to init SVGKImage with source = %@, returning nil from init methods", [self class], source ); self = nil; diff --git a/Core/SVGKParser.h b/Core/SVGKParser.h index eecb6f830..77d0e748d 100644 --- a/Core/SVGKParser.h +++ b/Core/SVGKParser.h @@ -26,7 +26,7 @@ #import "SVGKParseResult.h" #import "SVGKParserExtension.h" - +#import "SVGKParserStackItem.h" #import "SVGElement.h" diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index fb84513e9..fa72b3fe6 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -9,27 +9,9 @@ #import #import "SVGKParserSVG.h" +@class SVGKParserPatternsAndGradients; #import "SVGKParserPatternsAndGradients.h" -@interface SVGKParserStackItem : NSObject -@property(nonatomic,retain) NSObject* parserForThisItem; -@property(nonatomic,retain) NSObject* item; - -@end - -@implementation SVGKParserStackItem -@synthesize item; -@synthesize parserForThisItem; - -- (void) dealloc -{ - self.item = nil; - self.parserForThisItem = nil; - [super dealloc]; -} - -@end - @interface SVGKParser() @property(nonatomic,retain, readwrite) SVGKSource* source; @property(nonatomic,retain, readwrite) SVGKParseResult* currentParseRun; @@ -188,29 +170,29 @@ - (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes: if( [[subParser supportedNamespaces] containsObject:prefix] && [[subParser supportedTags] containsObject:name] ) { - NSObject* subParserResult = nil; + SVGKParserStackItem* parentStackItem = [_elementStack lastObject]; - if( nil != (subParserResult = [subParser handleStartElement:name document:source xmlns:prefix attributes:attributes parseResult:self.currentParseRun]) ) - { - NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); - - SVGKParserStackItem* stackItem = [[[SVGKParserStackItem alloc] init] autorelease];; - stackItem.parserForThisItem = subParser; - stackItem.item = subParserResult; + NSObject* subParserResult = [subParser handleStartElement:name document:source xmlns:prefix attributes:attributes parseResult:self.currentParseRun parentStackItem:parentStackItem]; - [_elementStack addObject:stackItem]; - - if ([subParser createdItemShouldStoreContent:stackItem.item]) { - [_storedChars setString:@""]; - _storingChars = YES; - } - else { - _storingChars = NO; - } - return; - } + NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); + + SVGKParserStackItem* stackItem = [[[SVGKParserStackItem alloc] init] autorelease];; + stackItem.parserForThisItem = subParser; + stackItem.item = subParserResult; + + [_elementStack addObject:stackItem]; + + if ([subParser createdItemShouldStoreContent:stackItem.item]) { + [_storedChars setString:@""]; + _storingChars = YES; + } + else { + _storingChars = NO; + } + return; } + // otherwise ignore it - the parser extension didn't recognise the element } NSLog(@"[%@] ERROR: could not find a parser for tag: <%@:%@>; adding empty placeholder", [self class], prefix, name ); @@ -319,7 +301,7 @@ - (void)handleEndElement:(NSString *)name { if( closingRootTag ) { - currentParseRun.rootOfSVGTree = (SVGElement*) stackItem.item; + [currentParseRun.parsedDocument replaceRootElement:(SVGSVGElement*) stackItem.item]; } } } diff --git a/Core/SVGKParserStackItem.h b/Core/SVGKParserStackItem.h new file mode 100644 index 000000000..9f1f01536 --- /dev/null +++ b/Core/SVGKParserStackItem.h @@ -0,0 +1,6 @@ +#import + +@interface SVGKParserStackItem : NSObject +@property(nonatomic,retain) NSObject* parserForThisItem; +@property(nonatomic,retain) NSObject* item; +@end diff --git a/Core/SVGKParserStackItem.m b/Core/SVGKParserStackItem.m new file mode 100644 index 000000000..535ccf835 --- /dev/null +++ b/Core/SVGKParserStackItem.m @@ -0,0 +1,14 @@ +#import "SVGKParserStackItem.h" + +@implementation SVGKParserStackItem +@synthesize item; +@synthesize parserForThisItem; + +- (void) dealloc +{ + self.item = nil; + self.parserForThisItem = nil; + [super dealloc]; +} + +@end diff --git a/Core/SVGKSource.h b/Core/SVGKSource.h index 3d8a626b1..324983e6e 100644 --- a/Core/SVGKSource.h +++ b/Core/SVGKSource.h @@ -1,7 +1,7 @@ /** - SKSVGKSource.h + SVGKSource.h - SKSVGKSource represents the info about a file that was read from disk or over the web during parsing. + SVGKSource represents the info about a file that was read from disk or over the web during parsing. Once it has been parsed / loaded, that info is NOT PART OF the in-memory SVG any more - if you were to save the file, you could save it in a different location, with a different SVG Spec, etc. diff --git a/Core/SVGKit.h b/Core/SVGKit.h index 9aff020a0..c5eedab40 100644 --- a/Core/SVGKit.h +++ b/Core/SVGKit.h @@ -1,9 +1,24 @@ -// -// SVGKit.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// +/*! + + SVGKit - https://github.com/SVGKit/SVGKit + + THE MOST IMPORTANT ELEMENTS YOU'LL INTERACT WITH: + + 1. SVGKImage = contains most of the convenience methods for loading / reading / displaying SVG files + + SVGKImage makes heavy use of the following classes - you'll often use these classes (most of them given to you by an SVGKImage): + + 2. SVGKSource = the "file" or "URL" for loading the SVG data + 3. SVGKParseResult = contains the parsed SVG file AND/OR the list of errors during parsing + 4. SVGSVGElement = the parsed SVG file, stored as a tree of SVGElement's. The root element is an SVGSVGElement + 5. SVGDocument = OPTIONAL: only exists for *SOME* SVG FILES (it's very confusing - c.f. the official SVG spec!) + + NB: previous versions of SVGKit assumed that "every SVG file has an SVGDocument". This is not true, the spec + specifically states otherwise. In practice, most SVG files you encounter have an SVGDocument - but some have more than + one! And others have zero! So ... VERY LITTLE of SVGKit relies upon having an SVGDocument, we try to avoid using + it where possible. + + */ #include "TargetConditionals.h" diff --git a/Samples/Reinel_compass_rose-ADAM.svg b/Samples/Reinel_compass_rose-ADAM.svg new file mode 100644 index 000000000..26f181c46 --- /dev/null +++ b/Samples/Reinel_compass_rose-ADAM.svg @@ -0,0 +1,206 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/breaking-1.svg b/Samples/breaking-1.svg new file mode 100644 index 000000000..e8cd9ecf7 --- /dev/null +++ b/Samples/breaking-1.svg @@ -0,0 +1,491 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 km + + + + + + 1000 km + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 mi + + + + + + 1000 mi + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 12f55201f..0bf62d1e0 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -208,6 +208,20 @@ 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; + 66CBCA4E15AF27B000C36B57 /* SVGKParserStackItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */; }; + 66CBCA4F15AF27B000C36B57 /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */; }; + 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; }; + 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; }; + 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; }; + 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; }; + 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; + 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; + 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; }; + 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; }; + 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; }; + 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; }; + 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; + 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; C996E4BC1336CBC200EC3F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */; }; @@ -324,6 +338,15 @@ 66B79AF615475254002F99FF /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; + 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserStackItem.h; sourceTree = ""; }; + 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserStackItem.m; sourceTree = ""; }; + 66CBCA5115B0536D00C36B57 /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; + 66CBCA5215B056D000C36B57 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; + 66CBCA5815B057AD00C36B57 /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; + 66CBCA5915B057AD00C36B57 /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; + 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; + 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; + 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C95263281271228F00434805 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; @@ -564,7 +587,14 @@ isa = PBXGroup; children = ( 66947139157421B800EA533D /* SVGDocument.h */, + 66CBCA5115B0536D00C36B57 /* SVGDocument_Mutable.h */, 6694713A157421B800EA533D /* SVGDocument.m */, + 66CBCA5215B056D000C36B57 /* SVGRect.h */, + 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */, + 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */, + 66CBCA5815B057AD00C36B57 /* SVGPoint.h */, + 66CBCA5915B057AD00C36B57 /* SVGPoint.m */, + 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */, ); path = "SVG-DOM"; sourceTree = ""; @@ -598,6 +628,8 @@ 66B79AE615475254002F99FF /* SVGKImage.m */, 66B79AEB15475254002F99FF /* SVGKit.h */, 66B79AEE15475254002F99FF /* SVGKParser.h */, + 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */, + 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */, 66B79AEF15475254002F99FF /* SVGKParser.m */, 66B79AF515475254002F99FF /* SVGKPattern.h */, 66B79AF615475254002F99FF /* SVGKPattern.m */, @@ -676,6 +708,10 @@ 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */, 6694713C157421B800EA533D /* SVGDocument.h in Headers */, 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, + 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */, + 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */, + 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */, + 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -734,6 +770,11 @@ 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */, 6694713B157421B800EA533D /* SVGDocument.h in Headers */, 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, + 66CBCA4E15AF27B000C36B57 /* SVGKParserStackItem.h in Headers */, + 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */, + 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */, + 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */, + 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -886,6 +927,8 @@ 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */, 6694713E157421B800EA533D /* SVGDocument.m in Sources */, 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, + 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */, + 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -940,6 +983,9 @@ 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */, 6694713D157421B800EA533D /* SVGDocument.m in Sources */, 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, + 66CBCA4F15AF27B000C36B57 /* SVGKParserStackItem.m in Sources */, + 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */, + 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 7d6119844dcfafd2bb7a2a11966e1de1e609922d Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 15 Jul 2012 22:29:52 +0100 Subject: [PATCH 047/110] BUILD WORKS AGAIN - lots of missing Spec SVG-DOM classes and structs added. Also fixed some bugs caused by Xcode (because Apple is horrible and nasty) --- ...plementation.h => AppleSucksDOMImplementation.h} | 0 ...plementation.m => AppleSucksDOMImplementation.m} | 0 Core/DOM classes/SVG-DOM/SVGNumber.h | 13 +++++++++++++ Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h | 13 +++++++++++++ Core/DOM classes/SVG-DOM/SVGTransform.h | 13 +++++++++++++ Core/DOM classes/SVG-DOM/SVGTransform.m | 13 +++++++++++++ 6 files changed, 52 insertions(+) rename Core/DOM classes/Core DOM/{DOMImplementation.h => AppleSucksDOMImplementation.h} (100%) rename Core/DOM classes/Core DOM/{DOMImplementation.m => AppleSucksDOMImplementation.m} (100%) create mode 100644 Core/DOM classes/SVG-DOM/SVGNumber.h create mode 100644 Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h create mode 100644 Core/DOM classes/SVG-DOM/SVGTransform.h create mode 100644 Core/DOM classes/SVG-DOM/SVGTransform.m diff --git a/Core/DOM classes/Core DOM/DOMImplementation.h b/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h similarity index 100% rename from Core/DOM classes/Core DOM/DOMImplementation.h rename to Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h diff --git a/Core/DOM classes/Core DOM/DOMImplementation.m b/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m similarity index 100% rename from Core/DOM classes/Core DOM/DOMImplementation.m rename to Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m diff --git a/Core/DOM classes/SVG-DOM/SVGNumber.h b/Core/DOM classes/SVG-DOM/SVGNumber.h new file mode 100644 index 000000000..2a029bfc6 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGNumber.h @@ -0,0 +1,13 @@ +// +// SVGNumber.h +// SVGKit +// +// Created by adam applecansuckmybigtodger on 15/07/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface SVGNumber : NSObject + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h new file mode 100644 index 000000000..509044b82 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h @@ -0,0 +1,13 @@ +// +// SVGSVGElement_Mutable.h +// SVGKit +// +// Created by adam applecansuckmybigtodger on 15/07/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "SVGSVGElement.h" + +@interface SVGSVGElement () + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGTransform.h b/Core/DOM classes/SVG-DOM/SVGTransform.h new file mode 100644 index 000000000..05177f345 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGTransform.h @@ -0,0 +1,13 @@ +// +// SVGTransform.h +// SVGKit +// +// Created by adam applecansuckmybigtodger on 15/07/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface SVGTransform : NSObject + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGTransform.m b/Core/DOM classes/SVG-DOM/SVGTransform.m new file mode 100644 index 000000000..9d37c4943 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGTransform.m @@ -0,0 +1,13 @@ +// +// SVGTransform.m +// SVGKit +// +// Created by adam applecansuckmybigtodger on 15/07/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "SVGTransform.h" + +@implementation SVGTransform + +@end From cb06ecf5eed1e3cff22690c3db4a77ceadabab13 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 15 Jul 2012 22:30:03 +0100 Subject: [PATCH 048/110] same as last --- .../Core DOM/AppleSucksDOMImplementation.h | 8 +- .../Core DOM/AppleSucksDOMImplementation.m | 11 +- Core/DOM classes/Core DOM/Document.h | 6 +- Core/DOM classes/SVG-DOM/SVGAngle.h | 42 +++ Core/DOM classes/SVG-DOM/SVGAngle.m | 13 + Core/DOM classes/SVG-DOM/SVGDocument.m | 25 ++ Core/DOM classes/SVG-DOM/SVGNumber.h | 23 +- Core/DOM classes/SVG-DOM/SVGPoint.m | 2 + .../SVG-DOM/SVGSVGElement_Mutable.h | 24 +- Core/DOM classes/SVG-DOM/SVGTransform.h | 57 +++- Core/DOM classes/SVG-DOM/SVGTransform.m | 19 +- Core/DOM classes/SVGElement.h | 3 - Core/DOM classes/SVGElement.m | 5 - Core/DOM classes/SVGSVGElement.h | 16 +- Core/DOM classes/SVGSVGElement.m | 84 ++++-- Core/Parsing/SVGKParserSVG.h | 2 - Core/Parsing/SVGKParserSVG.m | 62 +---- Core/SKBasicDataTypes.h | 3 + Core/SVGKImage.m | 9 +- Core/SVGKParser.m | 7 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 56 +++- XCodeProjects/SVGPadDemo/DetailView.xib | 42 +-- .../SVGPad.xcodeproj/project.pbxproj | 260 +++++++++++------- 23 files changed, 483 insertions(+), 296 deletions(-) create mode 100644 Core/DOM classes/SVG-DOM/SVGAngle.h create mode 100644 Core/DOM classes/SVG-DOM/SVGAngle.m diff --git a/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h b/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h index e88beaac0..f684956c2 100644 --- a/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h +++ b/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h @@ -1,4 +1,10 @@ /* + PLEASE NOTE: Apple has made a PRIVATE implementation of this class, and because of their + stupid App Store rules they ban everyone else in the world from using a class with the + same name. Instead of making the class public, they have stolen it out of the global + namespace. This is the wrong thing to do, but we are required to rename our classes + because of this. + SVG-DOM, via Core DOM: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 @@ -23,7 +29,7 @@ #import "DocumentType.h" -@interface DOMImplementation : NSObject +@interface AppleSucksDOMImplementation : NSObject -(BOOL) hasFeature:(NSString*) feature version:(NSString*) version; diff --git a/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m b/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m index aa09833e4..40d34d740 100644 --- a/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m +++ b/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m @@ -1,14 +1,7 @@ -// -// DOMImplementation.m -// SVGKit -// -// Created by adam on 23/05/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// -#import "DOMImplementation.h" +#import "AppleSucksDOMImplementation.h" -@implementation DOMImplementation +@implementation AppleSucksDOMImplementation -(BOOL) hasFeature:(NSString*) feature version:(NSString*) version { diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index d98fdd977..2b8788e29 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -72,13 +72,13 @@ #import "ProcessingInstruction.h" @class DocumentType; #import "DocumentType.h" -@class DOMImplementation; -#import "DOMImplementation.h" +@class AppleSucksDOMImplementation; +#import "AppleSucksDOMImplementation.h" @interface Document : Node @property(nonatomic,retain,readonly) DocumentType* doctype; -@property(nonatomic,retain,readonly) DOMImplementation* implementation; +@property(nonatomic,retain,readonly) AppleSucksDOMImplementation* implementation; @property(nonatomic,retain,readonly) Element* documentElement; diff --git a/Core/DOM classes/SVG-DOM/SVGAngle.h b/Core/DOM classes/SVG-DOM/SVGAngle.h new file mode 100644 index 000000000..d0b8da714 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGAngle.h @@ -0,0 +1,42 @@ +/*! + SVGAngle + + http://www.w3.org/TR/SVG/types.html#InterfaceSVGAngle + + // Angle Unit Types + const unsigned short SVG_ANGLETYPE_UNKNOWN = 0; + const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1; + const unsigned short SVG_ANGLETYPE_DEG = 2; + const unsigned short SVG_ANGLETYPE_RAD = 3; + const unsigned short SVG_ANGLETYPE_GRAD = 4; + + readonly attribute unsigned short unitType; + attribute float value setraises(DOMException); + attribute float valueInSpecifiedUnits setraises(DOMException); + attribute DOMString valueAsString setraises(DOMException); + + void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException); + void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException); + */ +#import + +@interface SVGAngle : NSObject + +/*! Angle Unit Types */ +typedef enum SVGKAngleType +{ + SVG_ANGLETYPE_UNKNOWN = 0, + SVG_ANGLETYPE_UNSPECIFIED = 1, + SVG_ANGLETYPE_DEG = 2, + SVG_ANGLETYPE_RAD = 3, + SVG_ANGLETYPE_GRAD = 4 +} SVGKAngleType; + +@property(nonatomic, readonly) SVGKAngleType unitType; +@property(nonatomic) float value; +@property(nonatomic) float valueInSpecifiedUnits; +@property(nonatomic,retain) NSString* valueAsString; + +-(void) newValueSpecifiedUnits:(SVGKAngleType) unitType valueInSpecifiedUnits:(float) valueInSpecifiedUnits; +-(void) convertToSpecifiedUnits:(SVGKAngleType) unitType; +@end diff --git a/Core/DOM classes/SVG-DOM/SVGAngle.m b/Core/DOM classes/SVG-DOM/SVGAngle.m new file mode 100644 index 000000000..56eb2bd69 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGAngle.m @@ -0,0 +1,13 @@ +#import "SVGAngle.h" + +@implementation SVGAngle + +@synthesize unitType; +@synthesize value; +@synthesize valueInSpecifiedUnits; +@synthesize valueAsString; + +-(void) newValueSpecifiedUnits:(SVGKAngleType) unitType valueInSpecifiedUnits:(float) valueInSpecifiedUnits { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) convertToSpecifiedUnits:(SVGKAngleType) unitType { NSAssert( FALSE, @"Not implemented yet" ); } + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m index 2b62e17e0..bf143794b 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.m +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -11,6 +11,12 @@ #import "SKBasicDataTypes.h" +#import "NodeList+Mutable.h" + +@interface SVGDocument() +-(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(SVGElement*) parent addToList:(NodeList*) accumulator; +@end + @implementation SVGDocument @@ -20,4 +26,23 @@ @implementation SVGDocument @synthesize URL; @synthesize rootElement; +-(NodeList*) getElementsByTagName:(NSString*) data +{ + NodeList* accumulator = [[NodeList alloc] init]; + [self privateGetElementsByTagName:data childrenOfElement:self.rootElement addToList:accumulator]; + + return accumulator; +} + +-(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(SVGElement*) parent addToList:(NodeList*) accumulator +{ + if( [parent.localName isEqualToString:tagName] ) + [accumulator.internalArray addObject:parent]; + + for( SVGElement* childElement in parent.children ) + { + [self privateGetElementsByTagName:tagName childrenOfElement:childElement addToList:accumulator]; + } +} + @end diff --git a/Core/DOM classes/SVG-DOM/SVGNumber.h b/Core/DOM classes/SVG-DOM/SVGNumber.h index 2a029bfc6..dde75b96a 100644 --- a/Core/DOM classes/SVG-DOM/SVGNumber.h +++ b/Core/DOM classes/SVG-DOM/SVGNumber.h @@ -1,13 +1,12 @@ -// -// SVGNumber.h -// SVGKit -// -// Created by adam applecansuckmybigtodger on 15/07/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// +/*! -#import - -@interface SVGNumber : NSObject - -@end + http://www.w3.org/TR/SVG/types.html#InterfaceSVGNumber + + interface SVGNumber { + attribute float value setraises(DOMException); + }; + */ +typedef struct +{ + float value; +} SVGNumber; \ No newline at end of file diff --git a/Core/DOM classes/SVG-DOM/SVGPoint.m b/Core/DOM classes/SVG-DOM/SVGPoint.m index d4fdb58b6..87e1a4837 100644 --- a/Core/DOM classes/SVG-DOM/SVGPoint.m +++ b/Core/DOM classes/SVG-DOM/SVGPoint.m @@ -8,6 +8,8 @@ @implementation SVGPoint -(SVGPoint*) matrixTransform:(SVGMatrix*) matrix { NSAssert( FALSE, @"Not implemented yet" ); + + return nil; } @end diff --git a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h index 509044b82..efd0ba310 100644 --- a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h +++ b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h @@ -1,13 +1,21 @@ -// -// SVGSVGElement_Mutable.h -// SVGKit -// -// Created by adam applecansuckmybigtodger on 15/07/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - #import "SVGSVGElement.h" @interface SVGSVGElement () +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength x; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength y; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength width; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength height; +@property (nonatomic, readwrite) NSString* contentScriptType; +@property (nonatomic, readwrite) NSString* contentStyleType; +@property (nonatomic, readwrite) SVGRect viewport; +@property (nonatomic, readwrite) float pixelUnitToMillimeterX; +@property (nonatomic, readwrite) float pixelUnitToMillimeterY; +@property (nonatomic, readwrite) float screenPixelToMillimeterX; +@property (nonatomic, readwrite) float screenPixelToMillimeterY; +@property (nonatomic, readwrite) BOOL useCurrentView; +@property (nonatomic, readwrite) SVGViewSpec* currentView; +@property (nonatomic, readwrite) float currentScale; +@property (nonatomic, readwrite) SVGPoint* currentTranslate; + @end diff --git a/Core/DOM classes/SVG-DOM/SVGTransform.h b/Core/DOM classes/SVG-DOM/SVGTransform.h index 05177f345..0a2d54e44 100644 --- a/Core/DOM classes/SVG-DOM/SVGTransform.h +++ b/Core/DOM classes/SVG-DOM/SVGTransform.h @@ -1,13 +1,54 @@ -// -// SVGTransform.h -// SVGKit -// -// Created by adam applecansuckmybigtodger on 15/07/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - +/*! + http://www.w3.org/TR/SVG/coords.html#InterfaceSVGTransform + + // Transform Types + const unsigned short SVG_TRANSFORM_UNKNOWN = 0; + const unsigned short SVG_TRANSFORM_MATRIX = 1; + const unsigned short SVG_TRANSFORM_TRANSLATE = 2; + const unsigned short SVG_TRANSFORM_SCALE = 3; + const unsigned short SVG_TRANSFORM_ROTATE = 4; + const unsigned short SVG_TRANSFORM_SKEWX = 5; + const unsigned short SVG_TRANSFORM_SKEWY = 6; + + readonly attribute unsigned short type; + readonly attribute SVGMatrix matrix; + readonly attribute float angle; + + void setMatrix(in SVGMatrix matrix) raises(DOMException); + void setTranslate(in float tx, in float ty) raises(DOMException); + void setScale(in float sx, in float sy) raises(DOMException); + void setRotate(in float angle, in float cx, in float cy) raises(DOMException); + void setSkewX(in float angle) raises(DOMException); + void setSkewY(in float angle) raises(DOMException); +*/ + #import +#import "SVGMatrix.h" + @interface SVGTransform : NSObject +/*! Transform Types */ +typedef enum SVGKTransformType +{ + SVG_TRANSFORM_UNKNOWN = 0, + SVG_TRANSFORM_MATRIX = 1, + SVG_TRANSFORM_TRANSLATE = 2, + SVG_TRANSFORM_SCALE = 3, + SVG_TRANSFORM_ROTATE = 4, + SVG_TRANSFORM_SKEWX = 5, + SVG_TRANSFORM_SKEWY = 6 +} SVGKTransformType; + +@property(nonatomic) SVGKTransformType type; +@property(nonatomic,retain) SVGMatrix* matrix; +@property(nonatomic,readonly) float angle; + +-(void) setMatrix:(SVGMatrix*) matrix; +-(void) setTranslate:(float) tx ty:(float) ty; +-(void) setScale:(float) sx sy:(float) sy; +-(void) setRotate:(float) angle cx:(float) cx cy:(float) cy; +-(void) setSkewX:(float) angle; +-(void) setSkewY:(float) angle; + @end diff --git a/Core/DOM classes/SVG-DOM/SVGTransform.m b/Core/DOM classes/SVG-DOM/SVGTransform.m index 9d37c4943..d047050ea 100644 --- a/Core/DOM classes/SVG-DOM/SVGTransform.m +++ b/Core/DOM classes/SVG-DOM/SVGTransform.m @@ -1,13 +1,16 @@ -// -// SVGTransform.m -// SVGKit -// -// Created by adam applecansuckmybigtodger on 15/07/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - #import "SVGTransform.h" @implementation SVGTransform +@synthesize type; +@synthesize matrix; +@synthesize angle; + +-(void) setMatrix:(SVGMatrix*) matrix { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) setTranslate:(float) tx ty:(float) ty { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) setScale:(float) sx sy:(float) sy { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) setRotate:(float) angle cx:(float) cx cy:(float) cy { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) setSkewX:(float) angle { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) setSkewY:(float) angle { NSAssert( FALSE, @"Not implemented yet" ); } + @end diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index cc54977f5..370b7753e 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -52,9 +52,6 @@ - (void)loadDefaults; // should be overriden to set element defaults -/*! Parser uses this to add non-rendering-SVG XML tags to the element they were embedded in */ -- (void) addMetadataChild:(NSObject*) child; - /*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; */ - (void)parseAttributes:(NSDictionary *)attributes; diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 354254923..34eb80a60 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -80,11 +80,6 @@ - (void)addChild:(SVGElement *)element { element.parent = self; } --(void) addMetadataChild:(NSObject*) child -{ - [self.metadataChildren addObject:child]; -} - - (void)parseAttributes:(NSDictionary *)attributes { // to be overriden by subclasses // make sure super implementation is called diff --git a/Core/DOM classes/SVGSVGElement.h b/Core/DOM classes/SVGSVGElement.h index e7378676e..47841f979 100644 --- a/Core/DOM classes/SVGSVGElement.h +++ b/Core/DOM classes/SVGSVGElement.h @@ -47,11 +47,15 @@ */ #import "SVGElement.h" +#import "SVGViewSpec.h" +#pragma mark - most of the SVG* types (SVGLength, SVGNumber, etc) are in this imported header #import "SKBasicDataTypes.h" +#pragma mark - a few raw DOM imports are required for SVG DOM, but not many +#import "Element.h" #import "NodeList.h" -#import "SVGViewSpec.h" + @interface SVGSVGElement : SVGElement < SVGLayeredElement > @@ -89,12 +93,12 @@ -(void) deselectAll; -(SVGNumber) createSVGNumber; -(SVGLength) createSVGLength; --(SVGAngle) createSVGAngle; --(SVGPoint) createSVGPoint; --(SVGMatrix) createSVGMatrix; +-(SVGAngle*) createSVGAngle; +-(SVGPoint*) createSVGPoint; +-(SVGMatrix*) createSVGMatrix; -(SVGRect) createSVGRect; --(SVGTransform) createSVGTransform; --(SVGTransform) createSVGTransformFromMatrix:(SVGMatrix) matrix; +-(SVGTransform*) createSVGTransform; +-(SVGTransform*) createSVGTransformFromMatrix:(SVGMatrix*) matrix; -(Element*) getElementById:(NSString*) elementId; #pragma mark - below here VIOLATES THE STANDARD, but needs to be CAREFULLY merged with spec diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index c84fc4406..8160721ae 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -1,5 +1,6 @@ #import "SVGSVGElement.h" +#import "SVGSVGElement_Mutable.h" #import "CALayerWithChildHitTest.h" @interface SVGSVGElement() @@ -8,43 +9,68 @@ @interface SVGSVGElement() @implementation SVGSVGElement +@synthesize x; +@synthesize y; +@synthesize width; +@synthesize height; +@synthesize contentScriptType; +@synthesize contentStyleType; +@synthesize viewport; +@synthesize pixelUnitToMillimeterX; +@synthesize pixelUnitToMillimeterY; +@synthesize screenPixelToMillimeterX; +@synthesize screenPixelToMillimeterY; +@synthesize useCurrentView; +@synthesize currentView; +@synthesize currentScale; +@synthesize currentTranslate; + +#pragma mark - NON SPEC, violating, properties @synthesize viewBoxFrame = _viewBoxFrame; -@synthesize graphicsGroups, anonymousGraphicsGroups; - -(void)dealloc { - self.graphicsGroups = nil; - self.anonymousGraphicsGroups = nil; self.viewBoxFrame = CGRectNull; [super dealloc]; } #pragma mark - SVG Spec methods --(long) suspendRedraw:(long) maxWaitMilliseconds { NSAssert( FALSE, "Not implemented yet" ); } --(void) unsuspendRedraw:(long) suspendHandleID { NSAssert( FALSE, "Not implemented yet" ); } --(void) unsuspendRedrawAll { NSAssert( FALSE, "Not implemented yet" ); } --(void) forceRedraw { NSAssert( FALSE, "Not implemented yet" ); } --(void) pauseAnimations { NSAssert( FALSE, "Not implemented yet" ); } --(void) unpauseAnimations { NSAssert( FALSE, "Not implemented yet" ); } --(BOOL) animationsPaused { NSAssert( FALSE, "Not implemented yet" ); } --(float) getCurrentTime { NSAssert( FALSE, "Not implemented yet" ); } --(void) setCurrentTime:(float) seconds { NSAssert( FALSE, "Not implemented yet" ); } --(NodeList*) getIntersectionList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement { NSAssert( FALSE, "Not implemented yet" ); } --(NodeList*) getEnclosureList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement { NSAssert( FALSE, "Not implemented yet" ); } --(BOOL) checkIntersection:(SVGElement*) element rect:(SVGRect) rect { NSAssert( FALSE, "Not implemented yet" ); } --(BOOL) checkEnclosure:(SVGElement*) element rect:(SVGRect) rect { NSAssert( FALSE, "Not implemented yet" ); } --(void) deselectAll { NSAssert( FALSE, "Not implemented yet" ); } --(SVGNumber) createSVGNumber { NSAssert( FALSE, "Not implemented yet" ); } --(SVGLength) createSVGLength { NSAssert( FALSE, "Not implemented yet" ); } --(SVGAngle) createSVGAngle { NSAssert( FALSE, "Not implemented yet" ); } --(SVGPoint) createSVGPoint { NSAssert( FALSE, "Not implemented yet" ); } --(SVGMatrix) createSVGMatrix { NSAssert( FALSE, "Not implemented yet" ); } --(SVGRect) createSVGRect { NSAssert( FALSE, "Not implemented yet" ); } --(SVGTransform) createSVGTransform { NSAssert( FALSE, "Not implemented yet" ); } --(SVGTransform) createSVGTransformFromMatrix:(SVGMatrix) matrix { NSAssert( FALSE, "Not implemented yet" ); } --(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, "Not implemented yet" ); } +-(long) suspendRedraw:(long) maxWaitMilliseconds { NSAssert( FALSE, @"Not implemented yet" ); return 0; } +-(void) unsuspendRedraw:(long) suspendHandleID { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) unsuspendRedrawAll { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) forceRedraw { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) pauseAnimations { NSAssert( FALSE, @"Not implemented yet" ); } +-(void) unpauseAnimations { NSAssert( FALSE, @"Not implemented yet" ); } +-(BOOL) animationsPaused { NSAssert( FALSE, @"Not implemented yet" ); return TRUE; } +-(float) getCurrentTime { NSAssert( FALSE, @"Not implemented yet" ); return 0.0; } +-(void) setCurrentTime:(float) seconds { NSAssert( FALSE, @"Not implemented yet" ); } +-(NodeList*) getIntersectionList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(NodeList*) getEnclosureList:(SVGRect) rect referenceElement:(SVGElement*) referenceElement { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(BOOL) checkIntersection:(SVGElement*) element rect:(SVGRect) rect { NSAssert( FALSE, @"Not implemented yet" ); return FALSE; } +-(BOOL) checkEnclosure:(SVGElement*) element rect:(SVGRect) rect { NSAssert( FALSE, @"Not implemented yet" ); return FALSE; } +-(void) deselectAll { NSAssert( FALSE, @"Not implemented yet" );} +-(SVGNumber) createSVGNumber +{ + SVGNumber n = { 0 }; + return n; +} +-(SVGLength) createSVGLength +{ + SVGLength l = { 0.0, 0 }; + return l; +} +-(SVGAngle*) createSVGAngle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGPoint*) createSVGPoint { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGMatrix*) createSVGMatrix { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGRect) createSVGRect +{ + SVGRect r = { 0.0, 0.0, 0.0, 0.0 }; + return r; +} +-(SVGTransform*) createSVGTransform { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(SVGTransform*) createSVGTransformFromMatrix:(SVGMatrix*) matrix { NSAssert( FALSE, @"Not implemented yet" ); return nil; } +-(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, @"Not implemented yet" ); return nil; } #pragma mark - Objective C methods needed given our current non-compliant SVG Parser @@ -55,11 +81,11 @@ - (void)parseAttributes:(NSDictionary *)attributes { id value = nil; if ((value = [attributes objectForKey:@"width"])) { - self.documentWidth = SVGLengthFromNSString( value ); + self.width = SVGLengthFromNSString( value ); } if ((value = [attributes objectForKey:@"height"])) { - self.documentHeight = SVGLengthFromNSString( value ); + self.height = SVGLengthFromNSString( value ); } if( (value = [attributes objectForKey:@"viewBox"])) { diff --git a/Core/Parsing/SVGKParserSVG.h b/Core/Parsing/SVGKParserSVG.h index 3d1a08992..8ba7e723e 100644 --- a/Core/Parsing/SVGKParserSVG.h +++ b/Core/Parsing/SVGKParserSVG.h @@ -3,8 +3,6 @@ #import "SVGKParser.h" @interface SVGKParserSVG : NSObject { - NSMutableDictionary *_graphicsGroups; - NSMutableArray *_anonymousGraphicsGroups; } @end diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 7d53fb907..14ee50990 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -46,8 +46,6 @@ - (id)init { } - (void)dealloc { - [_anonymousGraphicsGroups release]; - [_graphicsGroups release]; [super dealloc]; } @@ -184,7 +182,7 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult +-(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem *)parentStackItem { SVGElement *parentElement = (SVGElement*) parent; @@ -192,68 +190,18 @@ -(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:( { SVGElement *childElement = (SVGElement*) child; - if ( parent == nil ) // i.e. the root SVG tag + if ( parent != nil ) { - if( ! [child isKindOfClass:[SVGSVGElement class]] ) - { - NSError* fatalError = [NSError errorWithDomain:@"SVGKit" code:5324 userInfo: - [NSDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithFormat:@"Unexpected root element: expected root tag to be an '' tag. Instead found a: %@", childElement.identifier], NSLocalizedDescriptionKey, - nil]]; - - [parseResult addParseErrorFatal:fatalError]; - return; - } - - NSLog(@"[%@] PARSER_INFO: asked to add object to nil parent; i.e. we've hit the root of the tree; setting global variables on the SVG rootElement now", [self class]); - SVGSVGElement *rootSVGElement = (SVGSVGElement*) childElement; - [rootSVGElement setGraphicsGroups:_graphicsGroups]; - [rootSVGElement setAnonymousGraphicsGroups:_anonymousGraphicsGroups]; - - [_graphicsGroups release]; - [_anonymousGraphicsGroups release]; - _graphicsGroups = nil; - _anonymousGraphicsGroups = nil; - - } - else - { - [parentElement addChild:childElement]; - - /*! - SVG Spec attaches special meaning to the "g" tag - and applications - need to be able to pull-out the "g"-tagged items later on - */ - if( [childElement.localName isEqualToString:@"g"] ) - { - if( childElement.identifier == nil ) - { - if( _anonymousGraphicsGroups == nil ) - _anonymousGraphicsGroups = [NSMutableArray new]; - - [_anonymousGraphicsGroups addObject:childElement]; - -#if PARSER_WARN_FOR_ANONYMOUS_SVG_G_TAGS - NSLog(@"[%@] PARSER_WARN: Found anonymous g tag (tag has no XML 'id=' attribute). Loading OK, but check your SVG file (id tags are highly recommended!)...", [self class] ); -#endif - } - else - { - if( _graphicsGroups == nil ) - _graphicsGroups = [NSMutableDictionary new]; - - [_graphicsGroups setValue:childElement forKey:childElement.identifier]; - } - } + [parentElement addChild:childElement]; } } else { /*! - Unknown metadata + Unknown tag */ - [parentElement addMetadataChild:child]; + NSAssert( FALSE, @"Asked to add unrecognized child tag of type = %@ to parent = %@", [child class], parent ); } } diff --git a/Core/SKBasicDataTypes.h b/Core/SKBasicDataTypes.h index 759137e13..f3d34779b 100644 --- a/Core/SKBasicDataTypes.h +++ b/Core/SKBasicDataTypes.h @@ -18,6 +18,9 @@ #import "SVGRect.h" #import "SVGPoint.h" +#import "SVGNumber.h" +#import "SVGAngle.h" +#import "SVGTransform.h" /*! NOT IMPLEMENTED YET */ typedef struct diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index d18778b48..aa852777c 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -86,7 +86,8 @@ - (id)initWithSource:(SVGKSource *)source { } else { - self.DOMDocument = self.DOMTree = nil; + self.DOMDocument = nil; + self.DOMTree = nil; } if ( self.DOMDocument == nil ) @@ -96,8 +97,8 @@ - (id)initWithSource:(SVGKSource *)source { } else { - self.svgWidth = self.DOMTree.documentWidth; - self.svgHeight = self.DOMTree.documentHeight; + self.svgWidth = self.DOMTree.width; + self.svgHeight = self.DOMTree.height; } } return self; @@ -314,7 +315,7 @@ -(CALayer *)newCALayerTree // TODO: calc the correct transform! CGRect frameViewBox = self.DOMTree.viewBoxFrame; - CGRect frameImage = CGRectMake(0,0, SVGLengthAsPixels( self.DOMTree.documentWidth), SVGLengthAsPixels( self.DOMTree.documentHeight ) ); + CGRect frameImage = CGRectMake(0,0, SVGLengthAsPixels( self.DOMTree.width), SVGLengthAsPixels( self.DOMTree.height ) ); if( ! CGRectIsEmpty( frameViewBox ) ) preTransform = CGAffineTransformMakeScale( frameImage.size.width / frameViewBox.size.width, frameImage.size.height / frameViewBox.size.height); diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index fa72b3fe6..a3f6ae4f5 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -9,9 +9,12 @@ #import #import "SVGKParserSVG.h" + @class SVGKParserPatternsAndGradients; #import "SVGKParserPatternsAndGradients.h" +#import "SVGDocument_Mutable.h" // so we can modify the SVGDocuments we're parsing + @interface SVGKParser() @property(nonatomic,retain, readwrite) SVGKSource* source; @property(nonatomic,retain, readwrite) SVGKParseResult* currentParseRun; @@ -290,7 +293,7 @@ - (void)handleEndElement:(NSString *)name { } NSLog(@"[%@] DEBUG-PARSER: ended tag (): telling parser (%@) to add that item to tree-parent = %@", [self class], name, parserHandlingTheParentItem, parentStackItem.item ); - [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item parseResult:self.currentParseRun]; + [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item parseResult:self.currentParseRun parentStackItem:parentStackItem]; if ( [stackItem.parserForThisItem createdItemShouldStoreContent:stackItem.item]) { [stackItem.parserForThisItem parseContent:_storedChars forItem:stackItem.item]; @@ -301,7 +304,7 @@ - (void)handleEndElement:(NSString *)name { if( closingRootTag ) { - [currentParseRun.parsedDocument replaceRootElement:(SVGSVGElement*) stackItem.item]; + currentParseRun.parsedDocument.rootElement = (SVGSVGElement*) stackItem.item; } } } diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 0bf62d1e0..e2f7f028c 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -168,10 +168,10 @@ 66614354156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; }; - 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* DOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; - 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* DOMImplementation.m */; }; + 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; }; + 6661435E156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6661435F156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */; }; + 66614360156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */; }; 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; }; 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -222,6 +222,16 @@ 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; }; 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; + 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; }; + 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; }; + 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; }; + 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; }; + 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; + 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; + 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; }; + 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; }; + 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; + 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; C996E4BC1336CBC200EC3F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */; }; @@ -313,8 +323,8 @@ 6661434F156C619A000F3A27 /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; 66614350156C619D000F3A27 /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; 66614355156C625E000F3A27 /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; - 6661435B156C645A000F3A27 /* DOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementation.h; sourceTree = ""; }; - 6661435C156C645C000F3A27 /* DOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMImplementation.m; sourceTree = ""; }; + 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; + 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGKImage+SVGPathView.h"; path = "../../Core/SVGKImage+SVGPathView.h"; sourceTree = ""; }; @@ -347,6 +357,12 @@ 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; + 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; + 66CBCA7615B35A9000C36B57 /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; + 66CBCA7715B35A9100C36B57 /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; + 66CBCA7C15B35CCD00C36B57 /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; + 66CBCA7D15B3641600C36B57 /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; + 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C95263281271228F00434805 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; @@ -559,8 +575,8 @@ 66614331156C45F1000F3A27 /* DocumentFragment.m */, 6661434F156C619A000F3A27 /* DocumentType.h */, 66614350156C619D000F3A27 /* DocumentType.m */, - 6661435B156C645A000F3A27 /* DOMImplementation.h */, - 6661435C156C645C000F3A27 /* DOMImplementation.m */, + 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */, + 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */, 66614342156C4722000F3A27 /* EntityReference.h */, 66614343156C4724000F3A27 /* EntityReference.m */, 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, @@ -589,12 +605,18 @@ 66947139157421B800EA533D /* SVGDocument.h */, 66CBCA5115B0536D00C36B57 /* SVGDocument_Mutable.h */, 6694713A157421B800EA533D /* SVGDocument.m */, + 66CBCA7D15B3641600C36B57 /* SVGAngle.h */, + 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */, 66CBCA5215B056D000C36B57 /* SVGRect.h */, 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */, 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */, + 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */, 66CBCA5815B057AD00C36B57 /* SVGPoint.h */, 66CBCA5915B057AD00C36B57 /* SVGPoint.m */, 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */, + 66CBCA7615B35A9000C36B57 /* SVGTransform.h */, + 66CBCA7715B35A9100C36B57 /* SVGTransform.m */, + 66CBCA7C15B35CCD00C36B57 /* SVGSVGElement_Mutable.h */, ); path = "SVG-DOM"; sourceTree = ""; @@ -705,13 +727,16 @@ 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */, 66614352156C619F000F3A27 /* DocumentType.h in Headers */, 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */, - 6661435E156C645F000F3A27 /* DOMImplementation.h in Headers */, + 6661435E156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */, 6694713C157421B800EA533D /* SVGDocument.h in Headers */, 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */, 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */, 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */, 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */, + 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */, + 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */, + 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -767,7 +792,7 @@ 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */, 66614351156C619F000F3A27 /* DocumentType.h in Headers */, 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */, - 6661435D156C645F000F3A27 /* DOMImplementation.h in Headers */, + 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */, 6694713B157421B800EA533D /* SVGDocument.h in Headers */, 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, 66CBCA4E15AF27B000C36B57 /* SVGKParserStackItem.h in Headers */, @@ -775,6 +800,9 @@ 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */, 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */, 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */, + 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */, + 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */, + 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -924,11 +952,13 @@ 66614341156C46DF000F3A27 /* CDATASection.m in Sources */, 66614347156C4726000F3A27 /* EntityReference.m in Sources */, 66614354156C619F000F3A27 /* DocumentType.m in Sources */, - 66614360156C645F000F3A27 /* DOMImplementation.m in Sources */, + 66614360156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */, 6694713E157421B800EA533D /* SVGDocument.m in Sources */, 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */, 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */, + 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */, + 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -980,12 +1010,14 @@ 66614340156C46DF000F3A27 /* CDATASection.m in Sources */, 66614346156C4726000F3A27 /* EntityReference.m in Sources */, 66614353156C619F000F3A27 /* DocumentType.m in Sources */, - 6661435F156C645F000F3A27 /* DOMImplementation.m in Sources */, + 6661435F156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */, 6694713D157421B800EA533D /* SVGDocument.m in Sources */, 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, 66CBCA4F15AF27B000C36B57 /* SVGKParserStackItem.m in Sources */, 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */, 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */, + 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */, + 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/XCodeProjects/SVGPadDemo/DetailView.xib b/XCodeProjects/SVGPadDemo/DetailView.xib index c5ef8f039..8507497b4 100644 --- a/XCodeProjects/SVGPadDemo/DetailView.xib +++ b/XCodeProjects/SVGPadDemo/DetailView.xib @@ -1,14 +1,14 @@ - 1280 - 10K549 - 1938 - 1038.36 - 461.00 + 1296 + 11E53 + 2182 + 1138.47 + 569.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 933 + 1181 YES @@ -47,7 +47,7 @@ {768, 44} - + NO NO IBIPadFramework @@ -83,7 +83,7 @@ {768, 960} - + 3 MQA @@ -108,7 +108,7 @@ {{0, 20}, {768, 1004}} - + 3 MQA @@ -271,7 +271,7 @@ 90.IBPluginDependency 93.IBPluginDependency - + YES DetailViewController com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -279,7 +279,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - SVGView + SVGKView com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -314,7 +314,7 @@ animate: exportLayers: - + YES id id @@ -327,7 +327,7 @@ animate: exportLayers: - + YES animate: @@ -347,9 +347,9 @@ scrollView toolbar - + YES - SVGView + SVGKView UIScrollView UIToolbar @@ -362,11 +362,11 @@ scrollView toolbar - + YES contentView - SVGView + SVGKView scrollView @@ -384,11 +384,11 @@ - SVGView + SVGKView UIView IBProjectSource - ./Classes/SVGView.h + ./Classes/SVGKView.h @@ -397,7 +397,7 @@ IBIPadFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 @@ -405,6 +405,6 @@ YES 3 - 933 + 1181 diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index 55e4cf49f..ab887341f 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -7,19 +7,13 @@ objects = { /* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* SVGPadAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SVGPadAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2804200B108E984D000629CD /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28042008108E984D000629CD /* RootViewController.m */; }; - 2804200C108E984D000629CD /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2804200A108E984D000629CD /* DetailViewController.m */; }; 2804203C108E9BAB000629CD /* DetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2804203B108E9BAB000629CD /* DetailView.xib */; }; 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; 3BC23F071488686900FC74CE /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC23F061488686900FC74CE /* libxml2.dylib */; }; - 3BF50411148C62D900CC7D17 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */; }; - 3BF50412148C62D900CC7D17 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */; }; - 3BF50414148C62D900CC7D17 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F8148C62D900CC7D17 /* SVGPathView.m */; }; 3BF50422148C63F500CC7D17 /* CurvedDiamond.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */; }; 3BF50423148C63F500CC7D17 /* Lion.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041C148C63F500CC7D17 /* Lion.svg */; }; 3BF50424148C63F500CC7D17 /* Map.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041D148C63F500CC7D17 /* Map.svg */; }; @@ -27,57 +21,70 @@ 3BF50426148C63F500CC7D17 /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041F148C63F500CC7D17 /* Note.svg */; }; 3BF50427148C63F500CC7D17 /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50420148C63F500CC7D17 /* test-wave-1.svg */; }; 3BF50428148C63F500CC7D17 /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50421148C63F500CC7D17 /* Text.svg */; }; + 662D1A2115B36C270027D07B /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 662D1A2015B36C270027D07B /* AppleSucksDOMImplementation.m */; }; + 662D1A2215B36C800027D07B /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28042008108E984D000629CD /* RootViewController.m */; }; + 662D1A2315B36C830027D07B /* SVGPadAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SVGPadAppDelegate.m */; }; + 662D1A2415B36C890027D07B /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2804200A108E984D000629CD /* DetailViewController.m */; }; + 662D1A2515B36C9C0027D07B /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */; }; 663DEFEF14BFDAC100C56E07 /* uk-only.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* uk-only.svg */; }; - 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; - 6684CDE91566D3EA00A46247 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */; }; - 6684CE041566D3EA00A46247 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE61566D3EA00A46247 /* SVGUtils.m */; }; - 6694719F1574221200EA533D /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471471574221200EA533D /* Attr.m */; }; - 669471A01574221200EA533D /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471491574221200EA533D /* CDATASection.m */; }; - 669471A11574221200EA533D /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714B1574221200EA533D /* CharacterData.m */; }; - 669471A21574221200EA533D /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714D1574221200EA533D /* Comment.m */; }; - 669471A31574221200EA533D /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714F1574221200EA533D /* Document.m */; }; - 669471A41574221200EA533D /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471511574221200EA533D /* DocumentFragment.m */; }; - 669471A51574221200EA533D /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471531574221200EA533D /* DocumentType.m */; }; - 669471A61574221200EA533D /* DOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471551574221200EA533D /* DOMImplementation.m */; }; - 669471A71574221200EA533D /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471571574221200EA533D /* Element.m */; }; - 669471A81574221200EA533D /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471591574221200EA533D /* EntityReference.m */; }; - 669471A91574221200EA533D /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694715B1574221200EA533D /* NamedNodeMap.m */; }; - 669471AA1574221200EA533D /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694715E1574221200EA533D /* Node.m */; }; - 669471AB1574221200EA533D /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471611574221200EA533D /* NodeList.m */; }; - 669471AC1574221200EA533D /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471631574221200EA533D /* ProcessingInstruction.m */; }; - 669471AD1574221200EA533D /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471651574221200EA533D /* Text.m */; }; - 669471AE1574221200EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471681574221200EA533D /* SVGDocument.m */; }; - 669471AF1574221200EA533D /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716A1574221200EA533D /* SVGCircleElement.m */; }; - 669471B01574221200EA533D /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716C1574221200EA533D /* SVGDefsElement.m */; }; - 669471B11574221200EA533D /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716E1574221200EA533D /* SVGDescriptionElement.m */; }; - 669471B21574221200EA533D /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471701574221200EA533D /* SVGElement.m */; }; - 669471B31574221200EA533D /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471721574221200EA533D /* SVGEllipseElement.m */; }; - 669471B41574221200EA533D /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471741574221200EA533D /* SVGGroupElement.m */; }; - 669471B51574221200EA533D /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471761574221200EA533D /* SVGImageElement.m */; }; - 669471B61574221200EA533D /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471781574221200EA533D /* SVGLineElement.m */; }; - 669471B71574221200EA533D /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717A1574221200EA533D /* SVGPathElement.m */; }; - 669471B81574221200EA533D /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717C1574221200EA533D /* SVGPolygonElement.m */; }; - 669471B91574221200EA533D /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717E1574221200EA533D /* SVGPolylineElement.m */; }; - 669471BA1574221200EA533D /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471801574221200EA533D /* SVGRectElement.m */; }; - 669471BB1574221200EA533D /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471821574221200EA533D /* SVGShapeElement.m */; }; - 669471BC1574221200EA533D /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471841574221200EA533D /* SVGSVGElement.m */; }; - 669471BD1574221200EA533D /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471861574221200EA533D /* SVGTextElement.m */; }; - 669471BE1574221200EA533D /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471881574221200EA533D /* SVGTitleElement.m */; }; - 669471BF1574221200EA533D /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694718B1574221200EA533D /* SVGKParseResult.m */; }; - 669471C01574221200EA533D /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694718E1574221200EA533D /* SVGKParserSVG.m */; }; - 669471C11574221200EA533D /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471901574221200EA533D /* SVGKPointsAndPathsParser.m */; }; - 669471C21574221200EA533D /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471921574221200EA533D /* SKBasicDataTypes.m */; }; - 669471C31574221200EA533D /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471941574221200EA533D /* SVGKImage.m */; }; - 669471C41574221200EA533D /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471961574221200EA533D /* SVGKImage+SVGPathView.m */; }; - 669471C51574221200EA533D /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471981574221200EA533D /* SVGKParser.m */; }; - 669471C61574221200EA533D /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719A1574221200EA533D /* SVGKPattern.m */; }; - 669471C71574221200EA533D /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719C1574221200EA533D /* SVGKSource.m */; }; - 669471C81574221200EA533D /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719E1574221200EA533D /* SVGKView.m */; }; 66BBD74315028F0A00102FEF /* australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* australia_states_blank.svg */; }; 66BBD7461502A4EE00102FEF /* Europe_states_reduced.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */; }; + 66CBCA8415B368F300C36B57 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */; }; + 66CBCA8515B368F300C36B57 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE61566D3EA00A46247 /* SVGUtils.m */; }; + 66CBCA8615B3694A00C36B57 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471471574221200EA533D /* Attr.m */; }; + 66CBCA8715B3694A00C36B57 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471491574221200EA533D /* CDATASection.m */; }; + 66CBCA8815B3694A00C36B57 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714B1574221200EA533D /* CharacterData.m */; }; + 66CBCA8915B3694A00C36B57 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714D1574221200EA533D /* Comment.m */; }; + 66CBCA8A15B3694A00C36B57 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714F1574221200EA533D /* Document.m */; }; + 66CBCA8B15B3694A00C36B57 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471511574221200EA533D /* DocumentFragment.m */; }; + 66CBCA8C15B3694A00C36B57 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471531574221200EA533D /* DocumentType.m */; }; + 66CBCA8E15B3694A00C36B57 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471571574221200EA533D /* Element.m */; }; + 66CBCA8F15B3694A00C36B57 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471591574221200EA533D /* EntityReference.m */; }; + 66CBCA9015B3694A00C36B57 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694715B1574221200EA533D /* NamedNodeMap.m */; }; + 66CBCA9115B3694A00C36B57 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694715E1574221200EA533D /* Node.m */; }; + 66CBCA9215B3694A00C36B57 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471611574221200EA533D /* NodeList.m */; }; + 66CBCA9315B3694A00C36B57 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471631574221200EA533D /* ProcessingInstruction.m */; }; + 66CBCA9415B3694A00C36B57 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471651574221200EA533D /* Text.m */; }; + 66CBCA9515B3694A00C36B57 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471681574221200EA533D /* SVGDocument.m */; }; + 66CBCA9615B3694A00C36B57 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716A1574221200EA533D /* SVGCircleElement.m */; }; + 66CBCA9715B3694A00C36B57 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716C1574221200EA533D /* SVGDefsElement.m */; }; + 66CBCA9815B3694A00C36B57 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716E1574221200EA533D /* SVGDescriptionElement.m */; }; + 66CBCA9915B3694A00C36B57 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471701574221200EA533D /* SVGElement.m */; }; + 66CBCA9A15B3694A00C36B57 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471721574221200EA533D /* SVGEllipseElement.m */; }; + 66CBCA9B15B3694B00C36B57 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471741574221200EA533D /* SVGGroupElement.m */; }; + 66CBCA9C15B3694B00C36B57 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471761574221200EA533D /* SVGImageElement.m */; }; + 66CBCA9D15B3694B00C36B57 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471781574221200EA533D /* SVGLineElement.m */; }; + 66CBCA9E15B3694B00C36B57 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717A1574221200EA533D /* SVGPathElement.m */; }; + 66CBCA9F15B3694B00C36B57 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717C1574221200EA533D /* SVGPolygonElement.m */; }; + 66CBCAA015B3694B00C36B57 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717E1574221200EA533D /* SVGPolylineElement.m */; }; + 66CBCAA115B3694B00C36B57 /* SVGRectElement.h in Sources */ = {isa = PBXBuildFile; fileRef = 6694717F1574221200EA533D /* SVGRectElement.h */; }; + 66CBCAA215B3694B00C36B57 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471821574221200EA533D /* SVGShapeElement.m */; }; + 66CBCAA315B3694B00C36B57 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471841574221200EA533D /* SVGSVGElement.m */; }; + 66CBCAA415B3694B00C36B57 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471861574221200EA533D /* SVGTextElement.m */; }; + 66CBCAA515B3694B00C36B57 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471881574221200EA533D /* SVGTitleElement.m */; }; + 66CBCAA615B3694B00C36B57 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694718B1574221200EA533D /* SVGKParseResult.m */; }; + 66CBCAA715B3694B00C36B57 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694718E1574221200EA533D /* SVGKParserSVG.m */; }; + 66CBCAA815B3694B00C36B57 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471901574221200EA533D /* SVGKPointsAndPathsParser.m */; }; + 66CBCAA915B3694B00C36B57 /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471921574221200EA533D /* SKBasicDataTypes.m */; }; + 66CBCAAA15B3694B00C36B57 /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471941574221200EA533D /* SVGKImage.m */; }; + 66CBCAAB15B3694B00C36B57 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471961574221200EA533D /* SVGKImage+SVGPathView.m */; }; + 66CBCAAC15B3694B00C36B57 /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471981574221200EA533D /* SVGKParser.m */; }; + 66CBCAAD15B3694B00C36B57 /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719A1574221200EA533D /* SVGKPattern.m */; }; + 66CBCAAE15B3694B00C36B57 /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719C1574221200EA533D /* SVGKSource.m */; }; + 66CBCAAF15B3694B00C36B57 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719E1574221200EA533D /* SVGKView.m */; }; + 66CBCABF15B3696E00C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAB115B3696E00C36B57 /* SVGAngle.m */; }; + 66CBCAC115B3696E00C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAB615B3696E00C36B57 /* SVGMatrix.m */; }; + 66CBCAC215B3696E00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAB915B3696E00C36B57 /* SVGPoint.m */; }; + 66CBCAC315B3696E00C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCABD15B3696E00C36B57 /* SVGTransform.m */; }; + 66CBCAC615B3699000C36B57 /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAC515B3698F00C36B57 /* SVGKParserStackItem.m */; }; + 66CBCAC915B369AA00C36B57 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAC815B369AA00C36B57 /* SVGKParserPatternsAndGradients.m */; }; + 66CBCACA15B36A4000C36B57 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */; }; + 66CBCACB15B36A4300C36B57 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */; }; + 66CBCACC15B36A4700C36B57 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F8148C62D900CC7D17 /* SVGPathView.m */; }; + 66CBCACD15B36A5A00C36B57 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471801574221200EA533D /* SVGRectElement.m */; }; C94B6C5D1274BBFC00B456EB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */; }; /* End PBXBuildFile section */ @@ -110,6 +117,8 @@ 3BF5041F148C63F500CC7D17 /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; 3BF50420148C63F500CC7D17 /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; 3BF50421148C63F500CC7D17 /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; + 662D1A1F15B36C270027D07B /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; + 662D1A2015B36C270027D07B /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; 663DEFEE14BFDAC100C56E07 /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; @@ -135,8 +144,6 @@ 669471511574221200EA533D /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; 669471521574221200EA533D /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; 669471531574221200EA533D /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; - 669471541574221200EA533D /* DOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementation.h; sourceTree = ""; }; - 669471551574221200EA533D /* DOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMImplementation.m; sourceTree = ""; }; 669471561574221200EA533D /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; 669471571574221200EA533D /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; 669471581574221200EA533D /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; @@ -210,6 +217,23 @@ 6694719E1574221200EA533D /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; 66BBD74215028F0A00102FEF /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; + 66CBCAB015B3696E00C36B57 /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; + 66CBCAB115B3696E00C36B57 /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; + 66CBCAB215B3696E00C36B57 /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; + 66CBCAB515B3696E00C36B57 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; + 66CBCAB615B3696E00C36B57 /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; + 66CBCAB715B3696E00C36B57 /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; + 66CBCAB815B3696E00C36B57 /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; + 66CBCAB915B3696E00C36B57 /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; + 66CBCABA15B3696E00C36B57 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; + 66CBCABB15B3696E00C36B57 /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; + 66CBCABC15B3696E00C36B57 /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; + 66CBCABD15B3696E00C36B57 /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; + 66CBCABE15B3696E00C36B57 /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; + 66CBCAC415B3698F00C36B57 /* SVGKParserStackItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserStackItem.h; sourceTree = ""; }; + 66CBCAC515B3698F00C36B57 /* SVGKParserStackItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserStackItem.m; sourceTree = ""; }; + 66CBCAC715B369AA00C36B57 /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; + 66CBCAC815B369AA00C36B57 /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; 8D1107310486CEB800E47090 /* SVGPad-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SVGPad-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -319,6 +343,8 @@ 669471891574221200EA533D /* Parsing */, 669471911574221200EA533D /* SKBasicDataTypes.h */, 669471921574221200EA533D /* SKBasicDataTypes.m */, + 66CBCAC415B3698F00C36B57 /* SVGKParserStackItem.h */, + 66CBCAC515B3698F00C36B57 /* SVGKParserStackItem.m */, 669471931574221200EA533D /* SVGKImage.h */, 669471941574221200EA533D /* SVGKImage.m */, 669471951574221200EA533D /* SVGKImage+SVGPathView.h */, @@ -425,6 +451,8 @@ 669471451574221200EA533D /* Core DOM */ = { isa = PBXGroup; children = ( + 662D1A1F15B36C270027D07B /* AppleSucksDOMImplementation.h */, + 662D1A2015B36C270027D07B /* AppleSucksDOMImplementation.m */, 669471461574221200EA533D /* Attr.h */, 669471471574221200EA533D /* Attr.m */, 669471481574221200EA533D /* CDATASection.h */, @@ -439,8 +467,6 @@ 669471511574221200EA533D /* DocumentFragment.m */, 669471521574221200EA533D /* DocumentType.h */, 669471531574221200EA533D /* DocumentType.m */, - 669471541574221200EA533D /* DOMImplementation.h */, - 669471551574221200EA533D /* DOMImplementation.m */, 669471561574221200EA533D /* Element.h */, 669471571574221200EA533D /* Element.m */, 669471581574221200EA533D /* EntityReference.h */, @@ -464,6 +490,19 @@ 669471661574221200EA533D /* SVG-DOM */ = { isa = PBXGroup; children = ( + 66CBCAB015B3696E00C36B57 /* SVGAngle.h */, + 66CBCAB115B3696E00C36B57 /* SVGAngle.m */, + 66CBCAB215B3696E00C36B57 /* SVGDocument_Mutable.h */, + 66CBCAB515B3696E00C36B57 /* SVGMatrix.h */, + 66CBCAB615B3696E00C36B57 /* SVGMatrix.m */, + 66CBCAB715B3696E00C36B57 /* SVGNumber.h */, + 66CBCAB815B3696E00C36B57 /* SVGPoint.h */, + 66CBCAB915B3696E00C36B57 /* SVGPoint.m */, + 66CBCABA15B3696E00C36B57 /* SVGRect.h */, + 66CBCABB15B3696E00C36B57 /* SVGSVGElement_Mutable.h */, + 66CBCABC15B3696E00C36B57 /* SVGTransform.h */, + 66CBCABD15B3696E00C36B57 /* SVGTransform.m */, + 66CBCABE15B3696E00C36B57 /* SVGViewSpec.h */, 669471671574221200EA533D /* SVGDocument.h */, 669471681574221200EA533D /* SVGDocument.m */, ); @@ -476,6 +515,8 @@ 6694718A1574221200EA533D /* SVGKParseResult.h */, 6694718B1574221200EA533D /* SVGKParseResult.m */, 6694718C1574221200EA533D /* SVGKParserExtension.h */, + 66CBCAC715B369AA00C36B57 /* SVGKParserPatternsAndGradients.h */, + 66CBCAC815B369AA00C36B57 /* SVGKParserPatternsAndGradients.m */, 6694718D1574221200EA533D /* SVGKParserSVG.h */, 6694718E1574221200EA533D /* SVGKParserSVG.m */, 6694718F1574221200EA533D /* SVGKPointsAndPathsParser.h */, @@ -563,57 +604,64 @@ buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* SVGPadAppDelegate.m in Sources */, - 2804200B108E984D000629CD /* RootViewController.m in Sources */, - 2804200C108E984D000629CD /* DetailViewController.m in Sources */, - 3BF50411148C62D900CC7D17 /* CALayerWithChildHitTest.m in Sources */, - 3BF50412148C62D900CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, - 3BF50414148C62D900CC7D17 /* SVGPathView.m in Sources */, - 66436E5314A0BCEF001CC769 /* CALayerExporter.m in Sources */, - 6684CDE91566D3EA00A46247 /* CGPathAdditions.m in Sources */, - 6684CE041566D3EA00A46247 /* SVGUtils.m in Sources */, - 6694719F1574221200EA533D /* Attr.m in Sources */, - 669471A01574221200EA533D /* CDATASection.m in Sources */, - 669471A11574221200EA533D /* CharacterData.m in Sources */, - 669471A21574221200EA533D /* Comment.m in Sources */, - 669471A31574221200EA533D /* Document.m in Sources */, - 669471A41574221200EA533D /* DocumentFragment.m in Sources */, - 669471A51574221200EA533D /* DocumentType.m in Sources */, - 669471A61574221200EA533D /* DOMImplementation.m in Sources */, - 669471A71574221200EA533D /* Element.m in Sources */, - 669471A81574221200EA533D /* EntityReference.m in Sources */, - 669471A91574221200EA533D /* NamedNodeMap.m in Sources */, - 669471AA1574221200EA533D /* Node.m in Sources */, - 669471AB1574221200EA533D /* NodeList.m in Sources */, - 669471AC1574221200EA533D /* ProcessingInstruction.m in Sources */, - 669471AD1574221200EA533D /* Text.m in Sources */, - 669471AE1574221200EA533D /* SVGDocument.m in Sources */, - 669471AF1574221200EA533D /* SVGCircleElement.m in Sources */, - 669471B01574221200EA533D /* SVGDefsElement.m in Sources */, - 669471B11574221200EA533D /* SVGDescriptionElement.m in Sources */, - 669471B21574221200EA533D /* SVGElement.m in Sources */, - 669471B31574221200EA533D /* SVGEllipseElement.m in Sources */, - 669471B41574221200EA533D /* SVGGroupElement.m in Sources */, - 669471B51574221200EA533D /* SVGImageElement.m in Sources */, - 669471B61574221200EA533D /* SVGLineElement.m in Sources */, - 669471B71574221200EA533D /* SVGPathElement.m in Sources */, - 669471B81574221200EA533D /* SVGPolygonElement.m in Sources */, - 669471B91574221200EA533D /* SVGPolylineElement.m in Sources */, - 669471BA1574221200EA533D /* SVGRectElement.m in Sources */, - 669471BB1574221200EA533D /* SVGShapeElement.m in Sources */, - 669471BC1574221200EA533D /* SVGSVGElement.m in Sources */, - 669471BD1574221200EA533D /* SVGTextElement.m in Sources */, - 669471BE1574221200EA533D /* SVGTitleElement.m in Sources */, - 669471BF1574221200EA533D /* SVGKParseResult.m in Sources */, - 669471C01574221200EA533D /* SVGKParserSVG.m in Sources */, - 669471C11574221200EA533D /* SVGKPointsAndPathsParser.m in Sources */, - 669471C21574221200EA533D /* SKBasicDataTypes.m in Sources */, - 669471C31574221200EA533D /* SVGKImage.m in Sources */, - 669471C41574221200EA533D /* SVGKImage+SVGPathView.m in Sources */, - 669471C51574221200EA533D /* SVGKParser.m in Sources */, - 669471C61574221200EA533D /* SVGKPattern.m in Sources */, - 669471C71574221200EA533D /* SVGKSource.m in Sources */, - 669471C81574221200EA533D /* SVGKView.m in Sources */, + 66CBCA8415B368F300C36B57 /* CGPathAdditions.m in Sources */, + 66CBCA8515B368F300C36B57 /* SVGUtils.m in Sources */, + 66CBCA8615B3694A00C36B57 /* Attr.m in Sources */, + 66CBCA8715B3694A00C36B57 /* CDATASection.m in Sources */, + 66CBCA8815B3694A00C36B57 /* CharacterData.m in Sources */, + 66CBCA8915B3694A00C36B57 /* Comment.m in Sources */, + 66CBCA8A15B3694A00C36B57 /* Document.m in Sources */, + 66CBCA8B15B3694A00C36B57 /* DocumentFragment.m in Sources */, + 66CBCA8C15B3694A00C36B57 /* DocumentType.m in Sources */, + 66CBCA8E15B3694A00C36B57 /* Element.m in Sources */, + 66CBCA8F15B3694A00C36B57 /* EntityReference.m in Sources */, + 66CBCA9015B3694A00C36B57 /* NamedNodeMap.m in Sources */, + 66CBCA9115B3694A00C36B57 /* Node.m in Sources */, + 66CBCA9215B3694A00C36B57 /* NodeList.m in Sources */, + 66CBCA9315B3694A00C36B57 /* ProcessingInstruction.m in Sources */, + 66CBCA9415B3694A00C36B57 /* Text.m in Sources */, + 66CBCA9515B3694A00C36B57 /* SVGDocument.m in Sources */, + 66CBCA9615B3694A00C36B57 /* SVGCircleElement.m in Sources */, + 66CBCA9715B3694A00C36B57 /* SVGDefsElement.m in Sources */, + 66CBCA9815B3694A00C36B57 /* SVGDescriptionElement.m in Sources */, + 66CBCA9915B3694A00C36B57 /* SVGElement.m in Sources */, + 66CBCA9A15B3694A00C36B57 /* SVGEllipseElement.m in Sources */, + 66CBCA9B15B3694B00C36B57 /* SVGGroupElement.m in Sources */, + 66CBCA9C15B3694B00C36B57 /* SVGImageElement.m in Sources */, + 66CBCA9D15B3694B00C36B57 /* SVGLineElement.m in Sources */, + 66CBCA9E15B3694B00C36B57 /* SVGPathElement.m in Sources */, + 66CBCA9F15B3694B00C36B57 /* SVGPolygonElement.m in Sources */, + 66CBCAA015B3694B00C36B57 /* SVGPolylineElement.m in Sources */, + 66CBCAA115B3694B00C36B57 /* SVGRectElement.h in Sources */, + 66CBCAA215B3694B00C36B57 /* SVGShapeElement.m in Sources */, + 66CBCAA315B3694B00C36B57 /* SVGSVGElement.m in Sources */, + 66CBCAA415B3694B00C36B57 /* SVGTextElement.m in Sources */, + 66CBCAA515B3694B00C36B57 /* SVGTitleElement.m in Sources */, + 66CBCAA615B3694B00C36B57 /* SVGKParseResult.m in Sources */, + 66CBCAA715B3694B00C36B57 /* SVGKParserSVG.m in Sources */, + 66CBCAA815B3694B00C36B57 /* SVGKPointsAndPathsParser.m in Sources */, + 66CBCAA915B3694B00C36B57 /* SKBasicDataTypes.m in Sources */, + 66CBCAAA15B3694B00C36B57 /* SVGKImage.m in Sources */, + 66CBCAAB15B3694B00C36B57 /* SVGKImage+SVGPathView.m in Sources */, + 66CBCAAC15B3694B00C36B57 /* SVGKParser.m in Sources */, + 66CBCAAD15B3694B00C36B57 /* SVGKPattern.m in Sources */, + 66CBCAAE15B3694B00C36B57 /* SVGKSource.m in Sources */, + 66CBCAAF15B3694B00C36B57 /* SVGKView.m in Sources */, + 66CBCABF15B3696E00C36B57 /* SVGAngle.m in Sources */, + 66CBCAC115B3696E00C36B57 /* SVGMatrix.m in Sources */, + 66CBCAC215B3696E00C36B57 /* SVGPoint.m in Sources */, + 66CBCAC315B3696E00C36B57 /* SVGTransform.m in Sources */, + 66CBCAC615B3699000C36B57 /* SVGKParserStackItem.m in Sources */, + 66CBCAC915B369AA00C36B57 /* SVGKParserPatternsAndGradients.m in Sources */, + 66CBCACA15B36A4000C36B57 /* CALayerWithChildHitTest.m in Sources */, + 66CBCACB15B36A4300C36B57 /* CAShapeLayerWithHitTest.m in Sources */, + 66CBCACC15B36A4700C36B57 /* SVGPathView.m in Sources */, + 66CBCACD15B36A5A00C36B57 /* SVGRectElement.m in Sources */, + 662D1A2115B36C270027D07B /* AppleSucksDOMImplementation.m in Sources */, + 662D1A2215B36C800027D07B /* RootViewController.m in Sources */, + 662D1A2315B36C830027D07B /* SVGPadAppDelegate.m in Sources */, + 662D1A2415B36C890027D07B /* DetailViewController.m in Sources */, + 662D1A2515B36C9C0027D07B /* CALayerExporter.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 1564013162aa6d87eec1db120431d6c1777ba6ff Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 15 Jul 2012 22:45:59 +0100 Subject: [PATCH 049/110] Added simple test (on console only) to check that the SVGDocument getElementsByTagName method is working (it searches for elements with the G node/tag) --- XCodeProjects/SVGPadDemo/Classes/DetailViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m index 33d0ad467..269cdd511 100644 --- a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m +++ b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m @@ -9,6 +9,8 @@ #import "RootViewController.h" +#import "NodeList+Mutable.h" + @interface DetailViewController () @property (nonatomic, retain) UIPopoverController *popoverController; @@ -73,6 +75,9 @@ - (void)loadResource:(NSString *)name [self.scrollView addSubview:self.contentView]; [self.scrollView setContentSize: document.size]; [self.scrollView zoomToRect:CGRectMake(0, 0, document.size.width, document.size.height) animated:YES]; + + NodeList* elementsUsingTagG = [document.DOMDocument getElementsByTagName:@"g"]; + NSLog( @"[%@] checking for SVG standard set of elements with XML tag/node of : %@", [self class], elementsUsingTagG.internalArray ); } else { From 01aba2c74bec3d41dd73eab9a587d0e9a3bb7e97 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 15 Jul 2012 23:38:08 +0100 Subject: [PATCH 050/110] Added parser support for transform=scale and transform=rotate - untested, but both piggyback off transform=matrix so should probably work OK --- Core/DOM classes/SVGElement.m | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 34eb80a60..5dc94d72c 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -147,6 +147,16 @@ - (void)parseAttributes:(NSDictionary *)attributes { self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); } + else if( [command isEqualToString:@"scale"] ) + { + NSArray *scaleStrings = [[parameterStrings objectAtIndex:0] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + + CGFloat xScale = [(NSString*)[scaleStrings objectAtIndex:0] floatValue]; + CGFloat yScale = [scaleStrings count] > 1 ? [(NSString*)[scaleStrings objectAtIndex:1] floatValue] : xScale; + + CGAffineTransform nt = CGAffineTransformMakeScale(xScale, yScale); + self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); + } else if( [command isEqualToString:@"matrix"] ) { CGFloat a = [(NSString*)[parameterStrings objectAtIndex:0] floatValue]; @@ -160,9 +170,44 @@ - (void)parseAttributes:(NSDictionary *)attributes { self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); } + else if( [command isEqualToString:@"rotate"] ) + { + /** + This section merged from warpflyght's commit: + + https://github.com/warpflyght/SVGKit/commit/c1bd9b3d0607635dda14ec03579793fc682763d9 + + */ + NSArray *rotateStrings = [[parameterStrings objectAtIndex:0] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + if( [rotateStrings count] == 1) + { + CGFloat degrees = [[rotateStrings objectAtIndex:0] floatValue]; + CGFloat radians = degrees * M_PI / 180.0; + + CGAffineTransform nt = CGAffineTransformMakeRotation(radians); + self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); + } + else if( [rotateStrings count] == 3) + { + CGFloat degrees = [[rotateStrings objectAtIndex:0] floatValue]; + CGFloat radians = degrees * M_PI / 180.0; + CGFloat centerX = [[rotateStrings objectAtIndex:1] floatValue]; + CGFloat centerY = [[rotateStrings objectAtIndex:2] floatValue]; + CGAffineTransform nt = CGAffineTransformIdentity; + nt = CGAffineTransformConcat( nt, CGAffineTransformMakeTranslation(centerX, centerY) ); + nt = CGAffineTransformConcat( nt, CGAffineTransformMakeRotation(radians) ); + nt = CGAffineTransformConcat( nt, CGAffineTransformMakeTranslation(-1.0 * centerX, -1.0 * centerY) ); + self.transformRelative = CGAffineTransformConcat( self.transformRelative, nt ); + } else + { + NSLog(@"[%@] ERROR: input file is illegal, has an SVG matrix transform attribute without the required 1 or 3 parameters. Item = %@, transform attribute value = %@", [self class], transformString, value ); + return; + } + } else { NSLog(@"[%@] ERROR: unsupported SVG transform command (probably legal, but not implemented yet by SVGKit): %@", [self class], command ); + NSAssert( FALSE, @"Not implemented yet: transform = %@ %@", command, transformString ); } }]; From 8bda23e1687de903e2a4d13c6409cd5fd7f221f1 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 15 Jul 2012 23:52:26 +0100 Subject: [PATCH 051/110] parseAttributes can now add errors to the parse result. Specifically, transform=skewX and transform=skewY both return an error for being unsupported attribute values --- Core/DOM classes/SVGElement.h | 8 +++++--- Core/DOM classes/SVGElement.m | 22 ++++++++++++++++++++-- Core/DOM classes/SVGEllipseElement.m | 4 +++- Core/DOM classes/SVGGroupElement.m | 4 +++- Core/DOM classes/SVGImageElement.m | 4 +++- Core/DOM classes/SVGLineElement.m | 4 +++- Core/DOM classes/SVGPathElement.m | 5 +++-- Core/DOM classes/SVGPolygonElement.m | 4 +++- Core/DOM classes/SVGPolylineElement.m | 4 +++- Core/DOM classes/SVGRectElement.m | 4 +++- Core/DOM classes/SVGSVGElement.m | 4 +++- Core/DOM classes/SVGShapeElement.m | 4 +++- Core/DOM classes/SVGTextElement.m | 4 +++- Core/Parsing/SVGKParserSVG.m | 7 ++++++- 14 files changed, 64 insertions(+), 18 deletions(-) diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index 370b7753e..d379d4009 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -40,7 +40,6 @@ @property (nonatomic, retain) SVGElement *parent; #pragma mark - ORIGINALLY PACKAGE-PROTECTED -- (void)parseAttributes:(NSDictionary *)attributes; - (void)addChild:(SVGElement *)element; - (void)parseContent:(NSString *)content; @@ -52,8 +51,11 @@ - (void)loadDefaults; // should be overriden to set element defaults -/*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; */ -- (void)parseAttributes:(NSDictionary *)attributes; +/*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; + Returns nil, or an error if something failed trying to parse attributes (usually: + unsupported SVG feature that's not implemented yet) +*/ +- (NSError*)parseAttributes:(NSDictionary *)attributes; /*! Re-calculates the absolute transform on-demand by querying parent's absolute transform and appending self's relative transform */ -(CGAffineTransform) transformAbsolute; diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 5dc94d72c..b11a09b90 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -80,7 +80,7 @@ - (void)addChild:(SVGElement *)element { element.parent = self; } -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { // to be overriden by subclasses // make sure super implementation is called @@ -204,9 +204,25 @@ - (void)parseAttributes:(NSDictionary *)attributes { return; } } + else if( [command isEqualToString:@"skewX"] ) + { + NSLog(@"[%@] ERROR: skew is unsupported: %@", [self class], command ); + + return [NSError errorWithDomain:@"SVGKit" code:15184 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + @"transform=skewX is unsupported", NSLocalizedDescriptionKey, + nil] + ]; + } + else if( [command isEqualToString:@"skewY"] ) + { + NSLog(@"[%@] ERROR: skew is unsupported: %@", [self class], command ); + return [NSError errorWithDomain:@"SVGKit" code:15184 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + @"transform=skewY is unsupported", NSLocalizedDescriptionKey, + nil] + ]; + } else { - NSLog(@"[%@] ERROR: unsupported SVG transform command (probably legal, but not implemented yet by SVGKit): %@", [self class], command ); NSAssert( FALSE, @"Not implemented yet: transform = %@ %@", command, transformString ); } }]; @@ -214,6 +230,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { NSLog(@"[%@] Set local / relative transform = (%2.2f, %2.2f // %2.2f, %2.2f) + (%2.2f, %2.2f translate)", [self class], self.transformRelative.a, self.transformRelative.b, self.transformRelative.c, self.transformRelative.d, self.transformRelative.tx, self.transformRelative.ty ); #endif } + + return nil; } -(CGAffineTransform) transformAbsolute diff --git a/Core/DOM classes/SVGEllipseElement.m b/Core/DOM classes/SVGEllipseElement.m index a9ba0bf14..5e1e708e9 100644 --- a/Core/DOM classes/SVGEllipseElement.m +++ b/Core/DOM classes/SVGEllipseElement.m @@ -14,7 +14,7 @@ @implementation SVGEllipseElement @synthesize rx = _rx; @synthesize ry = _ry; -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -45,6 +45,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); + + return nil; } @end diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index 2e0051e78..fd6faa08f 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -27,7 +27,7 @@ - (void)loadDefaults { _opacity = 1.0f; } -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -35,6 +35,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"opacity"])) { _opacity = [value floatValue]; } + + return nil; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 4228415c3..80a50f6ca 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -58,7 +58,7 @@ - (id)init { return self; } -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { id value = nil; if ((value = [attributes objectForKey:@"x"])) { @@ -80,6 +80,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"href"])) { _href = [value retain]; } + + return nil; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/DOM classes/SVGLineElement.m b/Core/DOM classes/SVGLineElement.m index 6852f0d7b..0c27ba3cf 100644 --- a/Core/DOM classes/SVGLineElement.m +++ b/Core/DOM classes/SVGLineElement.m @@ -14,7 +14,7 @@ @implementation SVGLineElement @synthesize x2 = _x2; @synthesize y2 = _y2; -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -41,6 +41,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); + + return nil; } @end diff --git a/Core/DOM classes/SVGPathElement.m b/Core/DOM classes/SVGPathElement.m index 61dacf8e9..f03bdd9dc 100644 --- a/Core/DOM classes/SVGPathElement.m +++ b/Core/DOM classes/SVGPathElement.m @@ -13,13 +13,12 @@ @interface SVGPathElement () - (void) parseData:(NSString *)data; -- (void) parseAttributes:(NSDictionary *)attributes; @end @implementation SVGPathElement -- (void)parseAttributes:(NSDictionary *)attributes +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; @@ -28,6 +27,8 @@ - (void)parseAttributes:(NSDictionary *)attributes if ((value = [attributes objectForKey:@"d"])) { [self parseData:value]; } + + return nil; } - (void)parseData:(NSString *)data diff --git a/Core/DOM classes/SVGPolygonElement.m b/Core/DOM classes/SVGPolygonElement.m index 9c47f6904..53928b6d4 100644 --- a/Core/DOM classes/SVGPolygonElement.m +++ b/Core/DOM classes/SVGPolygonElement.m @@ -17,7 +17,7 @@ - (void) parseData:(NSString *)data; @implementation SVGPolygonElement -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -25,6 +25,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"points"])) { [self parseData:value]; } + + return nil; } /*! According to SVG spec, a 'polygon' is EXACTYLY IDENTICAL to a 'path', if you prepend the letter "M", and diff --git a/Core/DOM classes/SVGPolylineElement.m b/Core/DOM classes/SVGPolylineElement.m index 717858226..8c6a1e17c 100644 --- a/Core/DOM classes/SVGPolylineElement.m +++ b/Core/DOM classes/SVGPolylineElement.m @@ -11,7 +11,7 @@ @implementation SVGPolylineElement -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -22,6 +22,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } + + return nil; } @end diff --git a/Core/DOM classes/SVGRectElement.m b/Core/DOM classes/SVGRectElement.m index e3ed6a334..15f338d08 100644 --- a/Core/DOM classes/SVGRectElement.m +++ b/Core/DOM classes/SVGRectElement.m @@ -54,7 +54,7 @@ void CGPathAddRoundedRect (CGMutablePathRef path, CGRect rect, CGFloat radius) { CGPathCloseSubpath(path); } -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -98,6 +98,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); + + return nil; } @end diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index 8160721ae..1743d17d0 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -75,7 +75,7 @@ -(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, @"Not implem #pragma mark - Objective C methods needed given our current non-compliant SVG Parser -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -102,6 +102,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { #endif } + + return nil; } - (SVGElement *)findFirstElementOfClass:(Class)class { diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 92d5bfa0c..c33a5b07b 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -46,7 +46,7 @@ - (void)loadDefaults { _fillType = SVGFillTypeSolid; } -- (void)parseAttributes:(NSDictionary *)attributes { +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; id value = nil; @@ -96,6 +96,8 @@ - (void)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"fill-opacity"])) { _fillColor.a = (uint8_t) ([value floatValue] * 0xFF); } + + return nil; } - (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath { diff --git a/Core/DOM classes/SVGTextElement.m b/Core/DOM classes/SVGTextElement.m index d4d8b225e..a8a890401 100644 --- a/Core/DOM classes/SVGTextElement.m +++ b/Core/DOM classes/SVGTextElement.m @@ -28,7 +28,7 @@ - (void)dealloc { [super dealloc]; } -- (void)parseAttributes:(NSDictionary *)attributes +- (NSError*)parseAttributes:(NSDictionary *)attributes { [super parseAttributes:attributes]; @@ -71,6 +71,8 @@ - (void)parseAttributes:(NSDictionary *)attributes // transform = "scale(0.80449853,1.2430103)"; // "writing-mode" = "lr-tb"; + + return nil; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 14ee50990..976c9b264 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -82,7 +82,12 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSou } SVGElement *element = [[[elementClass alloc] initWithName:name] autorelease]; - [element parseAttributes:attributes]; + NSError* errorOrNil = [element parseAttributes:attributes]; + + if( errorOrNil != nil ) + { + [parseResult addParseErrorRecoverable:errorOrNil]; + } /** special case: */ if( [@"svg" isEqualToString:name] ) From 3aee9e1b2b91799954b1be017a10331fdf46815d Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 16 Jul 2012 18:12:53 +0100 Subject: [PATCH 052/110] FIXED previous commit (had problems with Xcode compiler), and removed all genuine Compiler Warnings --- Core/DOM classes/SVGElement.h | 38 +------------------ Core/DOM classes/SVGElement.m | 15 ++++---- Core/DOM classes/SVGElement_ForParser.h | 23 +++++++++++ Core/DOM classes/SVGEllipseElement.m | 8 ++-- Core/DOM classes/SVGGroupElement.h | 1 + Core/DOM classes/SVGGroupElement.m | 8 ++-- Core/DOM classes/SVGImageElement.h | 2 + Core/DOM classes/SVGImageElement.m | 4 +- Core/DOM classes/SVGLayeredElement.h | 20 ++++++++++ Core/DOM classes/SVGLineElement.m | 8 ++-- Core/DOM classes/SVGPathElement.m | 8 ++-- Core/DOM classes/SVGPolygonElement.m | 8 ++-- Core/DOM classes/SVGPolylineElement.m | 9 +++-- Core/DOM classes/SVGRectElement.m | 7 ++-- Core/DOM classes/SVGSVGElement.h | 1 + Core/DOM classes/SVGSVGElement.m | 9 +++-- Core/DOM classes/SVGShapeElement.h | 1 + Core/DOM classes/SVGShapeElement.m | 11 +++--- Core/DOM classes/SVGTextElement.h | 1 + Core/DOM classes/SVGTextElement.m | 10 ++--- Core/Parsing/SVGKParseResult.h | 1 + Core/Parsing/SVGKParserExtension.h | 6 +-- Core/Parsing/SVGKParserSVG.m | 7 +--- Core/SVGKImage+SVGPathView.h | 2 + Core/SVGKImage.m | 4 +- Core/SVGKParser.h | 2 +- Core/SVGKParserStackItem.h | 3 ++ .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 16 +++++++- .../SVGPad.xcodeproj/project.pbxproj | 4 +- 29 files changed, 133 insertions(+), 104 deletions(-) create mode 100644 Core/DOM classes/SVGElement_ForParser.h create mode 100644 Core/DOM classes/SVGLayeredElement.h diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index d379d4009..c153e1b86 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -18,6 +18,7 @@ */ #import + @interface SVGElement : NSObject { @private NSMutableArray *_children; @@ -43,40 +44,5 @@ - (void)addChild:(SVGElement *)element; - (void)parseContent:(NSString *)content; -#pragma mark - Public - -+ (BOOL)shouldStoreContent; // to optimize parser, default is NO - -- (id)initWithName:(NSString *)name; - -- (void)loadDefaults; // should be overriden to set element defaults - -/*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; - Returns nil, or an error if something failed trying to parse attributes (usually: - unsupported SVG feature that's not implemented yet) -*/ -- (NSError*)parseAttributes:(NSDictionary *)attributes; - -/*! Re-calculates the absolute transform on-demand by querying parent's absolute transform and appending self's relative transform */ --(CGAffineTransform) transformAbsolute; - - -@end - -@protocol SVGLayeredElement < NSObject > - -/*! - SVG's can be specified in any arbitrary resolution; many on the internet have impossibly huge co-ordinates, e.g. "1 million x 1 million", - but when you render them, you're expected to scale that co-ord down to your local co-ords - e.g. "1024x768" for an iPad 1 screen. So, when - generating layers, we provide the transform that will perform that scale (NB: this is the compound transform from all "viewbox / width,height" - found in higher layers of the tree) - - NB: the returned layer has - as its "name" property - the "identifier" property of the SVGElement that created it; - but that can be overwritten by applications (for valid reasons), so we ADDITIONALLY store the identifier into a - custom key - kSVGElementIdentifier - on the CALayer. Because it's a custom key, it's (almost) guaranteed not to be - overwritten / altered by other application code - */ -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform; -- (void)layoutLayer:(CALayer *)layer; -@end +@end \ No newline at end of file diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index b11a09b90..c8b20ac71 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -7,6 +7,8 @@ #import "SVGElement.h" +#import "SVGElement_ForParser.h" //.h" // to solve insane Xcode circular dependencies + @interface SVGElement () @property (nonatomic, copy) NSString *stringValue; @@ -80,7 +82,7 @@ - (void)addChild:(SVGElement *)element { element.parent = self; } -- (NSError*)parseAttributes:(NSDictionary *)attributes { +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { // to be overriden by subclasses // make sure super implementation is called @@ -208,18 +210,18 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { { NSLog(@"[%@] ERROR: skew is unsupported: %@", [self class], command ); - return [NSError errorWithDomain:@"SVGKit" code:15184 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + [parseResult addParseErrorRecoverable: [NSError errorWithDomain:@"SVGKit" code:15184 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"transform=skewX is unsupported", NSLocalizedDescriptionKey, nil] - ]; + ]]; } else if( [command isEqualToString:@"skewY"] ) { NSLog(@"[%@] ERROR: skew is unsupported: %@", [self class], command ); - return [NSError errorWithDomain:@"SVGKit" code:15184 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + [parseResult addParseErrorRecoverable: [NSError errorWithDomain:@"SVGKit" code:15184 userInfo:[NSDictionary dictionaryWithObjectsAndKeys: @"transform=skewY is unsupported", NSLocalizedDescriptionKey, nil] - ]; + ]]; } else { @@ -230,8 +232,7 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { NSLog(@"[%@] Set local / relative transform = (%2.2f, %2.2f // %2.2f, %2.2f) + (%2.2f, %2.2f translate)", [self class], self.transformRelative.a, self.transformRelative.b, self.transformRelative.c, self.transformRelative.d, self.transformRelative.tx, self.transformRelative.ty ); #endif } - - return nil; + } -(CGAffineTransform) transformAbsolute diff --git a/Core/DOM classes/SVGElement_ForParser.h b/Core/DOM classes/SVGElement_ForParser.h new file mode 100644 index 000000000..28e9b9f10 --- /dev/null +++ b/Core/DOM classes/SVGElement_ForParser.h @@ -0,0 +1,23 @@ +#import "SVGElement.h" + +#import "SVGKParseResult.h" + +@interface SVGElement () + + ++ (BOOL)shouldStoreContent; // to optimize parser, default is NO + +- (id)initWithName:(NSString *)name; + +- (void)loadDefaults; // should be overriden to set element defaults + +/*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; + Returns nil, or an error if something failed trying to parse attributes (usually: + unsupported SVG feature that's not implemented yet) + */ +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult; + +/*! Re-calculates the absolute transform on-demand by querying parent's absolute transform and appending self's relative transform */ +-(CGAffineTransform) transformAbsolute; + +@end diff --git a/Core/DOM classes/SVGEllipseElement.m b/Core/DOM classes/SVGEllipseElement.m index 5e1e708e9..f380dca36 100644 --- a/Core/DOM classes/SVGEllipseElement.m +++ b/Core/DOM classes/SVGEllipseElement.m @@ -7,6 +7,8 @@ #import "SVGEllipseElement.h" +#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) + @implementation SVGEllipseElement @synthesize cx = _cx; @@ -14,8 +16,8 @@ @implementation SVGEllipseElement @synthesize rx = _rx; @synthesize ry = _ry; -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -45,8 +47,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); - - return nil; } @end diff --git a/Core/DOM classes/SVGGroupElement.h b/Core/DOM classes/SVGGroupElement.h index 2e128fc40..5c1a24c5e 100644 --- a/Core/DOM classes/SVGGroupElement.h +++ b/Core/DOM classes/SVGGroupElement.h @@ -6,6 +6,7 @@ // #import "SVGElement.h" +#import "SVGLayeredElement.h" @interface SVGGroupElement : SVGElement < SVGLayeredElement > { } diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index fd6faa08f..b443e61a3 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -14,6 +14,8 @@ but allows additional nesting (e.g. for programmatic / organizational purposes). #import "CALayerWithChildHitTest.h" +#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) + @implementation SVGGroupElement @synthesize opacity = _opacity; @@ -27,16 +29,14 @@ - (void)loadDefaults { _opacity = 1.0f; } -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; if ((value = [attributes objectForKey:@"opacity"])) { _opacity = [value floatValue]; } - - return nil; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/DOM classes/SVGImageElement.h b/Core/DOM classes/SVGImageElement.h index e3173d15d..f98d0c1e3 100644 --- a/Core/DOM classes/SVGImageElement.h +++ b/Core/DOM classes/SVGImageElement.h @@ -10,6 +10,8 @@ #import "SVGElement.h" +#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) + @interface SVGImageElement : SVGElement @property (nonatomic, readonly) CGFloat x; diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 80a50f6ca..fb459a343 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -58,7 +58,7 @@ - (id)init { return self; } -- (NSError*)parseAttributes:(NSDictionary *)attributes { +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { id value = nil; if ((value = [attributes objectForKey:@"x"])) { @@ -80,8 +80,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"href"])) { _href = [value retain]; } - - return nil; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/DOM classes/SVGLayeredElement.h b/Core/DOM classes/SVGLayeredElement.h new file mode 100644 index 000000000..a4642063d --- /dev/null +++ b/Core/DOM classes/SVGLayeredElement.h @@ -0,0 +1,20 @@ +#import +#import + +@protocol SVGLayeredElement < NSObject > + +/*! + SVG's can be specified in any arbitrary resolution; many on the internet have impossibly huge co-ordinates, e.g. "1 million x 1 million", + but when you render them, you're expected to scale that co-ord down to your local co-ords - e.g. "1024x768" for an iPad 1 screen. So, when + generating layers, we provide the transform that will perform that scale (NB: this is the compound transform from all "viewbox / width,height" + found in higher layers of the tree) + + NB: the returned layer has - as its "name" property - the "identifier" property of the SVGElement that created it; + but that can be overwritten by applications (for valid reasons), so we ADDITIONALLY store the identifier into a + custom key - kSVGElementIdentifier - on the CALayer. Because it's a custom key, it's (almost) guaranteed not to be + overwritten / altered by other application code + */ +- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform; +- (void)layoutLayer:(CALayer *)layer; + +@end diff --git a/Core/DOM classes/SVGLineElement.m b/Core/DOM classes/SVGLineElement.m index 0c27ba3cf..7d4be6f47 100644 --- a/Core/DOM classes/SVGLineElement.m +++ b/Core/DOM classes/SVGLineElement.m @@ -7,6 +7,8 @@ #import "SVGLineElement.h" +#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) + @implementation SVGLineElement @synthesize x1 = _x1; @@ -14,8 +16,8 @@ @implementation SVGLineElement @synthesize x2 = _x2; @synthesize y2 = _y2; -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -41,8 +43,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); - - return nil; } @end diff --git a/Core/DOM classes/SVGPathElement.m b/Core/DOM classes/SVGPathElement.m index f03bdd9dc..e15b5aaf9 100644 --- a/Core/DOM classes/SVGPathElement.m +++ b/Core/DOM classes/SVGPathElement.m @@ -10,6 +10,8 @@ #import "SVGUtils.h" #import "SVGKPointsAndPathsParser.h" +#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) + @interface SVGPathElement () - (void) parseData:(NSString *)data; @@ -18,17 +20,15 @@ - (void) parseData:(NSString *)data; @implementation SVGPathElement -- (NSError*)parseAttributes:(NSDictionary *)attributes +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes]; + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; if ((value = [attributes objectForKey:@"d"])) { [self parseData:value]; } - - return nil; } - (void)parseData:(NSString *)data diff --git a/Core/DOM classes/SVGPolygonElement.m b/Core/DOM classes/SVGPolygonElement.m index 53928b6d4..721862dda 100644 --- a/Core/DOM classes/SVGPolygonElement.m +++ b/Core/DOM classes/SVGPolygonElement.m @@ -9,6 +9,8 @@ #import "SVGKPointsAndPathsParser.h" +#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) + @interface SVGPolygonElement() - (void) parseData:(NSString *)data; @@ -17,16 +19,14 @@ - (void) parseData:(NSString *)data; @implementation SVGPolygonElement -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; if ((value = [attributes objectForKey:@"points"])) { [self parseData:value]; } - - return nil; } /*! According to SVG spec, a 'polygon' is EXACTYLY IDENTICAL to a 'path', if you prepend the letter "M", and diff --git a/Core/DOM classes/SVGPolylineElement.m b/Core/DOM classes/SVGPolylineElement.m index 8c6a1e17c..e517e0364 100644 --- a/Core/DOM classes/SVGPolylineElement.m +++ b/Core/DOM classes/SVGPolylineElement.m @@ -9,10 +9,13 @@ #import "SVGUtils.h" +#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) + + @implementation SVGPolylineElement -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -22,8 +25,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); } - - return nil; } @end diff --git a/Core/DOM classes/SVGRectElement.m b/Core/DOM classes/SVGRectElement.m index 15f338d08..8c3c9e34f 100644 --- a/Core/DOM classes/SVGRectElement.m +++ b/Core/DOM classes/SVGRectElement.m @@ -7,6 +7,7 @@ #import "SVGRectElement.h" +#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) @interface SVGRectElement () @@ -54,8 +55,8 @@ void CGPathAddRoundedRect (CGMutablePathRef path, CGRect rect, CGFloat radius) { CGPathCloseSubpath(path); } -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -98,8 +99,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); - - return nil; } @end diff --git a/Core/DOM classes/SVGSVGElement.h b/Core/DOM classes/SVGSVGElement.h index 47841f979..2dced0137 100644 --- a/Core/DOM classes/SVGSVGElement.h +++ b/Core/DOM classes/SVGSVGElement.h @@ -56,6 +56,7 @@ #import "Element.h" #import "NodeList.h" +#import "SVGLayeredElement.h" @interface SVGSVGElement : SVGElement < SVGLayeredElement > diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index 1743d17d0..511479c3c 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -3,6 +3,9 @@ #import "SVGSVGElement_Mutable.h" #import "CALayerWithChildHitTest.h" + +#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) + @interface SVGSVGElement() @property (nonatomic, readwrite) CGRect viewBoxFrame; @end @@ -75,8 +78,8 @@ -(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, @"Not implem #pragma mark - Objective C methods needed given our current non-compliant SVG Parser -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -102,8 +105,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { #endif } - - return nil; } - (SVGElement *)findFirstElementOfClass:(Class)class { diff --git a/Core/DOM classes/SVGShapeElement.h b/Core/DOM classes/SVGShapeElement.h index 06164484c..79ca331be 100644 --- a/Core/DOM classes/SVGShapeElement.h +++ b/Core/DOM classes/SVGShapeElement.h @@ -23,6 +23,7 @@ */ #import "SVGElement.h" +#import "SVGLayeredElement.h" #import "SVGUtils.h" @class SVGGradientElement; diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index c33a5b07b..14745e4ea 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -12,6 +12,8 @@ #import "SVGKPattern.h" #import "CAShapeLayerWithHitTest.h" +#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) + @implementation SVGShapeElement #define IDENTIFIER_LEN 256 @@ -46,8 +48,9 @@ - (void)loadDefaults { _fillType = SVGFillTypeSolid; } -- (NSError*)parseAttributes:(NSDictionary *)attributes { - [super parseAttributes:attributes]; +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult +{ + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -96,8 +99,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes { if ((value = [attributes objectForKey:@"fill-opacity"])) { _fillColor.a = (uint8_t) ([value floatValue] * 0xFF); } - - return nil; } - (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath { @@ -117,7 +118,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { [_shapeLayer setValue:self.identifier forKey:kSVGElementIdentifier]; _shapeLayer.opacity = _opacity; - CGAffineTransform svgEffectiveTransform = [self transformAbsolute]; + CGAffineTransform svgEffectiveTransform = [((SVGElement*)self) transformAbsolute]; #if OUTLINE_SHAPES diff --git a/Core/DOM classes/SVGTextElement.h b/Core/DOM classes/SVGTextElement.h index 82a5c8a2a..1a80b3e4d 100644 --- a/Core/DOM classes/SVGTextElement.h +++ b/Core/DOM classes/SVGTextElement.h @@ -9,6 +9,7 @@ #import #import "SVGElement.h" +#import "SVGLayeredElement.h" /** http://www.w3.org/TR/2011/REC-SVG11-20110816/text.html#TextElement diff --git a/Core/DOM classes/SVGTextElement.m b/Core/DOM classes/SVGTextElement.m index a8a890401..dcd93afab 100644 --- a/Core/DOM classes/SVGTextElement.m +++ b/Core/DOM classes/SVGTextElement.m @@ -12,6 +12,9 @@ #import #endif +#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) + + @implementation SVGTextElement + (BOOL)shouldStoreContent { @@ -28,9 +31,9 @@ - (void)dealloc { [super dealloc]; } -- (NSError*)parseAttributes:(NSDictionary *)attributes +- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes]; + [super parseAttributes:attributes parseResult:parseResult]; id value = nil; @@ -70,9 +73,6 @@ - (NSError*)parseAttributes:(NSDictionary *)attributes // "text-anchor" = start; // transform = "scale(0.80449853,1.2430103)"; // "writing-mode" = "lr-tb"; - - - return nil; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/Parsing/SVGKParseResult.h b/Core/Parsing/SVGKParseResult.h index 96607f247..9f12b23a0 100644 --- a/Core/Parsing/SVGKParseResult.h +++ b/Core/Parsing/SVGKParseResult.h @@ -3,6 +3,7 @@ */ #import +@class SVGSVGElement, SVGDocument; #import "SVGSVGElement.h" #import "SVGDocument.h" diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index ed2af9146..b9ee1080e 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -14,12 +14,12 @@ #import -@class SVGKParseResult; -#import "SVGKParseResult.h" - #import "SVGKParserStackItem.h" #import "SVGKSource.h" +@class SVGKParseResult; +#import "SVGKParseResult.h" + /*! Experimental: allow SVGKit parser-extensions to insert custom data into an SVGKParseResult */ #define ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA 0 diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 976c9b264..a5a9bd52b 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -82,12 +82,7 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSou } SVGElement *element = [[[elementClass alloc] initWithName:name] autorelease]; - NSError* errorOrNil = [element parseAttributes:attributes]; - - if( errorOrNil != nil ) - { - [parseResult addParseErrorRecoverable:errorOrNil]; - } + [element parseAttributes:attributes parseResult:parseResult]; /** special case: */ if( [@"svg" isEqualToString:name] ) diff --git a/Core/SVGKImage+SVGPathView.h b/Core/SVGKImage+SVGPathView.h index 56948b677..7a77e46d4 100644 --- a/Core/SVGKImage+SVGPathView.h +++ b/Core/SVGKImage+SVGPathView.h @@ -8,6 +8,8 @@ it's pretty clean at the moment */ +#import "SVGLayeredElement.h" + #if NS_BLOCKS_AVAILABLE typedef void (^SVGElementAggregationBlock)(SVGElement < SVGLayeredElement > * layeredElement); #endif diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index aa852777c..72589d940 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -70,12 +70,12 @@ + (SVGKImage*) imageWithContentsOfFile:(NSString *)aPath { return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; } -- (id)initWithSource:(SVGKSource *)source { +- (id)initWithSource:(SVGKSource *)newSource { self = [super init]; if (self) { self.svgWidth = SVGLengthZero; self.svgHeight = SVGLengthZero; - self.source = source; + self.source = newSource; self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:self.source]; diff --git a/Core/SVGKParser.h b/Core/SVGKParser.h index 77d0e748d..ff86a6600 100644 --- a/Core/SVGKParser.h +++ b/Core/SVGKParser.h @@ -23,9 +23,9 @@ #import #import "SVGKSource.h" +#import "SVGKParserExtension.h" #import "SVGKParseResult.h" -#import "SVGKParserExtension.h" #import "SVGKParserStackItem.h" #import "SVGElement.h" diff --git a/Core/SVGKParserStackItem.h b/Core/SVGKParserStackItem.h index 9f1f01536..96bfe6883 100644 --- a/Core/SVGKParserStackItem.h +++ b/Core/SVGKParserStackItem.h @@ -1,5 +1,8 @@ #import +@protocol SVGKParserExtension; +#import "SVGKParserExtension.h" + @interface SVGKParserStackItem : NSObject @property(nonatomic,retain) NSObject* parserForThisItem; @property(nonatomic,retain) NSObject* item; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index e2f7f028c..ab11c3228 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -18,6 +18,10 @@ 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; + 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; + 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; + 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; + 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -254,6 +258,8 @@ 6621354C148AF80A006881E1 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; 6621354D148AF80A006881E1 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; 66226B53148AEAB100EF4A6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; + 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; 6661427D156C2E69000F3A27 /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; 6661427E156C2E69000F3A27 /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; 6661427F156C2E69000F3A27 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; @@ -261,7 +267,7 @@ 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; 66614283156C2E69000F3A27 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 66614284156C2E69000F3A27 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 66614284156C2E69000F3A27 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SVGElement.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 66614285156C2E69000F3A27 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; 66614286156C2E69000F3A27 /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; 66614287156C2E69000F3A27 /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; @@ -286,7 +292,7 @@ 6661429A156C2E69000F3A27 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; 6661429B156C2E69000F3A27 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; 6661429C156C2E69000F3A27 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; + 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = SVGKParseResult.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; @@ -509,6 +515,7 @@ 666142F9156C2F0C000F3A27 /* Core DOM */, 6661434E156C5FE5000F3A27 /* SVG-DOM */, 6661427D156C2E69000F3A27 /* SVGCircleElement.h */, + 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */, 6661427E156C2E69000F3A27 /* SVGCircleElement.m */, 6661427F156C2E69000F3A27 /* SVGDefsElement.h */, 66614280156C2E69000F3A27 /* SVGDefsElement.m */, @@ -516,6 +523,7 @@ 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */, 66614283156C2E69000F3A27 /* SVGElement.h */, 66614284156C2E69000F3A27 /* SVGElement.m */, + 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */, 66614285156C2E69000F3A27 /* SVGEllipseElement.h */, 66614286156C2E69000F3A27 /* SVGEllipseElement.m */, 66614287156C2E69000F3A27 /* SVGGroupElement.h */, @@ -737,6 +745,8 @@ 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */, 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */, 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */, + 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */, + 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -803,6 +813,8 @@ 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */, 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */, 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */, + 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */, + 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index ab887341f..5a7246265 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -169,7 +169,7 @@ 6694716D1574221200EA533D /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; 6694716E1574221200EA533D /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; 6694716F1574221200EA533D /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 669471701574221200EA533D /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 669471701574221200EA533D /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SVGElement.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 669471711574221200EA533D /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; 669471721574221200EA533D /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; 669471731574221200EA533D /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; @@ -194,7 +194,7 @@ 669471861574221200EA533D /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; 669471871574221200EA533D /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; 669471881574221200EA533D /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 6694718A1574221200EA533D /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; + 6694718A1574221200EA533D /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = SVGKParseResult.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 6694718B1574221200EA533D /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; 6694718C1574221200EA533D /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; 6694718D1574221200EA533D /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; From 1de7a69314e72a69e0634c96072f1c5bcfcf3872 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 16 Jul 2012 22:35:21 +0100 Subject: [PATCH 053/110] Upgraded SVGElement to be *almost* SVG Spec compliant. Added some missing features to Node too --- Core/DOM classes/SVG-DOM/SVGDocument.m | 4 +- Core/DOM classes/SVG-DOM/SVGViewSpec.h | 1 + Core/DOM classes/SVGElement.h | 41 +++++++---------- Core/DOM classes/SVGElement.m | 64 +++++++++++++++++--------- Core/DOM classes/SVGSVGElement.m | 5 +- Core/DOM classes/SVGShapeElement.m | 4 +- Core/Parsing/SVGKParserSVG.m | 2 +- Core/SVGKImage+SVGPathView.m | 8 +++- Core/SVGKImage.m | 7 ++- 9 files changed, 80 insertions(+), 56 deletions(-) diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m index bf143794b..b26838b61 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.m +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -11,7 +11,7 @@ #import "SKBasicDataTypes.h" -#import "NodeList+Mutable.h" +#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively @interface SVGDocument() -(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(SVGElement*) parent addToList:(NodeList*) accumulator; @@ -39,7 +39,7 @@ -(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(SVGEl if( [parent.localName isEqualToString:tagName] ) [accumulator.internalArray addObject:parent]; - for( SVGElement* childElement in parent.children ) + for( SVGElement* childElement in parent.childNodes.internalArray ) { [self privateGetElementsByTagName:tagName childrenOfElement:childElement addToList:accumulator]; } diff --git a/Core/DOM classes/SVG-DOM/SVGViewSpec.h b/Core/DOM classes/SVG-DOM/SVGViewSpec.h index 9faac661f..4e81af3e8 100644 --- a/Core/DOM classes/SVG-DOM/SVGViewSpec.h +++ b/Core/DOM classes/SVG-DOM/SVGViewSpec.h @@ -13,6 +13,7 @@ */ #import +@class SVGElement; #import "SVGElement.h" @interface SVGViewSpec : NSObject diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index c153e1b86..8ad2d8f28 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -1,47 +1,40 @@ /** SVGElement - This class is WRONG: most of the properties and methods should NOT be implemented here, but instead in the - superclass "Node". - - c.f. official definition of "Node" in SVG: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + NB: "id" is illegal in Objective-C language, so we use "identifier" instead + - Documenting the actual data in this class (even though it's incorrect): - - "children": nb: the correct name would be "childNodes", according to SVG spec ... child elements (SVG is a tree: every element can have chidren) - - "localName": the final part of the SVG tag (e.g. in " +#import "Node.h" +#import "Node+Mutable.h" + +@class SVGSVGElement; +//obj-c's compiler sucks, and doesn't allow this line: #import "SVGSVGElement.h" + +@interface SVGElement : Node -@interface SVGElement : NSObject { - @private - NSMutableArray *_children; -} +@property (nonatomic, readwrite, retain) NSString *identifier; // 'id' is reserved in Obj-C, so we have to break SVG Spec here, slightly +@property (nonatomic, retain) NSString* xmlbase; +@property (nonatomic, retain) SVGSVGElement* ownerSVGElement; +@property (nonatomic, retain) SVGElement* viewportElement; + + +#pragma mark - NON-STANDARD features of class (these are things that are NOT in the SVG spec, and should NOT be in SVGKit) /*! This is used when generating CALayer objects, to store the id of the SVGElement that created the CALayer */ #define kSVGElementIdentifier @"SVGElementIdentifier" -@property (nonatomic, readonly) NSArray *children; @property (nonatomic, readonly, copy) NSString *stringValue; -@property (nonatomic, readonly) NSString *localName; - -@property (nonatomic, readwrite, retain) NSString *identifier; // 'id' is reserved - -@property (nonatomic, retain) NSMutableArray* metadataChildren; /*! Transform to be applied to this node and all sub-nodes; does NOT take account of any transforms applied by parent / ancestor nodes */ @property (nonatomic) CGAffineTransform transformRelative; -/*! Required by SVG transform and SVG viewbox: you have to be able to query your parent nodes at all times to find out your actual values */ -@property (nonatomic, retain) SVGElement *parent; -#pragma mark - ORIGINALLY PACKAGE-PROTECTED -- (void)addChild:(SVGElement *)element; - (void)parseContent:(NSString *)content; diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index c8b20ac71..15a32cb26 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -27,47 +27,69 @@ @interface SVGElement () */ @implementation SVGElement +@synthesize identifier = _identifier; +@synthesize xmlbase; +@synthesize ownerSVGElement; +@synthesize viewportElement; -@synthesize children = _children; @synthesize stringValue = _stringValue; -@synthesize localName = _localName; -@synthesize parent = _parent; @synthesize transformRelative = _transformRelative; -@synthesize identifier = _identifier; -@synthesize metadataChildren; + (BOOL)shouldStoreContent { return NO; } +/*! Override so that we can automatically set / unset the ownerSVGElement and viewportElement properties, + as required by SVG Spec */ +-(void)setParentNode:(Node *)newParent +{ + [super setParentNode:newParent]; + + /** SVG Spec: if "outermost SVG tag" then both element refs should be nil */ + if( [self isKindOfClass:[SVGSVGElement class]] + && (self.parentNode == nil || ! [self.parentNode isKindOfClass:[SVGElement class]]) ) + { + self.ownerSVGElement = nil; + self.viewportElement = nil; + } + else + { + NSAssert( [self.localName isEqualToString:@"svg"] || [newParent isKindOfClass:[SVGElement class]], @"All SVG nodes must have SVGElement superclasses, unless they are an embedded SVG root node, with tag = SVG" ); + + if( [self isKindOfClass:[SVGSVGElement class]] ) + self.ownerSVGElement = (SVGSVGElement*) self; + else + self.ownerSVGElement = ((SVGElement*) newParent).ownerSVGElement; + + if( [self isKindOfClass:[SVGSVGElement class]] ) + self.viewportElement = self; + else + self.viewportElement = ((SVGElement*) self.parentNode).viewportElement; + } +} + - (id)init { - self = [super init]; + self = [super initType:SKNodeType_ELEMENT_NODE]; if (self) { [self loadDefaults]; - _children = [[NSMutableArray alloc] init]; self.transformRelative = CGAffineTransformIdentity; - self.metadataChildren = [NSMutableArray array]; } return self; } - (id)initWithName:(NSString *)name { - self = [self init]; + self = [super initElement:name]; if (self) { - _localName = [name retain]; self.transformRelative = CGAffineTransformIdentity; } return self; } - (void)dealloc { - self.metadataChildren = nil; - [_children release]; [_stringValue release]; - [_localName release]; [_identifier release]; [super dealloc]; @@ -77,11 +99,6 @@ - (void)loadDefaults { // to be overriden by subclasses } -- (void)addChild:(SVGElement *)element { - [_children addObject:element]; - element.parent = self; -} - - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { // to be overriden by subclasses // make sure super implementation is called @@ -237,12 +254,15 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult -(CGAffineTransform) transformAbsolute { - if( self.parent == nil ) + if( self.parentNode == nil ) return self.transformRelative; else { - CGAffineTransform inheritedTransform = [self.parent transformAbsolute]; - CGAffineTransform localTransform = self.transformRelative; // Apple's debugger is appallingly bad + SVGElement* parentElement = (SVGElement*) self.parentNode; + NSAssert( [parentElement isKindOfClass:[SVGElement class]], @"in an SVG fragment, all nodes must be subclasses of SVGElement. My parent is instead of class %@", [self.parentNode class] ); + + CGAffineTransform inheritedTransform = [parentElement transformAbsolute]; + //DEBUG ONLY: CGAffineTransform localTransform = self.transformRelative; // Apple's debugger is appallingly bad CGAffineTransform absoluteTransform = CGAffineTransformConcat( self.transformRelative, inheritedTransform ); @@ -256,7 +276,7 @@ - (void)parseContent:(NSString *)content { - (NSString *)description { return [NSString stringWithFormat:@"<%@ %p | id=%@ | localName=%@ | stringValue=%@ | children=%d>", - [self class], self, _identifier, _localName, _stringValue, [_children count]]; + [self class], self, _identifier, self.localName, _stringValue, self.childNodes.length]; } @end diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index 511479c3c..dec13f820 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -6,6 +6,8 @@ #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) +#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively + @interface SVGSVGElement() @property (nonatomic, readwrite) CGRect viewBoxFrame; @end @@ -108,7 +110,8 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult } - (SVGElement *)findFirstElementOfClass:(Class)class { - for (SVGElement *element in self.children) { + for (SVGElement *element in self.childNodes.internalArray) + { if ([element isKindOfClass:class]) return element; } diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 14745e4ea..0aaaa4668 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -150,7 +150,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { CGPathAddPath( pathToPlaceInLayer, &transformAbsoluteThenGlobalViewBoxFix, _pathRelative); CGRect rect = CGPathGetPathBoundingBox( _pathRelative ); - CGRect unTransformedPathBB = CGPathGetBoundingBox( _pathRelative ); + //DEBUG ONLY: CGRect unTransformedPathBB = CGPathGetBoundingBox( _pathRelative ); CGRect transformedPathBB = CGPathGetBoundingBox( pathToPlaceInLayer ); /** NB: when we set the _shapeLayer.frame, it has a *side effect* of moving the path itself - so, in order to prevent that, @@ -170,7 +170,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { */ _shapeLayer.frame = CGRectApplyAffineTransform( rect, CGAffineTransformConcat( svgEffectiveTransform, preTransform ) ); - CGRect shapeLayerFrame = _shapeLayer.frame; + //DEBUG ONLY: CGRect shapeLayerFrame = _shapeLayer.frame; if (_strokeWidth) { /* diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index a5a9bd52b..745e85e85 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -192,7 +192,7 @@ -(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:( if ( parent != nil ) { - [parentElement addChild:childElement]; + [parentElement appendChild:childElement]; } } else diff --git a/Core/SVGKImage+SVGPathView.m b/Core/SVGKImage+SVGPathView.m index 820bf43e0..477c154ff 100644 --- a/Core/SVGKImage+SVGPathView.m +++ b/Core/SVGKImage+SVGPathView.m @@ -1,16 +1,20 @@ #import "SVGKImage+SVGPathView.h" +#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively + @implementation SVGKImage (SVGPathView) #if NS_BLOCKS_AVAILABLE - (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGElement < SVGLayeredElement > *)element { - if (![element.children count]) { + if ( element.childNodes.length < 1 ) + { return; } - for (SVGElement *child in element.children) { + for (SVGElement *child in element.childNodes.internalArray) + { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { SVGElement* layeredElement = (SVGElement*)child; if (layeredElement) { diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 72589d940..b97bde97b 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -8,6 +8,8 @@ #import "SVGKParserSVG.h" +#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively + @interface SVGKImage () @property (nonatomic, readwrite) SVGLength svgWidth; @@ -280,11 +282,12 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element preTr NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), element.identifier); - if (![element.children count]) { + if ( element.childNodes.length < 1 ) { return layer; } - for (SVGElement *child in element.children) { + for (SVGElement *child in element.childNodes.internalArray ) + { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { CALayer *sublayer = [self newLayerWithElement:(id)child preTransform:preTransform]; From 3dc7eb1285406c746e51fc33ec1a4f1e9558d75b Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 16 Jul 2012 23:08:39 +0100 Subject: [PATCH 054/110] FIXED a subtle bug where we had two copies of all Node attributes which meant data rapidly got out of sync --- Core/DOM classes/Core DOM/Element.m | 21 +++++------ Core/DOM classes/SVGElement.h | 7 +++- Core/DOM classes/SVGElement.m | 57 +++++++++++++++++++++++++++-- 3 files changed, 68 insertions(+), 17 deletions(-) diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index 0e3f9514e..086175196 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -1,28 +1,27 @@ #import "Element.h" +#import "NamedNodeMap.h" + @interface Element() @property(nonatomic,retain,readwrite) NSString* tagName; - -@property(nonatomic,retain) NSMutableDictionary* attributesByName; @end @implementation Element @synthesize tagName; -@synthesize attributesByName; - (id)initType:(SKNodeType) nt { self = [super initType:nt]; if (self) { - self.attributesByName = [NSMutableDictionary dictionary]; + } return self; } -(NSString*) getAttribute:(NSString*) name { - Attr* result = [self.attributesByName valueForKey:name]; + Attr* result = (Attr*) [self.attributes getNamedItem:name]; if( result == nil || result.value == nil ) return @""; // according to spec @@ -34,33 +33,33 @@ -(void) setAttribute:(NSString*) name value:(NSString*) value { Attr* att = [[[Attr alloc] initAttr:name value:value] autorelease]; - [self.attributesByName setValue:att forKey:name]; + [self.attributes setNamedItem:att]; } -(void) removeAttribute:(NSString*) name { - [self.attributesByName removeObjectForKey:name]; + [self.attributes removeNamedItem:name]; NSAssert( FALSE, @"Not fully implemented. Spec says: If the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable." ); } -(Attr*) getAttributeNode:(NSString*) name { - return [self.attributesByName valueForKey:name]; + return (Attr*) [self.attributes getNamedItem:name]; } -(Attr*) setAttributeNode:(Attr*) newAttr { - Attr* oldAtt = [self.attributesByName objectForKey:newAttr.nodeName]; + Attr* oldAtt = (Attr*) [self.attributes getNamedItem:newAttr.nodeName]; - [self.attributesByName setValue:newAttr forKey:newAttr.nodeName]; + [self.attributes setNamedItem:newAttr]; return oldAtt; } -(Attr*) removeAttributeNode:(Attr*) oldAttr { - [self.attributesByName removeObjectForKey:oldAttr.nodeName]; + [self.attributes removeNamedItem:oldAttr.nodeName]; NSAssert( FALSE, @"Not fully implemented. Spec: If the removed Attr has a default value it is immediately replaced. The replacing attribute has the same namespace URI and local name, as well as the original prefix, when applicable. " ); diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index 8ad2d8f28..622e54b6f 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -11,17 +11,20 @@ */ #import -#import "Node.h" +#import "Element.h" #import "Node+Mutable.h" @class SVGSVGElement; //obj-c's compiler sucks, and doesn't allow this line: #import "SVGSVGElement.h" -@interface SVGElement : Node +@interface SVGElement : Element @property (nonatomic, readwrite, retain) NSString *identifier; // 'id' is reserved in Obj-C, so we have to break SVG Spec here, slightly @property (nonatomic, retain) NSString* xmlbase; @property (nonatomic, retain) SVGSVGElement* ownerSVGElement; + +/*! The viewport is set / re-set whenever an SVG node specifies a "width" (and optionally: a "height") attribute, + assuming that SVG node is one of: svg, symbol, image, foreignobject */ @property (nonatomic, retain) SVGElement* viewportElement; diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 15a32cb26..ca4e70029 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -42,6 +42,16 @@ + (BOOL)shouldStoreContent { return NO; } +/*! As per the SVG Spec, the local reference to "viewportElement" depends on the values of the + attributes of the node - does it have a "width" attribute? */ +-(void) reCalculateAndSetViewportElementReference +{ + if( [self.attributes getNamedItem:@"width"] != nil ) + self.viewportElement = self; + else + self.viewportElement = ((SVGElement*) self.parentNode).viewportElement; +} + /*! Override so that we can automatically set / unset the ownerSVGElement and viewportElement properties, as required by SVG Spec */ -(void)setParentNode:(Node *)newParent @@ -64,13 +74,52 @@ -(void)setParentNode:(Node *)newParent else self.ownerSVGElement = ((SVGElement*) newParent).ownerSVGElement; - if( [self isKindOfClass:[SVGSVGElement class]] ) - self.viewportElement = self; - else - self.viewportElement = ((SVGElement*) self.parentNode).viewportElement; + [self reCalculateAndSetViewportElementReference]; } } +/*! Override so that we can automatically set / unset the viewportElement property, + as required by SVG Spec */ +-(void)setAttributes:(NamedNodeMap *)attributes +{ + [super setAttributes:attributes]; + + [self reCalculateAndSetViewportElementReference]; +} + +/*! Override so that we can automatically set / unset the viewportElement property, + as required by SVG Spec */ + +-(void) setAttribute:(NSString*) name value:(NSString*) value +{ + [super setAttribute:name value:value]; + + [self reCalculateAndSetViewportElementReference]; +} +-(void) removeAttribute:(NSString*) name +{ + [super removeAttribute:name]; + + [self reCalculateAndSetViewportElementReference]; +} +-(Attr*) setAttributeNode:(Attr*) newAttr +{ + Attr* a = [super setAttributeNode:newAttr]; + + [self reCalculateAndSetViewportElementReference]; + + return a; +} +-(Attr*) removeAttributeNode:(Attr*) oldAttr +{ + Attr* a = [super removeAttributeNode:oldAttr]; + + [self reCalculateAndSetViewportElementReference]; + + return a; +} + + - (id)init { self = [super initType:SKNodeType_ELEMENT_NODE]; if (self) { From da54876849000893d5851834aa6f22cf5c559f73 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 16 Jul 2012 23:28:50 +0100 Subject: [PATCH 055/110] Re-factored the transform support in SVGElement to use the SVG Spec approved properties (should be minuscule improvement in performance) --- Core/DOM classes/SVGElement.h | 5 ++- Core/DOM classes/SVGElement.m | 33 +++++++++++++------ .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 4 +-- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index 622e54b6f..dab830935 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -24,7 +24,10 @@ @property (nonatomic, retain) SVGSVGElement* ownerSVGElement; /*! The viewport is set / re-set whenever an SVG node specifies a "width" (and optionally: a "height") attribute, - assuming that SVG node is one of: svg, symbol, image, foreignobject */ + assuming that SVG node is one of: svg, symbol, image, foreignobject + + The spec isn't clear what happens if this element redefines the viewport itself, but IMHO it implies that the + viewportElement becomes a reference to "self" */ @property (nonatomic, retain) SVGElement* viewportElement; diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index ca4e70029..ce6e6a10a 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -301,21 +301,34 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult } +/*! implemented making heavy use of the self.viewportElement to optimize performance - I believe this is what the + SVG Spec authors intended + + FIXME: this method could be removed by cut/pasting the code below directly into SVGKImage and its CALayer generation + code. Previously, this method recursed through the whole tree, but now that it's using the self.viewportElement property + it's a bit simpler. + */ -(CGAffineTransform) transformAbsolute { - if( self.parentNode == nil ) + if( self.viewportElement == nil ) return self.transformRelative; else { - SVGElement* parentElement = (SVGElement*) self.parentNode; - NSAssert( [parentElement isKindOfClass:[SVGElement class]], @"in an SVG fragment, all nodes must be subclasses of SVGElement. My parent is instead of class %@", [self.parentNode class] ); - - CGAffineTransform inheritedTransform = [parentElement transformAbsolute]; - //DEBUG ONLY: CGAffineTransform localTransform = self.transformRelative; // Apple's debugger is appallingly bad - - CGAffineTransform absoluteTransform = CGAffineTransformConcat( self.transformRelative, inheritedTransform ); - - return absoluteTransform; + /** + If this node altered the viewport, then the "inherited" info is whatever its parent had. + + Otherwise, its whatever the pre-saved self.viewportElement is using. + + NB: this is an optimization that is built-in to the SVG spec; previous implementation in SVGKit + recursed up the entire tree of SVGElement's, even though most SVGElement's are NOT ALLOWED to + redefine the viewport + */ + if( self.viewportElement == self ) + { + return CGAffineTransformConcat( self.transformRelative, ((SVGElement*) self.parentNode).viewportElement.transformAbsolute ); + } + else + return [self.viewportElement transformAbsolute]; } } diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index ab11c3228..d31e4b2de 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -521,11 +521,11 @@ 66614280156C2E69000F3A27 /* SVGDefsElement.m */, 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */, 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */, + 66614285156C2E69000F3A27 /* SVGEllipseElement.h */, + 66614286156C2E69000F3A27 /* SVGEllipseElement.m */, 66614283156C2E69000F3A27 /* SVGElement.h */, 66614284156C2E69000F3A27 /* SVGElement.m */, 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */, - 66614285156C2E69000F3A27 /* SVGEllipseElement.h */, - 66614286156C2E69000F3A27 /* SVGEllipseElement.m */, 66614287156C2E69000F3A27 /* SVGGroupElement.h */, 66614288156C2E69000F3A27 /* SVGGroupElement.m */, 66614289156C2E69000F3A27 /* SVGImageElement.h */, From d6103c4f7ed8f3830a4fd249fba9f758d7b1bc0d Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 16 Jul 2012 23:31:50 +0100 Subject: [PATCH 056/110] Docs changes to explain in detail previous commits --- Core/DOM classes/SVGElement.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index dab830935..934f88797 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -31,14 +31,18 @@ @property (nonatomic, retain) SVGElement* viewportElement; -#pragma mark - NON-STANDARD features of class (these are things that are NOT in the SVG spec, and should NOT be in SVGKit) +#pragma mark - NON-STANDARD features of class (these are things that are NOT in the SVG spec, and should NOT be in SVGKit's implementation - they should be moved to a different class, although WE DO STILL NEED THESE in order to implement the spec, and to provide SVGKit features!) /*! This is used when generating CALayer objects, to store the id of the SVGElement that created the CALayer */ #define kSVGElementIdentifier @"SVGElementIdentifier" @property (nonatomic, readonly, copy) NSString *stringValue; -/*! Transform to be applied to this node and all sub-nodes; does NOT take account of any transforms applied by parent / ancestor nodes */ +/*! Transform to be applied to this node and all sub-nodes; does NOT take account of any transforms applied by parent / ancestor nodes + + FIXME: this method could be removed by some careful refactoring of the code in SVGKImage and its CALayer generation + code. You need to also refactor / merge the method "transformAbsolute" in the .m file of this class. + */ @property (nonatomic) CGAffineTransform transformRelative; - (void)parseContent:(NSString *)content; From 065efec16a707060d3f69c60bd7fde8422a79e74 Mon Sep 17 00:00:00 2001 From: adamgit Date: Thu, 19 Jul 2012 15:28:23 +0100 Subject: [PATCH 057/110] Changed Xcode project to include files it was leaving out of builds --- XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index d31e4b2de..ba087891c 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -18,6 +18,8 @@ 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; + 6643AE2815B8503500E5F2AB /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */; }; + 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; @@ -971,6 +973,7 @@ 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */, 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */, 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */, + 6643AE2815B8503500E5F2AB /* SVGKParserStackItem.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1030,6 +1033,7 @@ 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */, 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */, 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */, + 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 94badf55b7fe627242ee11e80687784a5f428924 Mon Sep 17 00:00:00 2001 From: adamgit Date: Thu, 19 Jul 2012 15:45:30 +0100 Subject: [PATCH 058/110] Moved Xcode's default header setting (protected) to public --- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index ba087891c..8b4b73036 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -21,9 +21,9 @@ 6643AE2815B8503500E5F2AB /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */; }; 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; - 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; + 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; - 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; + 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -217,25 +217,25 @@ 66CBCA4E15AF27B000C36B57 /* SVGKParserStackItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */; }; 66CBCA4F15AF27B000C36B57 /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */; }; 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; }; - 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; }; + 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; }; - 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; }; + 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; }; - 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; }; + 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; }; - 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; }; + 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; }; - 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; }; + 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; }; - 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; }; + 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; }; - 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; }; + 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; From 7f38155f7ab06ed518132a911ed172db74588701 Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 20 Jul 2012 19:28:48 +0100 Subject: [PATCH 059/110] Another fix for Xcode build-system: previous commit doesnt always build --- Core/Parsing/SVGKParserExtension.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index b9ee1080e..540661dce 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -14,6 +14,7 @@ #import +@class SVGKParserStackItem; #import "SVGKParserStackItem.h" #import "SVGKSource.h" From 260eee9e4595db407e70b83506df76d24617a30f Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 20 Jul 2012 19:52:53 +0100 Subject: [PATCH 060/110] ADDED AGAIN: SVGKParserStackItem.h (Xcode keeps removing it for some reason) --- XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index 8b4b73036..b97722aaa 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -182,6 +182,7 @@ 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; + 667A2C5715B9DFF000F4464E /* SVGKParserStackItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; @@ -721,6 +722,7 @@ 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */, 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */, 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */, + 667A2C5715B9DFF000F4464E /* SVGKParserStackItem.h in Headers */, 666142FD156C2F14000F3A27 /* Document.h in Headers */, 66614303156C3A0B000F3A27 /* Node.h in Headers */, 66614309156C3B95000F3A27 /* NodeList.h in Headers */, From d7c90d09f391047ee9c4cde0eeb8469274e55e6c Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 20 Jul 2012 20:14:00 +0100 Subject: [PATCH 061/110] Added Fast-Enumeration support (ObjectiveC's semi built-in) to SVG DOM's NodeList class --- Core/DOM classes/Core DOM/NodeList.h | 5 ++++- Core/DOM classes/Core DOM/NodeList.m | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Core/DOM classes/Core DOM/NodeList.h b/Core/DOM classes/Core DOM/NodeList.h index 21d7d4377..501de1ca5 100644 --- a/Core/DOM classes/Core DOM/NodeList.h +++ b/Core/DOM classes/Core DOM/NodeList.h @@ -1,6 +1,9 @@ /* Implemented internally via an NSArray + NB: contains a slight "upgrade" from the SVG Spec to make it support Objective-C's + Fast Enumeration feature + From SVG DOM, via CoreDOM: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177 @@ -16,7 +19,7 @@ @class Node; #import "Node.h" -@interface NodeList : NSObject +@interface NodeList : NSObject @property(readonly) long length; diff --git a/Core/DOM classes/Core DOM/NodeList.m b/Core/DOM classes/Core DOM/NodeList.m index 9a78196d0..42e8c8f8c 100644 --- a/Core/DOM classes/Core DOM/NodeList.m +++ b/Core/DOM classes/Core DOM/NodeList.m @@ -29,4 +29,11 @@ -(long)length return [self.internalArray count]; } +#pragma mark - ADDITIONAL to SVG Spec: Objective-C support for fast-iteration ("for * in ..." syntax) + +-(NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id [])buffer count:(NSUInteger)len +{ + return [self.internalArray countByEnumeratingWithState:state objects:buffer count:len]; +} + @end From cdc506f7fef14663d8841da52048e918ee6123fc Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 20 Jul 2012 23:17:57 +0100 Subject: [PATCH 062/110] MANY improvements, especially: working implementation of DOMDocument.getElementsByTagName (so you can search the SVG for any type of node - e.g. fetch all the nodes) --- Core/DOM classes/Core DOM/Document+Mutable.h | 7 ++ Core/DOM classes/Core DOM/Document.m | 50 ++++++++++---- Core/DOM classes/Core DOM/Element.h | 5 ++ Core/DOM classes/Core DOM/Element.m | 15 +++-- Core/DOM classes/Core DOM/NamedNodeMap.m | 8 +++ Core/DOM classes/Core DOM/Node.h | 5 +- Core/DOM classes/Core DOM/Node.m | 65 ++++++++++++++++++- Core/DOM classes/Core DOM/NodeList.m | 7 ++ Core/DOM classes/SVG-DOM/SVGDocument.m | 41 +++++++----- Core/DOM classes/SVGElement.h | 5 ++ Core/DOM classes/SVGElement.m | 45 +++++++------ Core/DOM classes/SVGElement_ForParser.h | 2 - Core/DOM classes/SVGImageElement.m | 9 --- Core/DOM classes/SVGSVGElement.m | 4 +- Core/Parsing/SVGKParserExtension.h | 2 +- Core/Parsing/SVGKParserSVG.m | 19 +++++- Core/SVGKImage+SVGPathView.m | 4 +- Core/SVGKImage.m | 4 +- Core/SVGKParser.m | 57 ++++++++++------ README.mdown | 36 ++++++++-- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 8 ++- 21 files changed, 292 insertions(+), 106 deletions(-) create mode 100644 Core/DOM classes/Core DOM/Document+Mutable.h diff --git a/Core/DOM classes/Core DOM/Document+Mutable.h b/Core/DOM classes/Core DOM/Document+Mutable.h new file mode 100644 index 000000000..72a04c6dd --- /dev/null +++ b/Core/DOM classes/Core DOM/Document+Mutable.h @@ -0,0 +1,7 @@ +#import "Document.h" + +@interface Document () + +@property(nonatomic,retain,readwrite) Element* documentElement; + +@end diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index a47a3a05f..f2f787e2c 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -1,11 +1,12 @@ #import "Document.h" +#import "Document+Mutable.h" -/* - @property(nonatomic,retain,readonly) DocumentType doctype; - @property(nonatomic,retain,readonly) DOMImplementation implementation; - @property(nonatomic,retain,readonly) Element documentElement; +#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt specify how lists are made mutable -*/ +@interface Document() +/*! private method used in implementation of the getElementsByTagName method */ +-(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; +@end @implementation Document @@ -16,8 +17,11 @@ @implementation Document -(Element*) createElement:(NSString*) tagName { - NSAssert( FALSE, @"This is not implemented, but is required by the spec to: Creates an element of the type specified. In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element." ); - return nil; + Element* newElement = [[Element alloc] initElement:tagName]; + + NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); + + return newElement; } -(DocumentFragment*) createDocumentFragment @@ -58,8 +62,29 @@ -(EntityReference*) createEntityReference:(NSString*) data -(NodeList*) getElementsByTagName:(NSString*) data { - NSAssert( FALSE, @"Not implemented. According to spec: Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree." ); - return nil; + NodeList* accumulator = [[NodeList alloc] init]; + [self privateGetElementsByTagName:data childrenOfElement:self.documentElement addToList:accumulator]; + + return accumulator; +} + +-(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator +{ + /** According to spec, this is only valid for ELEMENT nodes */ + if( [parent isKindOfClass:[Element class]] ) + { + /** According to spec, "tag name" for an Element is the value of its .nodeName property; that means SOMETIMES its a qualified name! */ + if( [tagName isEqualToString:@"*"] + || [parent.nodeName isEqualToString:tagName] ) + { + [accumulator.internalArray addObject:parent]; + } + } + + for( Node* childNode in parent.childNodes ) + { + [self privateGetElementsByTagName:tagName childrenOfElement:childNode addToList:accumulator]; + } } // Introduced in DOM Level 2: @@ -72,8 +97,11 @@ -(Node*) importNode:(Node*) importedNode deep:(BOOL) deep // Introduced in DOM Level 2: -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName { - NSAssert( FALSE, @"This should be implemented to share code with createAttributeNS: method below" ); - return nil; + Element* newElement = [[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:[NSURL URLWithString:namespaceURI]]; + + NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); + + return newElement; } // Introduced in DOM Level 2: diff --git a/Core/DOM classes/Core DOM/Element.h b/Core/DOM classes/Core DOM/Element.h index 3d25cd42e..99a5c0875 100644 --- a/Core/DOM classes/Core DOM/Element.h +++ b/Core/DOM classes/Core DOM/Element.h @@ -91,4 +91,9 @@ // Introduced in DOM Level 2: -(BOOL) hasAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName; +#pragma mark - Objective-C init methods (not in SVG Spec - you're supposed to use SVGDocument's createXXX methods instead) + +- (id)initWithLocalName:(NSString*) n; +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI; + @end diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index 086175196..c936efd90 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -10,15 +10,22 @@ @implementation Element @synthesize tagName; -- (id)initType:(SKNodeType) nt -{ - self = [super initType:nt]; +- (id)initWithLocalName:(NSString*) n { + self = [super initElement:n]; + if (self) { + self.tagName = n; + } + return self; +} +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI { + self = [super initElement:n inNameSpaceURI:nsURI]; if (self) { - + self.tagName = n; } return self; } + -(NSString*) getAttribute:(NSString*) name { Attr* result = (Attr*) [self.attributes getNamedItem:name]; diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.m b/Core/DOM classes/Core DOM/NamedNodeMap.m index 26a739d38..d092c052a 100644 --- a/Core/DOM classes/Core DOM/NamedNodeMap.m +++ b/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -124,4 +124,12 @@ -(Node*) removeNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localN return oldNode; } +#pragma mark - ADDITIONAL to SVG Spec: useful debug / output / description methods + +-(NSString *)description +{ + return [NSString stringWithFormat:@"NamedNodeMap: NSDictionary(%@)", self.internalDictionary]; +} + + @end diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h index 73275ff40..9d531c0e7 100644 --- a/Core/DOM classes/Core DOM/Node.h +++ b/Core/DOM classes/Core DOM/Node.h @@ -135,7 +135,7 @@ typedef enum SKNodeType // Introduced in DOM Level 2: @property(nonatomic) BOOL hasAttributes; -#pragma mark - ObjectiveC init methods +#pragma mark - Objective-C init methods (not in SVG Spec - you're supposed to use SVGDocument's createXXX methods instead) /** Generic init method - used by all the other methods (designated initializer, effectively) */ - (id)initType:(SKNodeType) nt; @@ -145,7 +145,10 @@ typedef enum SKNodeType - (id)initDocument:(NSString*) n; - (id)initDocumentFragment:(NSString*) n; - (id)initDocumentType:(NSString*) n; +/*! DOM level 1 (leaves various things set to nil) */ - (id)initElement:(NSString*) n; +/*! DOM level 2 (ALWAYS use this if possible: otherwise lots of things left at nil) */ +- (id)initElement:(NSString*) n inNameSpaceURI:(NSString*) nsURI; - (id)initEntity:(NSString*) n; - (id)initEntityReference:(NSString*) n; - (id)initNotation:(NSString*) n; diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index b6d6741c7..8bf8521b7 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -31,6 +31,8 @@ @implementation Node @synthesize hasAttributes, hasChildNodes; +@synthesize localName; + - (id)initType:(SKNodeType) nt { self = [super init]; @@ -115,6 +117,19 @@ - (id)initElement:(NSString*) n { } return self; } +- (id)initElement:(NSString*) n inNameSpaceURI:(NSString*) nsURI { + self = [self initType:SKNodeType_ELEMENT_NODE]; + if (self) { + self.nodeName = n; + + NSArray* nameSpaceParts = [n componentsSeparatedByString:@":"]; + self.localName = [nameSpaceParts lastObject]; + if( [nameSpaceParts count] > 1 ) + self.prefix = [nameSpaceParts objectAtIndex:0]; + } + return self; +} + - (id)initEntity:(NSString*) n { self = [self initType:SKNodeType_ENTITY_NODE]; if (self) { @@ -251,9 +266,6 @@ -(BOOL) isSupportedFeature:(NSString*) feature version:(NSString*) version // Introduced in DOM Level 2: @synthesize prefix; -// Introduced in DOM Level 2: -@synthesize localName; - // Introduced in DOM Level 2: -(BOOL)hasAttributes { @@ -263,4 +275,51 @@ -(BOOL)hasAttributes return (self.attributes.length > 0 ); } +#pragma mark - ADDITIONAL to SVG Spec: useful debug / output / description methods + +-(NSString *)description +{ + NSString* nodeTypeName; + switch( self.nodeType ) + { + case SKNodeType_ELEMENT_NODE: + nodeTypeName = @"ELEMENT"; + break; + case SKNodeType_TEXT_NODE: + nodeTypeName = @"TEXT"; + break; + case SKNodeType_ENTITY_NODE: + nodeTypeName = @"ENTITY"; + break; + case SKNodeType_COMMENT_NODE: + nodeTypeName = @"COMMENT"; + break; + case SKNodeType_DOCUMENT_NODE: + nodeTypeName = @"DOCUMENT"; + break; + case SKNodeType_NOTATION_NODE: + nodeTypeName = @"NOTATION"; + break; + case SKNodeType_ATTRIBUTE_NODE: + nodeTypeName = @"ATTRIBUTE"; + break; + case SKNodeType_CDATA_SECTION_NODE: + nodeTypeName = @"CDATA"; + break; + case SKNodeType_DOCUMENT_TYPE_NODE: + nodeTypeName = @"DOC TYPE"; + break; + case SKNodeType_ENTITY_REFERENCE_NODE: + nodeTypeName = @"ENTITY REF"; + break; + case SKNodeType_DOCUMENT_FRAGMENT_NODE: + nodeTypeName = @"DOC FRAGMENT"; + break; + case SKNodeType_PROCESSING_INSTRUCTION_NODE: + nodeTypeName = @"PROCESSING INSTRUCTION"; + break; + } + return [NSString stringWithFormat:@"Node: %@ (%@) @@%ld attributes + %ld x children", self.nodeName, nodeTypeName, self.attributes.length, self.childNodes.length]; +} + @end diff --git a/Core/DOM classes/Core DOM/NodeList.m b/Core/DOM classes/Core DOM/NodeList.m index 42e8c8f8c..a83e54e7c 100644 --- a/Core/DOM classes/Core DOM/NodeList.m +++ b/Core/DOM classes/Core DOM/NodeList.m @@ -36,4 +36,11 @@ -(NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects return [self.internalArray countByEnumeratingWithState:state objects:buffer count:len]; } +#pragma mark - ADDITIONAL to SVG Spec: useful debug / output / description methods + +-(NSString *)description +{ + return [NSString stringWithFormat:@"NodeList: array(%@)", self.internalArray]; +} + @end diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m index b26838b61..8a1ba2f86 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.m +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -6,17 +6,13 @@ http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGDocument */ +#import "Document+Mutable.h" + #import "SVGDocument.h" #import "SVGDocument_Mutable.h" #import "SKBasicDataTypes.h" -#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively - -@interface SVGDocument() --(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(SVGElement*) parent addToList:(NodeList*) accumulator; -@end - @implementation SVGDocument @@ -24,25 +20,34 @@ @implementation SVGDocument @synthesize referrer; @synthesize domain; @synthesize URL; -@synthesize rootElement; +@synthesize rootElement=_rootElement; --(NodeList*) getElementsByTagName:(NSString*) data +-(void)setRootElement:(SVGSVGElement *)rootElement { - NodeList* accumulator = [[NodeList alloc] init]; - [self privateGetElementsByTagName:data childrenOfElement:self.rootElement addToList:accumulator]; + [_rootElement release]; + _rootElement = rootElement; + [_rootElement retain]; - return accumulator; + /*! SVG spec has two variables with same name, because DOM was written to support + weak programming languages that don't provide full OOP polymorphism. + + So, we'd better keep the two variables in sync! + */ + super.documentElement = rootElement; } --(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(SVGElement*) parent addToList:(NodeList*) accumulator +-(void)setDocumentElement:(Element *)newDocumentElement { - if( [parent.localName isEqualToString:tagName] ) - [accumulator.internalArray addObject:parent]; + NSAssert( [newDocumentElement isKindOfClass:[SVGSVGElement class]], @"Cannot set the documentElement property on an SVG doc unless it's of type SVGSVGDocument" ); + + super.documentElement = newDocumentElement; - for( SVGElement* childElement in parent.childNodes.internalArray ) - { - [self privateGetElementsByTagName:tagName childrenOfElement:childElement addToList:accumulator]; - } + /*! SVG spec has two variables with same name, because DOM was written to support + weak programming languages that don't provide full OOP polymorphism. + + So, we'd better keep the two variables in sync! + */ + self.rootElement = (SVGSVGElement*) self.documentElement; } @end diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index 934f88797..af3df7d80 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -47,5 +47,10 @@ - (void)parseContent:(NSString *)content; +#pragma mark - Objective-C init methods (not in SVG Spec - the official spec has no explicit way to create nodes, which is clearly a bug in the Spec. Until they fix the spec, we have to do something or else SVG would be unusable) + +- (id)initWithLocalName:(NSString*) n; +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI; + @end \ No newline at end of file diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index ce6e6a10a..0fe1223f1 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -119,24 +119,6 @@ -(Attr*) removeAttributeNode:(Attr*) oldAttr return a; } - -- (id)init { - self = [super initType:SKNodeType_ELEMENT_NODE]; - if (self) { - [self loadDefaults]; - self.transformRelative = CGAffineTransformIdentity; - } - return self; -} - -- (id)initWithName:(NSString *)name { - self = [super initElement:name]; - if (self) { - self.transformRelative = CGAffineTransformIdentity; - } - return self; -} - - (void)dealloc { [_stringValue release]; [_identifier release]; @@ -337,8 +319,31 @@ - (void)parseContent:(NSString *)content { } - (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p | id=%@ | localName=%@ | stringValue=%@ | children=%d>", - [self class], self, _identifier, self.localName, _stringValue, self.childNodes.length]; + return [NSString stringWithFormat:@"<%@ %p | id=%@ | prefix:localName=%@:%@ | tagName=%@ | stringValue=%@ | children=%d>", + [self class], self, _identifier, self.prefix, self.localName, self.tagName, _stringValue, self.childNodes.length]; +} + +#pragma mark - Objective-C init methods (not in SVG Spec - the official spec has no explicit way to create nodes, which is clearly a bug in the Spec. Until they fix the spec, we have to do something or else SVG would be unusable) + +- (id)initWithLocalName:(NSString*) n +{ + self = [super initWithLocalName:n]; + if( self ) + { + [self loadDefaults]; + self.transformRelative = CGAffineTransformIdentity; + } + return self; +} +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI +{ + self = [super initWithQualifiedName:n inNameSpaceURI:nsURI]; + if( self ) + { + [self loadDefaults]; + self.transformRelative = CGAffineTransformIdentity; + } + return self; } @end diff --git a/Core/DOM classes/SVGElement_ForParser.h b/Core/DOM classes/SVGElement_ForParser.h index 28e9b9f10..30a64f71c 100644 --- a/Core/DOM classes/SVGElement_ForParser.h +++ b/Core/DOM classes/SVGElement_ForParser.h @@ -7,8 +7,6 @@ + (BOOL)shouldStoreContent; // to optimize parser, default is NO -- (id)initWithName:(NSString *)name; - - (void)loadDefaults; // should be overriden to set element defaults /*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index fb459a343..3eae42e8e 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -49,15 +49,6 @@ - (void)dealloc { [super dealloc]; } -- (id)init { - self = [super init]; - if (self) { - // Initialization code here. - } - - return self; -} - - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { id value = nil; diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index dec13f820..7120a17cf 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -6,7 +6,6 @@ #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) -#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively @interface SVGSVGElement() @property (nonatomic, readwrite) CGRect viewBoxFrame; @@ -110,7 +109,7 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult } - (SVGElement *)findFirstElementOfClass:(Class)class { - for (SVGElement *element in self.childNodes.internalArray) + for (SVGElement *element in self.childNodes) { if ([element isKindOfClass:class]) return element; @@ -162,5 +161,4 @@ - (void)layoutLayer:(CALayer *)layer { } } - @end diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index 540661dce..aea2a2add 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -38,7 +38,7 @@ */ -(NSArray*) supportedTags; -- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document xmlns:(NSString*) namespaceURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; +- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; -(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; -(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; -(BOOL) createdItemShouldStoreContent:(NSObject*) item; diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 745e85e85..42a5a5b43 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -63,9 +63,9 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } -- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem +- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem { - if( [[self supportedNamespaces] containsObject:prefix] ) + if( [[self supportedNamespaces] containsObject:XMLNSURI] ) { Class elementClass = [elementMap objectForKey:name]; @@ -81,7 +81,20 @@ - (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSou [attributes addEntriesFromDictionary:[SVGKParser NSDictionaryFromCSSAttributes:style]]; } - SVGElement *element = [[[elementClass alloc] initWithName:name] autorelease]; + /** + NB: following the SVG Spec, it's critical that we ONLY use the DOM methods for creating + basic 'Element' nodes. + + Our SVGElement root class has an implementation of init that delegates to the same + private methods that the DOM methods use, so it's safe... + + FIXME: ...but in reality we ought to be using the DOMDocument createElement/NS methods, although "good luck" trying to find a DOMDocument if your SVG is embedded inside a larger XML document :( + */ + + + NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; + /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ + SVGElement *element = [[[elementClass alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI ] autorelease]; [element parseAttributes:attributes parseResult:parseResult]; /** special case: */ diff --git a/Core/SVGKImage+SVGPathView.m b/Core/SVGKImage+SVGPathView.m index 477c154ff..0a915f9cf 100644 --- a/Core/SVGKImage+SVGPathView.m +++ b/Core/SVGKImage+SVGPathView.m @@ -1,7 +1,5 @@ #import "SVGKImage+SVGPathView.h" -#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively - @implementation SVGKImage (SVGPathView) #if NS_BLOCKS_AVAILABLE @@ -13,7 +11,7 @@ - (void) applyAggregator:(SVGElementAggregationBlock)aggregator toElement:(SVGEl return; } - for (SVGElement *child in element.childNodes.internalArray) + for (SVGElement *child in element.childNodes) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { SVGElement* layeredElement = (SVGElement*)child; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index b97bde97b..9f9b6aab5 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -8,8 +8,6 @@ #import "SVGKParserSVG.h" -#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt support fast enumeration natively - @interface SVGKImage () @property (nonatomic, readwrite) SVGLength svgWidth; @@ -286,7 +284,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element preTr return layer; } - for (SVGElement *child in element.childNodes.internalArray ) + for (SVGElement *child in element.childNodes ) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { CALayer *sublayer = [self newLayerWithElement:(id)child preTransform:preTransform]; diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index a3f6ae4f5..209a72e50 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -18,13 +18,14 @@ @interface SVGKParser() @property(nonatomic,retain, readwrite) SVGKSource* source; @property(nonatomic,retain, readwrite) SVGKParseResult* currentParseRun; +@property(nonatomic,retain) NSString* defaultXMLNamespaceForThisParseRun; @end @implementation SVGKParser @synthesize source; @synthesize currentParseRun; - +@synthesize defaultXMLNamespaceForThisParseRun; @synthesize parserExtensions; @@ -166,16 +167,16 @@ - (void)connection:(NSURLConnection *)connection */ -- (void)handleStartElement:(NSString *)name xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes { +- (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes { for( NSObject* subParser in self.parserExtensions ) { - if( [[subParser supportedNamespaces] containsObject:prefix] + if( [[subParser supportedNamespaces] containsObject:XMLNSURI] && [[subParser supportedTags] containsObject:name] ) { SVGKParserStackItem* parentStackItem = [_elementStack lastObject]; - NSObject* subParserResult = [subParser handleStartElement:name document:source xmlns:prefix attributes:attributes parseResult:self.currentParseRun parentStackItem:parentStackItem]; + NSObject* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentStackItem:parentStackItem]; NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); @@ -211,23 +212,38 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar SVGKParser *self = (SVGKParser *) ctx; - NSString *name = NSStringFromLibxmlString(localname); - NSMutableDictionary *attrs = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); + NSString *stringLocalName = NSStringFromLibxmlString(localname); + NSString *stringPrefix = NSStringFromLibxmlString(prefix); + NSMutableDictionary *attrs = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); + NSString *stringURI = NSStringFromLibxmlString(URI); - /** - Debugging: - //NSString *url = NSStringFromLibxmlString(URI); - NSString *prefix2 = nil; - if( prefix != NULL ) - prefix2 = NSStringFromLibxmlString(prefix); - */ + /** Set a default Namespace for rest of this document if one is included in the attributes */ + if( self.defaultXMLNamespaceForThisParseRun == nil ) + { + NSString* newDefaultNamespace = [attrs objectForKey:@"xmlns"]; + if( newDefaultNamespace != nil ) + { + self.defaultXMLNamespaceForThisParseRun = newDefaultNamespace; + } + } - NSString *objcURIString = nil; - if( URI != NULL ) - objcURIString = NSStringFromLibxmlString(URI); + if( stringURI == nil + && self.defaultXMLNamespaceForThisParseRun != nil ) + { + /** Apply the default XML NS to this tag as if it had been typed in. + + e.g. if somewhere in this doc the author put: + + + + ...then any time we find a tag that HAS NO EXPLICIT NAMESPACE, we act as if it had that one. + */ + + stringURI = self.defaultXMLNamespaceForThisParseRun; + } #if DEBUG_VERBOSE_LOG_EVERY_TAG - NSLog(@"[%@] DEBUG_VERBOSE: <%@%@> (namespace URL:%@), attributes: %i", [self class], (prefix2==nil)?@"":[NSString stringWithFormat:@"%@:",prefix2], name, (URI==NULL)?@"n/a":objcURIString, nb_attributes ); + NSLog(@"[%@] DEBUG_VERBOSE: <%@%@> (namespace URL:%@), attributes: %i", [self class], [NSString stringWithFormat:@"%@:",stringPrefix], name, stringURI, nb_attributes ); #endif #if DEBUG_VERBOSE_LOG_EVERY_TAG @@ -256,7 +272,7 @@ but it keeps returning nil pointer (not always, but often). WTF? Not sure what w } #endif - [self handleStartElement:name xmlns:objcURIString attributes:attrs]; + [self handleStartElement:stringLocalName namePrefix:stringPrefix namespaceURI:stringURI attributes:attrs]; } - (void)handleEndElement:(NSString *)name { @@ -433,7 +449,10 @@ static void structuredError (void * userData, #pragma mark Utility static NSString *NSStringFromLibxmlString (const xmlChar *string) { - return [NSString stringWithUTF8String:(const char *) string]; + if( string == NULL ) // Yes, Apple requires we do this check! + return nil; + else + return [NSString stringWithUTF8String:(const char *) string]; } static NSMutableDictionary *NSDictionaryFromLibxmlAttributes (const xmlChar **attrs, int attr_ct) { diff --git a/README.mdown b/README.mdown index 0438a62be..2c4a64eb2 100644 --- a/README.mdown +++ b/README.mdown @@ -32,16 +32,42 @@ To use this, you must: 2. SVGSVGElement* rootOfTree = im.DOMTree; // NB: this is a partial implementation of the official "SVG DOM" standard. See the header file for this class and its superclass to see what you can do with it -Usage - Advanced (iPHone/iPad) ------ - -The big change with this branch, apart from requiring fewer lines of code, is that you can now do easy loading of different files. e.g. +Advanced Features (this branch/fork only!) (iPhone/iPad) +===== +FEATURE 1: load SVG from web, or from disk +----- - [SVGKParser parse: (SVGKSource*)]; // anything that's an "SVGKSource" can be parsed - [SVGKSource sourceWithFile:@"monkey.svg"]; // create a source from disk... - [SVGKSource sourceWithURL:@"http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg"]; // create a source from disk... + +FEATURE 2: search an SVG file for particular tags / nodes / elements: +----- + - Find all and tags: NodeList* gElements = [svgImage.DOMDocument getElementsByTagName:@"g"]; + - Find ALL tags (from root of SVG down): NodeList* allElements = [svgImage.DOMDocument getElementsByTagName:@"*"]; + +FEATURE 3: resize your SVG file to any size: +----- + - COMPLICATED: c.f. this thread: https://github.com/adamgit/SVGKit/issues/7 + +FEATURE 4: automatic scaling of your SVG to fit in memory +----- + - AUTOMATIC: SVG files are scaled to fit the co-ordinate system as required/intended by spec + - ...many files that ran out of memory in previous versions of SVGKit now render OK + +FEATURE 5: Access to the DOM Document Object Model +----- + - PARTIALLY IMPLEMENTED: SVGKImage.DOMDocument is a true DOMDocument, but many of the methods aren't fully implemented + +FEATURE 6: Retrieve any part of your SVG document positioned correctly in space +----- + - [((SVGKImage*) image).newCopyPositionedAbsoluteLayerWithIdentifier:@"id of the SVG tag / node /element"]; + - NB: this MUST return a copy, because it's moving your layer out of the tree and into a fresh CALayer of its own + +FEATURE X: detailed information on whether and WHY parsing failed: +----- - (SVGKParser*).currentParseRun.warnings; // array of NSError objects, each one a "WARNING" from the parser - (SVGKParser*).currentParseRun.errorsFatal; // array of NSError objects, each one a "FATAL ERROR" from the parser - if your SVG didn't render at all, this is why! - (SVGKParser*).currentParseRun.errorsRecoverable; // array of NSError objects, each one a "RECOVERABLE ERROR" from the parser - if your SVG didn't render correctly, this is why! (although you probably still got to see something) @@ -76,4 +102,4 @@ iOS (iPhone/iPad): 8. (Optional but recommended): Edit your build settings and add "Header Search Paths" = "/usr/include/libxml2" 9. (Optional but recommended): Add the framework "libxml2.dylib" -OS X: ...this needs updating; some minor code changes are needed to "fix" this project. The OS X framework currently DOES NOT BUILD because iOS classes are being referenced in a couple of places. \ No newline at end of file +OS X: ...this needs updating; some minor code changes are needed to "fix" this project. The OS X framework currently DOES NOT BUILD because iOS classes are being referenced in a couple of places. diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index b97722aaa..ecdec99a5 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -183,6 +183,8 @@ 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; 667A2C5715B9DFF000F4464E /* SVGKParserStackItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; }; + 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; }; 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; @@ -336,6 +338,7 @@ 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; + 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGKImage+SVGPathView.h"; path = "../../Core/SVGKImage+SVGPathView.h"; sourceTree = ""; }; 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGKImage+SVGPathView.m"; path = "../../Core/SVGKImage+SVGPathView.m"; sourceTree = ""; }; 6684CD491566D07400A46247 /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; @@ -600,6 +603,7 @@ 66614348156C544C000F3A27 /* NodeList+Mutable.h */, 666142FA156C2F14000F3A27 /* Document.h */, 666142FB156C2F14000F3A27 /* Document.m */, + 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */, 66614312156C3F60000F3A27 /* Element.h */, 66614313156C3F61000F3A27 /* Element.m */, 66614318156C436E000F3A27 /* ProcessingInstruction.h */, @@ -661,9 +665,9 @@ 66B79AE615475254002F99FF /* SVGKImage.m */, 66B79AEB15475254002F99FF /* SVGKit.h */, 66B79AEE15475254002F99FF /* SVGKParser.h */, + 66B79AEF15475254002F99FF /* SVGKParser.m */, 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */, 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */, - 66B79AEF15475254002F99FF /* SVGKParser.m */, 66B79AF515475254002F99FF /* SVGKPattern.h */, 66B79AF615475254002F99FF /* SVGKPattern.m */, 66B79B0715475254002F99FF /* SVGUtils.h */, @@ -751,6 +755,7 @@ 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */, 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */, 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, + 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -819,6 +824,7 @@ 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */, 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */, 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, + 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; From 0c95d2e65c0353984668868bd8ac57898f809ce6 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 21 Jul 2012 15:26:25 +0100 Subject: [PATCH 063/110] Made the parser-extensions slighlty more precise: they now MUST support DOM Node classes for all tree elements. NB: net result - any parser-extension can SAFELY insert any class into the SVG tree, so long as its a DOM Node subclass, and everything will work fine, including the main SVG methods --- Core/Parsing/SVGKParserExtension.h | 14 +++++++++++-- Core/Parsing/SVGKParserPatternsAndGradients.m | 4 ++-- Core/Parsing/SVGKParserSVG.m | 21 +++++-------------- Core/SVGKParser.m | 2 +- Core/SVGKParserStackItem.h | 4 +++- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index aea2a2add..dd8a957b6 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -21,6 +21,8 @@ @class SVGKParseResult; #import "SVGKParseResult.h" +#import "Node.h" + /*! Experimental: allow SVGKit parser-extensions to insert custom data into an SVGKParseResult */ #define ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA 0 @@ -38,8 +40,16 @@ */ -(NSArray*) supportedTags; -- (NSObject*)handleStartElement:(NSString *)name document:(SVGKSource*) document namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; +/*! + Because SVG-DOM uses DOM, custom parsers can return any object they like - so long as its some kind of + subclass of DOM's Node class + */ +- (Node*)handleStartElement:(NSString *)name document:(SVGKSource*) document namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; +/*! + Because SVG-DOM uses DOM, custom parsers MUST be prepared to accept child-nodes of any class that's a + valid subclass of DOM's Node class + */ +-(void) addChildObject:(Node*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; -(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; -(BOOL) createdItemShouldStoreContent:(NSObject*) item; diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.m b/Core/Parsing/SVGKParserPatternsAndGradients.m index 84b3bfca0..2fef178dd 100644 --- a/Core/Parsing/SVGKParserPatternsAndGradients.m +++ b/Core/Parsing/SVGKParserPatternsAndGradients.m @@ -43,7 +43,7 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithObjects:@"pattern", @"gradient", nil]; } -- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { +- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); @@ -57,7 +57,7 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult +-(void) addChildObject:(Node*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult { NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); } diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 42a5a5b43..4a205f602 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -63,7 +63,7 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } -- (NSObject*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem +- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem { if( [[self supportedNamespaces] containsObject:XMLNSURI] ) { @@ -195,26 +195,15 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(NSObject*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem *)parentStackItem +-(void) addChildObject:(Node*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem *)parentStackItem { SVGElement *parentElement = (SVGElement*) parent; - if( [child isKindOfClass:[SVGElement class]] ) - { - SVGElement *childElement = (SVGElement*) child; + Node *childNode = (Node*) child; - if ( parent != nil ) - { - [parentElement appendChild:childElement]; - } - } - else + if ( parent != nil ) { - /*! - Unknown tag - */ - - NSAssert( FALSE, @"Asked to add unrecognized child tag of type = %@ to parent = %@", [child class], parent ); + [parentElement appendChild:childNode]; } } diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index 209a72e50..c2732b231 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -176,7 +176,7 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa { SVGKParserStackItem* parentStackItem = [_elementStack lastObject]; - NSObject* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentStackItem:parentStackItem]; + Node* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentStackItem:parentStackItem]; NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); diff --git a/Core/SVGKParserStackItem.h b/Core/SVGKParserStackItem.h index 96bfe6883..679dbe8d1 100644 --- a/Core/SVGKParserStackItem.h +++ b/Core/SVGKParserStackItem.h @@ -3,7 +3,9 @@ @protocol SVGKParserExtension; #import "SVGKParserExtension.h" +#import "Node.h" + @interface SVGKParserStackItem : NSObject @property(nonatomic,retain) NSObject* parserForThisItem; -@property(nonatomic,retain) NSObject* item; +@property(nonatomic,retain) Node* item; @end From 791207591b3368a5dab54bbd3c06f2ebc00dab1b Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 21 Jul 2012 15:47:05 +0100 Subject: [PATCH 064/110] Further to last commit, cleaned up the addChild:toObject:parseResult: method so that it only works with Node parents (instead of falsely accepting NSObject parents) --- Core/Parsing/SVGKParserExtension.h | 2 +- Core/Parsing/SVGKParserPatternsAndGradients.m | 2 +- Core/Parsing/SVGKParserSVG.m | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index dd8a957b6..d07855fc4 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -49,7 +49,7 @@ Because SVG-DOM uses DOM, custom parsers MUST be prepared to accept child-nodes of any class that's a valid subclass of DOM's Node class */ --(void) addChildObject:(Node*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; +-(void) addChildObject:(Node*)child toObject:(Node*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; -(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; -(BOOL) createdItemShouldStoreContent:(NSObject*) item; diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.m b/Core/Parsing/SVGKParserPatternsAndGradients.m index 2fef178dd..6bc5c221e 100644 --- a/Core/Parsing/SVGKParserPatternsAndGradients.m +++ b/Core/Parsing/SVGKParserPatternsAndGradients.m @@ -57,7 +57,7 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(Node*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult +-(void) addChildObject:(Node*)child toObject:(Node*)parent parseResult:(SVGKParseResult *)parseResult { NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); } diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 4a205f602..65a806035 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -195,15 +195,11 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(Node*)child toObject:(NSObject*)parent parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem *)parentStackItem +-(void) addChildObject:(Node*)child toObject:(Node*)parent parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem *)parentStackItem { - SVGElement *parentElement = (SVGElement*) parent; - - Node *childNode = (Node*) child; - if ( parent != nil ) { - [parentElement appendChild:childNode]; + [parent appendChild:child]; } } From 94634a759c7f821915273e63ca1c535247b1a8a9 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 21 Jul 2012 16:08:37 +0100 Subject: [PATCH 065/110] SVGKImage and Parsing are now decoupled - you can parse an SVG using custom parsers, and/or cache it, and later create one or more SVGKImage's from the parsed output --- Core/SVGKImage.h | 15 ++++++++++++++- Core/SVGKImage.m | 13 ++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index b458fd61c..8a1abf2ec 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -13,6 +13,13 @@ We use the exact same method names as UIImage, and try to be literally as identical as possible. + Creating an SVGKImage: + + - PREFERRED: use the "imageNamed:" method + - CUSTOM SVGKSource class: use the "initWithSource:" method + - CUSTOM PARSING: Parse using SVGKParser, then send the parse-result to "initWithParsedSVG:" + + Data: - UIImage: not supported yet: will be a cached UIImage that is re-generated on demand. Will enable us to implement an SVGKImageView that works as a drop-in replacement for UIImageView @@ -113,8 +120,14 @@ #pragma mark - core methods for interacting with an SVG image usefully (not from UIImage) -/*! This is used internally by the main UIImage cloned methods anyway, so we might as well expose it */ +/*! If you want to provide a custom SVGKSource */ - (id)initWithSource:(SVGKSource *)source; +/*! If you already have a parsed SVG, and just want to upgrade it to an SVGKImage + + NB: this is frequently used if you have to add custom SVGKParserExtensions to parse an + SVG which contains custom tags + */ +- (id)initWithParsedSVG:(SVGKParseResult *)parseResult; /*! Creates a new instance each time you call it. This should ONLY be used if you specifically need to duplicate diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 9f9b6aab5..294599ec0 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -70,14 +70,13 @@ + (SVGKImage*) imageWithContentsOfFile:(NSString *)aPath { return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; } -- (id)initWithSource:(SVGKSource *)newSource { +- (id)initWithParsedSVG:(SVGKParseResult *)parseResult { self = [super init]; if (self) { self.svgWidth = SVGLengthZero; self.svgHeight = SVGLengthZero; - self.source = newSource; - self.parseErrorsAndWarnings = [SVGKParser parseSourceUsingDefaultSVGKParser:self.source]; + self.parseErrorsAndWarnings = parseResult; if( parseErrorsAndWarnings.parsedDocument != nil ) { @@ -104,6 +103,14 @@ - (id)initWithSource:(SVGKSource *)newSource { return self; } +- (id)initWithSource:(SVGKSource *)newSource { + self = [self initWithParsedSVG:[SVGKParser parseSourceUsingDefaultSVGKParser:self.source]]; + if (self) { + self.source = newSource; + } + return self; +} + - (id)initWithContentsOfFile:(NSString *)aPath { NSParameterAssert(aPath != nil); From 9853c84e5b890e8011fb028e784261358fe848ce Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 21 Jul 2012 16:33:31 +0100 Subject: [PATCH 066/110] Made the documentation about customising the parser more clearer / explicit, and exposed a convenience method --- Core/DOM classes/Core DOM/Node.m | 3 +++ Core/SVGKParser.h | 21 ++++++++++++++++++++- Core/SVGKParser.m | 16 ++++++++++------ 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index 8bf8521b7..e67a45085 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -318,6 +318,9 @@ -(NSString *)description case SKNodeType_PROCESSING_INSTRUCTION_NODE: nodeTypeName = @"PROCESSING INSTRUCTION"; break; + + default: + nodeTypeName = @"N/A (DATA IS MISSING FROM NODE INSTANCE)"; } return [NSString stringWithFormat:@"Node: %@ (%@) @@%ld attributes + %ld x children", self.nodeName, nodeTypeName, self.attributes.length, self.childNodes.length]; } diff --git a/Core/SVGKParser.h b/Core/SVGKParser.h index ff86a6600..732c880c1 100644 --- a/Core/SVGKParser.h +++ b/Core/SVGKParser.h @@ -1,7 +1,22 @@ /** SVGKParser.h - The main parser for SVGKit. All the magic starts here + The main parser for SVGKit. All the magic starts here. Either use: + + A: +parseSourceUsingDefaultSVGKParser + + ...or use: + + B: 1. -initWithSource: + B: 2. -addDefaultSVGParserExtensions + B: ... + B: 3. (as many times as you need) -addParserExtension: + B: ... + B: 4. -parseSynchronously + + Note that "A" above does ALL the steps in B for you. If you need a custom set of Parser Extensions, you'll need to + do all the steps in B yourself + PARSING --- @@ -64,6 +79,10 @@ - (id)initWithSource:(SVGKSource *)doc; +/*! Adds the default SVG-tag parsers (everything in the SVG namespace); you should always use these, unless you + are massively customizing SVGKit's parser! */ +-(void) addDefaultSVGParserExtensions; +/*! NB: you ALMOST ALWAYS want to first call "addDefaultSVGParserExtensions" */ - (void) addParserExtension:(NSObject*) extension; diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index c2732b231..ef9ab4945 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -42,12 +42,7 @@ @implementation SVGKParser + (SVGKParseResult*) parseSourceUsingDefaultSVGKParser:(SVGKSource*) source; { SVGKParser *parser = [[[SVGKParser alloc] initWithSource:source] autorelease]; - - SVGKParserSVG *subParserSVG = [[[SVGKParserSVG alloc] init] autorelease]; - SVGKParserPatternsAndGradients *subParserGradients = [[[SVGKParserPatternsAndGradients alloc] init] autorelease]; - - [parser.parserExtensions addObject:subParserSVG]; - [parser.parserExtensions addObject:subParserGradients]; + [parser addDefaultSVGParserExtensions]; SVGKParseResult* result = [parser parseSynchronously]; @@ -79,6 +74,15 @@ - (void)dealloc { [super dealloc]; } +-(void) addDefaultSVGParserExtensions +{ + SVGKParserSVG *subParserSVG = [[[SVGKParserSVG alloc] init] autorelease]; + SVGKParserPatternsAndGradients *subParserGradients = [[[SVGKParserPatternsAndGradients alloc] init] autorelease]; + + [self addParserExtension:subParserSVG]; + [self addParserExtension:subParserGradients]; +} + - (void) addParserExtension:(NSObject*) extension { if( self.parserExtensions == nil ) From d4aa8df754c903d01e933bd81f79622c0a5b2cfa Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 2 Sep 2012 23:21:10 +0100 Subject: [PATCH 067/110] Lots of DOM fixes, SVG spec fixes, and cleanup of outdated files --- Core/DOM classes/Core DOM/Document.m | 2 +- Core/DOM classes/Core DOM/Element.h | 4 +- Core/DOM classes/Core DOM/Element.m | 26 +++- Core/DOM classes/Core DOM/Node.h | 2 +- Core/DOM classes/Core DOM/Node.m | 1 + Core/DOM classes/SVG-DOM/SVGDocument.m | 2 - Core/DOM classes/SVG-DOM/SVGLength.h | 65 +++++++++ Core/DOM classes/SVG-DOM/SVGLength.m | 42 ++++++ .../SVG-DOM/SVGSVGElement_Mutable.h | 8 +- Core/DOM classes/SVGElement.h | 4 +- Core/DOM classes/SVGElement.m | 52 +++++-- Core/DOM classes/SVGElement_ForParser.h | 4 +- Core/DOM classes/SVGEllipseElement.m | 34 ++--- Core/DOM classes/SVGGroupElement.m | 10 +- Core/DOM classes/SVGImageElement.m | 27 ++-- Core/DOM classes/SVGLineElement.m | 22 +-- Core/DOM classes/SVGPathElement.m | 10 +- Core/DOM classes/SVGPolygonElement.m | 10 +- Core/DOM classes/SVGPolylineElement.m | 11 +- Core/DOM classes/SVGRectElement.m | 30 ++-- Core/DOM classes/SVGSVGElement.h | 19 ++- Core/DOM classes/SVGSVGElement.m | 26 ++-- Core/DOM classes/SVGShapeElement.m | 28 ++-- Core/DOM classes/SVGTextElement.m | 14 +- Core/Parsing/SVGKParserExtension.h | 13 +- Core/Parsing/SVGKParserPatternsAndGradients.h | 2 +- Core/Parsing/SVGKParserPatternsAndGradients.m | 13 +- Core/Parsing/SVGKParserSVG.m | 22 +-- Core/SKBasicDataTypes.h | 96 ------------- Core/SKBasicDataTypes.m | 66 --------- Core/SVGKImage.h | 8 +- Core/SVGKImage.m | 12 +- Core/SVGKParser.h | 5 +- Core/SVGKParser.m | 135 ++++++++++-------- Core/SVGKParserStackItem.h | 11 -- Core/SVGKParserStackItem.m | 14 -- Core/SVGKSource.m | 2 +- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 36 ++--- 38 files changed, 389 insertions(+), 499 deletions(-) create mode 100644 Core/DOM classes/SVG-DOM/SVGLength.h create mode 100644 Core/DOM classes/SVG-DOM/SVGLength.m delete mode 100644 Core/SKBasicDataTypes.h delete mode 100644 Core/SKBasicDataTypes.m delete mode 100644 Core/SVGKParserStackItem.h delete mode 100644 Core/SVGKParserStackItem.m diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index f2f787e2c..4ceecdd89 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -97,7 +97,7 @@ -(Node*) importNode:(Node*) importedNode deep:(BOOL) deep // Introduced in DOM Level 2: -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName { - Element* newElement = [[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:[NSURL URLWithString:namespaceURI]]; + Element* newElement = [[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:[NSURL URLWithString:namespaceURI] attributes:nil]; NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); diff --git a/Core/DOM classes/Core DOM/Element.h b/Core/DOM classes/Core DOM/Element.h index 99a5c0875..1345a9a55 100644 --- a/Core/DOM classes/Core DOM/Element.h +++ b/Core/DOM classes/Core DOM/Element.h @@ -93,7 +93,7 @@ #pragma mark - Objective-C init methods (not in SVG Spec - you're supposed to use SVGDocument's createXXX methods instead) -- (id)initWithLocalName:(NSString*) n; -- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI; +- (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attributes; +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes; @end diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index c936efd90..232a6873d 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -10,17 +10,39 @@ @implementation Element @synthesize tagName; -- (id)initWithLocalName:(NSString*) n { +- (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attributes { self = [super initElement:n]; if (self) { self.tagName = n; + + /** FIXME: read the spec and add two versions of this, one that uses NAMESPACED attributes, + and one that doesn't. + + Yes, DOM is a total Pain In The A** to implement - the different versions are mostly + separate, parallel, specs + */ + for( NSString* attributeName in attributes.allKeys ) + { + [self setAttribute:attributeName value:[attributes objectForKey:attributeName]]; + } } return self; } -- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI { +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes { self = [super initElement:n inNameSpaceURI:nsURI]; if (self) { self.tagName = n; + + /** FIXME: read the spec and add two versions of this, one that uses NAMESPACED attributes, + and one that doesn't. + + Yes, DOM is a total Pain In The A** to implement - the different versions are mostly + separate, parallel, specs + */ + for( NSString* attributeName in attributes.allKeys ) + { + [self setAttribute:attributeName value:[attributes objectForKey:attributeName]]; + } } return self; } diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h index 9d531c0e7..fd10162bf 100644 --- a/Core/DOM classes/Core DOM/Node.h +++ b/Core/DOM classes/Core DOM/Node.h @@ -102,7 +102,7 @@ typedef enum SKNodeType @property(nonatomic,retain,readonly) Node* lastChild; @property(nonatomic,retain,readonly) Node* previousSibling; @property(nonatomic,retain,readonly) Node* nextSibling; -@property(nonatomic,retain,readonly) NamedNodeMap* attributes; +@property(nonatomic,retain,readonly) NamedNodeMap* attributes; /*< NB: according to DOM Spec, this is null if the Node is NOT subclassed as an Element */ // Modified in DOM Level 2: @property(nonatomic,retain,readonly) Document* ownerDocument; diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index e67a45085..a13967acd 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -37,6 +37,7 @@ - (id)initType:(SKNodeType) nt { self = [super init]; if (self) { + self.nodeType = nt; switch( nt ) { case SKNodeType_ELEMENT_NODE: diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m index 8a1ba2f86..78aaf455a 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.m +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -11,8 +11,6 @@ #import "SVGDocument.h" #import "SVGDocument_Mutable.h" -#import "SKBasicDataTypes.h" - @implementation SVGDocument diff --git a/Core/DOM classes/SVG-DOM/SVGLength.h b/Core/DOM classes/SVG-DOM/SVGLength.h new file mode 100644 index 000000000..753b62d69 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGLength.h @@ -0,0 +1,65 @@ +/*! + SVGLength.h + + http://www.w3.org/TR/SVG/types.html#InterfaceSVGLength + + // Length Unit Types + const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; + const unsigned short SVG_LENGTHTYPE_NUMBER = 1; + const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; + const unsigned short SVG_LENGTHTYPE_EMS = 3; + const unsigned short SVG_LENGTHTYPE_EXS = 4; + const unsigned short SVG_LENGTHTYPE_PX = 5; + const unsigned short SVG_LENGTHTYPE_CM = 6; + const unsigned short SVG_LENGTHTYPE_MM = 7; + const unsigned short SVG_LENGTHTYPE_IN = 8; + const unsigned short SVG_LENGTHTYPE_PT = 9; + const unsigned short SVG_LENGTHTYPE_PC = 10; + + readonly attribute unsigned short unitType; + attribute float value setraises(DOMException); + attribute float valueInSpecifiedUnits setraises(DOMException); + attribute DOMString valueAsString setraises(DOMException); + + void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits) raises(DOMException); + void convertToSpecifiedUnits(in unsigned short unitType) raises(DOMException); + }; + */ +#import + +typedef enum SVG_LENGTH_TYPE +{ + SVG_LENGTHTYPE_UNKNOWN = 0, + SVG_LENGTHTYPE_NUMBER = 1, + SVG_LENGTHTYPE_PERCENTAGE = 2, + SVG_LENGTHTYPE_EMS = 3, + SVG_LENGTHTYPE_EXS = 4, + SVG_LENGTHTYPE_PX = 5, + SVG_LENGTHTYPE_CM = 6, + SVG_LENGTHTYPE_MM = 7, + SVG_LENGTHTYPE_IN = 8, + SVG_LENGTHTYPE_PT = 9, + SVG_LENGTHTYPE_PC = 10 +} SVG_LENGTH_TYPE; + + +@interface SVGLength : NSObject + +@property(nonatomic,readonly) SVG_LENGTH_TYPE unitType; +@property(nonatomic) float value; +@property(nonatomic) float valueInSpecifiedUnits; +@property(nonatomic,retain) NSString* valueAsString; + +-(void) newValueSpecifiedUnits:(SVG_LENGTH_TYPE) unitType valueInSpecifiedUnits:(float) valueInSpecifiedUnits; +-(void) convertToSpecifiedUnits:(SVG_LENGTH_TYPE) unitType; + +#pragma mark - things outside the spec but needed to make it usable in Objective C + ++(SVGLength*) svgLengthZero; ++(SVGLength*) svgLengthFromNSString:(NSString*) s; + +/** returns this SVGLength as if it had been converted to pixels, using [self convertToSpecifiedUnits:SVG_LENGTHTYPE_PX] + */ +-(float) pixelsValue; + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGLength.m b/Core/DOM classes/SVG-DOM/SVGLength.m new file mode 100644 index 000000000..3f14b3442 --- /dev/null +++ b/Core/DOM classes/SVG-DOM/SVGLength.m @@ -0,0 +1,42 @@ +#import "SVGLength.h" + +@implementation SVGLength + +@synthesize unitType; +@synthesize value; +@synthesize valueInSpecifiedUnits; +@synthesize valueAsString; + +-(void) newValueSpecifiedUnits:(SVG_LENGTH_TYPE) unitType valueInSpecifiedUnits:(float) valueInSpecifiedUnits +{ + +} + +-(void) convertToSpecifiedUnits:(SVG_LENGTH_TYPE) unitType +{ + +} + ++(SVGLength*) svgLengthZero +{ + SVGLength* result = [SVGLength new]; + result.value = 0.0f; + + return result; +} + ++(SVGLength*) svgLengthFromNSString:(NSString*) s +{ + SVGLength* result = [SVGLength new]; + + result.value = [s floatValue]; + + return result; +} + +-(float) pixelsValue +{ + return value; +} + +@end diff --git a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h index efd0ba310..d048c097a 100644 --- a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h +++ b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h @@ -2,10 +2,10 @@ @interface SVGSVGElement () -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength x; -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength y; -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength width; -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength height; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; +@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; @property (nonatomic, readwrite) NSString* contentScriptType; @property (nonatomic, readwrite) NSString* contentStyleType; @property (nonatomic, readwrite) SVGRect viewport; diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index af3df7d80..3f0e36696 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -49,8 +49,8 @@ #pragma mark - Objective-C init methods (not in SVG Spec - the official spec has no explicit way to create nodes, which is clearly a bug in the Spec. Until they fix the spec, we have to do something or else SVG would be unusable) -- (id)initWithLocalName:(NSString*) n; -- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI; +- (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attributes; +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes; @end \ No newline at end of file diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 0fe1223f1..ef1e002f1 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -67,12 +67,38 @@ -(void)setParentNode:(Node *)newParent } else { - NSAssert( [self.localName isEqualToString:@"svg"] || [newParent isKindOfClass:[SVGElement class]], @"All SVG nodes must have SVGElement superclasses, unless they are an embedded SVG root node, with tag = SVG" ); + /** + SVG Spec: we have to set a reference to the "root SVG tag of this part of the tree". + + If the tree is purely SVGElement nodes / subclasses, that's easy. + + But if there are custom nodes in there (any other DOM node, for instance), it gets + more tricky. We have to recurse up the tree until we find an SVGElement we can latch + onto + */ if( [self isKindOfClass:[SVGSVGElement class]] ) self.ownerSVGElement = (SVGSVGElement*) self; else - self.ownerSVGElement = ((SVGElement*) newParent).ownerSVGElement; + { + SVGElement* firstAncestorThatIsSVG = nil; + Node* currentAncestor = newParent; + + // current ancestor (conquest:bonus node) has nil ancestor because this is being called before its been added to its parent! + while( firstAncestorThatIsSVG == nil + && currentAncestor != nil ) // if we run out of tree! This would be an error (see below) + { + if( [currentAncestor isKindOfClass:[SVGElement class]] ) + firstAncestorThatIsSVG = (SVGElement*) currentAncestor; + else + currentAncestor = currentAncestor.parentNode; + } + + NSAssert( firstAncestorThatIsSVG != nil, @"This node has no valid SVG tags as ancestor, but it's not an tag, so this is an impossible SVG file" ); + + + self.ownerSVGElement = firstAncestorThatIsSVG.ownerSVGElement; + } [self reCalculateAndSetViewportElementReference]; } @@ -130,15 +156,12 @@ - (void)loadDefaults { // to be overriden by subclasses } -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { // to be overriden by subclasses // make sure super implementation is called - id value = nil; - - if ((value = [attributes objectForKey:@"id"])) { - _identifier = [value copy]; - } + if( [[self getAttribute:@"id"] length] > 0 ) + self.identifier = [self getAttribute:@"id"]; /** @@ -160,13 +183,14 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult * skewY(), which specifies a skew transformation along the y-axis. */ - if( (value = [attributes objectForKey:@"transform"]) ) + if( [[self getAttribute:@"transform"] length] > 0 ) { /** http://www.w3.org/TR/SVG/coords.html#TransformAttribute The individual transform definitions are separated by whitespace and/or a comma. */ + NSString* value = [self getAttribute:@"transform"]; #if !(TARGET_OS_IPHONE) && ( !defined( __MAC_10_7 ) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6_7 ) NSLog(@"[%@] WARNING: the transform attribute requires OS X 10.7 or above (we need Regular Expressions! Apple was slow to add them :( ). Ignoring TRANSFORMs in SVG!", [self class] ); @@ -319,15 +343,15 @@ - (void)parseContent:(NSString *)content { } - (NSString *)description { - return [NSString stringWithFormat:@"<%@ %p | id=%@ | prefix:localName=%@:%@ | tagName=%@ | stringValue=%@ | children=%d>", + return [NSString stringWithFormat:@"<%@ %p | id=%@ | prefix:localName=%@:%@ | tagName=%@ | stringValue=%@ | children=%ld>", [self class], self, _identifier, self.prefix, self.localName, self.tagName, _stringValue, self.childNodes.length]; } #pragma mark - Objective-C init methods (not in SVG Spec - the official spec has no explicit way to create nodes, which is clearly a bug in the Spec. Until they fix the spec, we have to do something or else SVG would be unusable) -- (id)initWithLocalName:(NSString*) n +- (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attributes { - self = [super initWithLocalName:n]; + self = [super initWithLocalName:n attributes:attributes]; if( self ) { [self loadDefaults]; @@ -335,9 +359,9 @@ - (id)initWithLocalName:(NSString*) n } return self; } -- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes { - self = [super initWithQualifiedName:n inNameSpaceURI:nsURI]; + self = [super initWithQualifiedName:n inNameSpaceURI:nsURI attributes:attributes]; if( self ) { [self loadDefaults]; diff --git a/Core/DOM classes/SVGElement_ForParser.h b/Core/DOM classes/SVGElement_ForParser.h index 30a64f71c..17029c140 100644 --- a/Core/DOM classes/SVGElement_ForParser.h +++ b/Core/DOM classes/SVGElement_ForParser.h @@ -9,11 +9,11 @@ - (void)loadDefaults; // should be overriden to set element defaults -/*! Overridden by sub-classes. Be sure to call [super parseAttributes:attributes]; +/*! Overridden by sub-classes. Be sure to call [super postProcessAttributesAddingErrorsTo:attributes]; Returns nil, or an error if something failed trying to parse attributes (usually: unsupported SVG feature that's not implemented yet) */ -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult; /*! Re-calculates the absolute transform on-demand by querying parent's absolute transform and appending self's relative transform */ -(CGAffineTransform) transformAbsolute; diff --git a/Core/DOM classes/SVGEllipseElement.m b/Core/DOM classes/SVGEllipseElement.m index f380dca36..1ba182765 100644 --- a/Core/DOM classes/SVGEllipseElement.m +++ b/Core/DOM classes/SVGEllipseElement.m @@ -9,6 +9,13 @@ #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) +@interface SVGEllipseElement() +@property (nonatomic, readwrite) CGFloat cx; +@property (nonatomic, readwrite) CGFloat cy; +@property (nonatomic, readwrite) CGFloat rx; +@property (nonatomic, readwrite) CGFloat ry; +@end + @implementation SVGEllipseElement @synthesize cx = _cx; @@ -16,30 +23,19 @@ @implementation SVGEllipseElement @synthesize rx = _rx; @synthesize ry = _ry; -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; + self.cx = [[self getAttribute:@"cx"] floatValue]; - if ((value = [attributes objectForKey:@"cx"])) { - _cx = [value floatValue]; - } + self.cy = [[self getAttribute:@"cy"] floatValue]; - if ((value = [attributes objectForKey:@"cy"])) { - _cy = [value floatValue]; - } + self.rx = [[self getAttribute:@"rx"] floatValue]; - if ((value = [attributes objectForKey:@"rx"])) { - _rx = [value floatValue]; - } - - if ((value = [attributes objectForKey:@"ry"])) { - _ry = [value floatValue]; - } + self.ry = [[self getAttribute:@"ry"] floatValue]; - if ((value = [attributes objectForKey:@"r"])) { // circle - _rx = [value floatValue]; - _ry = _rx; + if( [[self getAttribute:@"r"] length] > 0 ) { // circle + self.ry = self.rx = [[self getAttribute:@"r"] floatValue]; } CGMutablePathRef path = CGPathCreateMutable(); diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index b443e61a3..2b36ec687 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -29,14 +29,10 @@ - (void)loadDefaults { _opacity = 1.0f; } -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; - - if ((value = [attributes objectForKey:@"opacity"])) { - _opacity = [value floatValue]; - } + _opacity = [[self getAttribute:@"opacity"] floatValue]; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 3eae42e8e..b4f48b937 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -33,6 +33,9 @@ CGImageRef SVGImageCGImage(SVGImageRef img) #endif } +@interface SVGImageElement() +@property (nonatomic, readwrite) NSString *href; +@end @implementation SVGImageElement @@ -49,28 +52,18 @@ - (void)dealloc { [super dealloc]; } -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - id value = nil; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - if ((value = [attributes objectForKey:@"x"])) { - _x = [value floatValue]; - } + _x = [[self getAttribute:@"x"] floatValue]; - if ((value = [attributes objectForKey:@"y"])) { - _y = [value floatValue]; - } + _y = [[self getAttribute:@"y"] floatValue]; - if ((value = [attributes objectForKey:@"width"])) { - _width = [value floatValue]; - } + _width = [[self getAttribute:@"width"] floatValue]; - if ((value = [attributes objectForKey:@"height"])) { - _height = [value floatValue]; - } + _height = [[self getAttribute:@"height"] floatValue]; - if ((value = [attributes objectForKey:@"href"])) { - _href = [value retain]; - } + self.href = [self getAttribute:@"href"]; } - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform diff --git a/Core/DOM classes/SVGLineElement.m b/Core/DOM classes/SVGLineElement.m index 7d4be6f47..f83a8ad84 100644 --- a/Core/DOM classes/SVGLineElement.m +++ b/Core/DOM classes/SVGLineElement.m @@ -16,26 +16,16 @@ @implementation SVGLineElement @synthesize x2 = _x2; @synthesize y2 = _y2; -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; + _x1 = [[self getAttribute:@"x1"] floatValue]; - if ((value = [attributes objectForKey:@"x1"])) { - _x1 = [value floatValue]; - } + _y1 = [[self getAttribute:@"y1"] floatValue]; - if ((value = [attributes objectForKey:@"y1"])) { - _y1 = [value floatValue]; - } + _x2 = [[self getAttribute:@"x2"] floatValue]; - if ((value = [attributes objectForKey:@"x2"])) { - _x2 = [value floatValue]; - } - - if ((value = [attributes objectForKey:@"y2"])) { - _y2 = [value floatValue]; - } + _y2 = [[self getAttribute:@"y2"] floatValue]; CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, _x1, _y1); diff --git a/Core/DOM classes/SVGPathElement.m b/Core/DOM classes/SVGPathElement.m index e15b5aaf9..2e88faac6 100644 --- a/Core/DOM classes/SVGPathElement.m +++ b/Core/DOM classes/SVGPathElement.m @@ -20,15 +20,11 @@ - (void) parseData:(NSString *)data; @implementation SVGPathElement -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; - - if ((value = [attributes objectForKey:@"d"])) { - [self parseData:value]; - } + [self parseData:[self getAttribute:@"d"]]; } - (void)parseData:(NSString *)data diff --git a/Core/DOM classes/SVGPolygonElement.m b/Core/DOM classes/SVGPolygonElement.m index 721862dda..9660feedf 100644 --- a/Core/DOM classes/SVGPolygonElement.m +++ b/Core/DOM classes/SVGPolygonElement.m @@ -19,14 +19,10 @@ - (void) parseData:(NSString *)data; @implementation SVGPolygonElement -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; - - if ((value = [attributes objectForKey:@"points"])) { - [self parseData:value]; - } + [self parseData:[self getAttribute:@"points"]]; } /*! According to SVG spec, a 'polygon' is EXACTYLY IDENTICAL to a 'path', if you prepend the letter "M", and diff --git a/Core/DOM classes/SVGPolylineElement.m b/Core/DOM classes/SVGPolylineElement.m index e517e0364..77655d62f 100644 --- a/Core/DOM classes/SVGPolylineElement.m +++ b/Core/DOM classes/SVGPolylineElement.m @@ -14,13 +14,12 @@ @implementation SVGPolylineElement -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; - - if ((value = [attributes objectForKey:@"points"])) { - CGMutablePathRef path = createPathFromPointsInString([value UTF8String], NO); + if( [[self getAttribute:@"points"] length] > 0 ) + { + CGMutablePathRef path = createPathFromPointsInString([[self getAttribute:@"points"] UTF8String], NO); [self setPathByCopyingPathFromLocalSpace:path]; CGPathRelease(path); diff --git a/Core/DOM classes/SVGRectElement.m b/Core/DOM classes/SVGRectElement.m index 8c3c9e34f..7924236d2 100644 --- a/Core/DOM classes/SVGRectElement.m +++ b/Core/DOM classes/SVGRectElement.m @@ -55,34 +55,20 @@ void CGPathAddRoundedRect (CGMutablePathRef path, CGRect rect, CGFloat radius) { CGPathCloseSubpath(path); } -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; + _x = [[self getAttribute:@"x"] floatValue]; - if ((value = [attributes objectForKey:@"x"])) { - _x = [value floatValue]; - } + _y = [[self getAttribute:@"y"] floatValue]; - if ((value = [attributes objectForKey:@"y"])) { - _y = [value floatValue]; - } + _width = [[self getAttribute:@"width"] floatValue]; - if ((value = [attributes objectForKey:@"width"])) { - _width = [value floatValue]; - } + _height = [[self getAttribute:@"height"] floatValue]; - if ((value = [attributes objectForKey:@"height"])) { - _height = [value floatValue]; - } + _rx = [[self getAttribute:@"rx"] floatValue]; - if ((value = [attributes objectForKey:@"rx"])) { - _rx = [value floatValue]; - } - - if ((value = [attributes objectForKey:@"ry"])) { - _ry = [value floatValue]; - } + _ry = [[self getAttribute:@"ry"] floatValue]; CGMutablePathRef path = CGPathCreateMutable(); CGRect rect = CGRectMake(_x, _y, _width, _height); diff --git a/Core/DOM classes/SVGSVGElement.h b/Core/DOM classes/SVGSVGElement.h index 2dced0137..b25c92319 100644 --- a/Core/DOM classes/SVGSVGElement.h +++ b/Core/DOM classes/SVGSVGElement.h @@ -49,8 +49,13 @@ #import "SVGElement.h" #import "SVGViewSpec.h" -#pragma mark - most of the SVG* types (SVGLength, SVGNumber, etc) are in this imported header -#import "SKBasicDataTypes.h" +#pragma mark - the SVG* types (SVGLength, SVGNumber, etc) +#import "SVGAngle.h" +#import "SVGLength.h" +#import "SVGNumber.h" +#import "SVGPoint.h" +#import "SVGRect.h" +#import "SVGTransform.h" #pragma mark - a few raw DOM imports are required for SVG DOM, but not many #import "Element.h" @@ -62,10 +67,10 @@ -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength x; -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength y; -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength width; -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength height; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; +@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; @property (nonatomic, readonly) NSString* contentScriptType; @property (nonatomic, readonly) NSString* contentStyleType; @property (nonatomic, readonly) SVGRect viewport; @@ -93,7 +98,7 @@ -(BOOL) checkEnclosure:(SVGElement*) element rect:(SVGRect) rect; -(void) deselectAll; -(SVGNumber) createSVGNumber; --(SVGLength) createSVGLength; +-(SVGLength*) createSVGLength; -(SVGAngle*) createSVGAngle; -(SVGPoint*) createSVGPoint; -(SVGMatrix*) createSVGMatrix; diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index 7120a17cf..a4c61f9ba 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -6,6 +6,9 @@ #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) +#if TARGET_OS_IPHONE +#import +#endif @interface SVGSVGElement() @property (nonatomic, readwrite) CGRect viewBoxFrame; @@ -59,10 +62,9 @@ -(SVGNumber) createSVGNumber SVGNumber n = { 0 }; return n; } --(SVGLength) createSVGLength +-(SVGLength*) createSVGLength { - SVGLength l = { 0.0, 0 }; - return l; + return [SVGLength new]; } -(SVGAngle*) createSVGAngle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } -(SVGPoint*) createSVGPoint { NSAssert( FALSE, @"Not implemented yet" ); return nil; } @@ -79,21 +81,15 @@ -(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, @"Not implem #pragma mark - Objective C methods needed given our current non-compliant SVG Parser -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; + self.width = [SVGLength svgLengthFromNSString:[self getAttribute:@"width"]]; - if ((value = [attributes objectForKey:@"width"])) { - self.width = SVGLengthFromNSString( value ); - } - - if ((value = [attributes objectForKey:@"height"])) { - self.height = SVGLengthFromNSString( value ); - } + self.height = [SVGLength svgLengthFromNSString:[self getAttribute:@"height"]]; - if( (value = [attributes objectForKey:@"viewBox"])) { - NSArray* boxElements = [(NSString*) value componentsSeparatedByString:@" "]; + if( [[self getAttribute:@"viewBox"] length] > 0 ) { + NSArray* boxElements = [[self getAttribute:@"viewBox"] componentsSeparatedByString:@" "]; _viewBoxFrame = CGRectMake([[boxElements objectAtIndex:0] floatValue], [[boxElements objectAtIndex:1] floatValue], [[boxElements objectAtIndex:2] floatValue], [[boxElements objectAtIndex:3] floatValue]); diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 0aaaa4668..b18056bb6 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -48,18 +48,16 @@ - (void)loadDefaults { _fillType = SVGFillTypeSolid; } -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; + [super postProcessAttributesAddingErrorsTo:parseResult]; id value = nil; - if ((value = [attributes objectForKey:@"opacity"])) { - _opacity = [value floatValue]; - } + _opacity = [[self getAttribute:@"opacity"] floatValue]; - if ((value = [attributes objectForKey:@"fill"])) { - const char *cvalue = [value UTF8String]; + if ([[self getAttribute:@"fill"] length] > 0 ) { + const char *cvalue = [[self getAttribute:@"fill"] UTF8String]; if (!strncmp(cvalue, "none", 4)) { _fillType = SVGFillTypeNone; @@ -74,12 +72,10 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult } } - if ((value = [attributes objectForKey:@"stroke-width"])) { - _strokeWidth = [value floatValue]; - } + _strokeWidth = [[self getAttribute:@"stroke-width"] floatValue]; - if ((value = [attributes objectForKey:@"stroke"])) { - const char *cvalue = [value UTF8String]; + if ( [[self getAttribute:@"stroke"] length] > 0 ) { + const char *cvalue = [[self getAttribute:@"stroke"] UTF8String]; if (!strncmp(cvalue, "none", 4)) { _strokeWidth = 0.0f; @@ -92,12 +88,12 @@ - (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult } } - if ((value = [attributes objectForKey:@"stroke-opacity"])) { - _strokeColor.a = (uint8_t) ([value floatValue] * 0xFF); + if ([[self getAttribute:@"stroke-opacity"] length] > 0 ) { + _strokeColor.a = (uint8_t) ([[self getAttribute:@"stroke-opacity"] floatValue] * 0xFF); } - if ((value = [attributes objectForKey:@"fill-opacity"])) { - _fillColor.a = (uint8_t) ([value floatValue] * 0xFF); + if ([[self getAttribute:@"fill-opacity"] length] > 0 ) { + _fillColor.a = (uint8_t) ([[self getAttribute:@"fill-opacity"] floatValue] * 0xFF); } } diff --git a/Core/DOM classes/SVGTextElement.m b/Core/DOM classes/SVGTextElement.m index dcd93afab..ad3bb9ac8 100644 --- a/Core/DOM classes/SVGTextElement.m +++ b/Core/DOM classes/SVGTextElement.m @@ -31,19 +31,13 @@ - (void)dealloc { [super dealloc]; } -- (void)parseAttributes:(NSDictionary *)attributes parseResult:(SVGKParseResult *)parseResult +- (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { - [super parseAttributes:attributes parseResult:parseResult]; + [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; + _x = [[self getAttribute:@"x"] floatValue]; - if ((value = [attributes objectForKey:@"x"])) { - _x = [value floatValue]; - } - - if ((value = [attributes objectForKey:@"y"])) { - _y = [value floatValue]; - } + _y = [[self getAttribute:@"y"] floatValue]; // TODO: class // TODO: style diff --git a/Core/Parsing/SVGKParserExtension.h b/Core/Parsing/SVGKParserExtension.h index d07855fc4..32ee87afb 100644 --- a/Core/Parsing/SVGKParserExtension.h +++ b/Core/Parsing/SVGKParserExtension.h @@ -14,8 +14,6 @@ #import -@class SVGKParserStackItem; -#import "SVGKParserStackItem.h" #import "SVGKSource.h" @class SVGKParseResult; @@ -44,13 +42,8 @@ Because SVG-DOM uses DOM, custom parsers can return any object they like - so long as its some kind of subclass of DOM's Node class */ -- (Node*)handleStartElement:(NSString *)name document:(SVGKSource*) document namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; -/*! - Because SVG-DOM uses DOM, custom parsers MUST be prepared to accept child-nodes of any class that's a - valid subclass of DOM's Node class - */ --(void) addChildObject:(Node*)child toObject:(Node*)parent parseResult:(SVGKParseResult*) parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem; --(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item; --(BOOL) createdItemShouldStoreContent:(NSObject*) item; +- (Node*)handleStartElement:(NSString *)name document:(SVGKSource*) document namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentNode:(Node*) parentNode; +-(void) handleStringContent:(NSMutableString*) content forNode:(Node*) node; +-(BOOL) createdNodeShouldStoreContent:(Node*) node; @end diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.h b/Core/Parsing/SVGKParserPatternsAndGradients.h index 3bd0afe80..7d424ad1d 100644 --- a/Core/Parsing/SVGKParserPatternsAndGradients.h +++ b/Core/Parsing/SVGKParserPatternsAndGradients.h @@ -10,6 +10,6 @@ #import "SVGKParser.h" -@interface SVGKParserPatternsAndGradients : NSObject +@interface SVGKParserPatternsAndGradients : NSObject @end diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.m b/Core/Parsing/SVGKParserPatternsAndGradients.m index 6bc5c221e..b5d8a5ac7 100644 --- a/Core/Parsing/SVGKParserPatternsAndGradients.m +++ b/Core/Parsing/SVGKParserPatternsAndGradients.m @@ -43,26 +43,21 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithObjects:@"pattern", @"gradient", nil]; } -- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource xmlns:(NSString*) prefix attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult { +- (Node*)handleStartElement:(NSString *)name document:(SVGKSource*) document namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult*) parseResult parentNode:(Node*) parentNode +{ NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); return nil; } - --(BOOL) createdItemShouldStoreContent:(NSObject*) item +-(BOOL) createdNodeShouldStoreContent:(Node*) node { NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); return false; } --(void) addChildObject:(Node*)child toObject:(Node*)parent parseResult:(SVGKParseResult *)parseResult -{ - NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); -} - --(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item +-(void) handleStringContent:(NSMutableString*) content forNode:(Node*) node { NSAssert( FALSE, @"Patterns and gradients are not supported by SVGKit yet - no-one has implemented them" ); } diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 65a806035..45aa6c33a 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -63,7 +63,7 @@ -(NSArray*) supportedTags return [NSMutableArray arrayWithArray:[elementMap allKeys]]; } -- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem*) parentStackItem +- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentNode:(Node*) parentNode { if( [[self supportedNamespaces] containsObject:XMLNSURI] ) { @@ -94,8 +94,8 @@ - (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ - SVGElement *element = [[[elementClass alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI ] autorelease]; - [element parseAttributes:attributes parseResult:parseResult]; + SVGElement *element = [[[elementClass alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributes] autorelease]; + [element postProcessAttributesAddingErrorsTo:parseResult]; /** special case: */ if( [@"svg" isEqualToString:name] ) @@ -130,7 +130,7 @@ - (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource BOOL overwriteRootSVGDocument = FALSE; BOOL overwriteRootOfTree = FALSE; - if( parentStackItem == nil ) + if( parentNode == nil ) { /** This start element is the first item in the document PS: xcode has a new bug for Lion: it can't format single-line comments with two asterisks. This line added because Xcode sucks. @@ -180,7 +180,7 @@ - (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource return nil; } --(BOOL) createdItemShouldStoreContent:(NSObject*) item +-(BOOL) createdNodeShouldStoreContent:(Node*) item { if( [item isKindOfClass:[SVGElement class]] ) { @@ -195,17 +195,9 @@ -(BOOL) createdItemShouldStoreContent:(NSObject*) item return false; } --(void) addChildObject:(Node*)child toObject:(Node*)parent parseResult:(SVGKParseResult *)parseResult parentStackItem:(SVGKParserStackItem *)parentStackItem +-(void) handleStringContent:(NSMutableString*) content forNode:(Node*) node { - if ( parent != nil ) - { - [parent appendChild:child]; - } -} - --(void) parseContent:(NSMutableString*) content forItem:(NSObject*) item -{ - SVGElement* element = (SVGElement*) item; + SVGElement* element = (SVGElement*) node; [element parseContent:content]; } diff --git a/Core/SKBasicDataTypes.h b/Core/SKBasicDataTypes.h deleted file mode 100644 index f3d34779b..000000000 --- a/Core/SKBasicDataTypes.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - SVGBasicDataTypes.h - - Contains structs needed to support SVGKit, and all the methods you need to manipulate, create, view those structs - */ - -#ifndef SVG_BASIC_DATA_TYPES_H_ -#define SVG_BASIC_DATA_TYPES_H_ - - -#import - -#if TARGET_OS_IPHONE - -#import - -#endif - -#import "SVGRect.h" -#import "SVGPoint.h" -#import "SVGNumber.h" -#import "SVGAngle.h" -#import "SVGTransform.h" - -/*! NOT IMPLEMENTED YET */ -typedef struct -{ - /*! NOT IMPLEMENTED YET */ -} SVGAnimatedLength; - -/** - http://www.w3.org/TR/SVG11/types.html#InterfaceSVGLength - - // Length Unit Types - const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; - const unsigned short SVG_LENGTHTYPE_NUMBER = 1; - const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; - const unsigned short SVG_LENGTHTYPE_EMS = 3; - const unsigned short SVG_LENGTHTYPE_EXS = 4; - const unsigned short SVG_LENGTHTYPE_PX = 5; - const unsigned short SVG_LENGTHTYPE_CM = 6; - const unsigned short SVG_LENGTHTYPE_MM = 7; - const unsigned short SVG_LENGTHTYPE_IN = 8; - const unsigned short SVG_LENGTHTYPE_PT = 9; - const unsigned short SVG_LENGTHTYPE_PC = 10; - - readonly attribute unsigned short unitType; - attribute float value setraises(DOMException); - attribute float valueInSpecifiedUnits setraises(DOMException); - attribute DOMString valueAsString setraises(DOMException); -*/ -typedef enum SVGLengthType -{ - SVGLengthTypeUnknown, - SVGLengthTypeNumber, - SVGLengthTypePercentage, - SVGLengthTypeEms, - SVGLengthTypeExs, - SVGLengthTypePx, - SVGLengthTypeCm, - SVGLengthTypeMm, - SVGLengthTypeIn, - SVGLengthTypePt, - SVGLengthTypePc -} SVGLengthType; - -/** - When a is used in an SVG presentation attribute, the syntax must match the following pattern: - - length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")? - */ -typedef struct -{ - const float value; - const SVGLengthType type; -} SVGLength; - -// FIXME: only absolute widths and heights are supported (no percentages) -extern const SVGLength SVGLengthZero; - -/** Only supports raw float numbers for now, and pretends they are pixels */ -SVGLength SVGLengthFromNSString( NSString* value ); - -SVGLength SVGLengthGetWidth( CGRect rect ); - -SVGLength SVGLengthGetHeight( CGRect rect ); - -CGFloat SVGLengthAsPixels( SVGLength len ); - -CGFloat SVGLengthAsApplePoints( SVGLength len ); - -@interface SVGBasicDataTypes : NSObject - -@end - -#endif \ No newline at end of file diff --git a/Core/SKBasicDataTypes.m b/Core/SKBasicDataTypes.m deleted file mode 100644 index 6cc94becf..000000000 --- a/Core/SKBasicDataTypes.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// SVGBasicDataTypes.m -// SVGPad -// -// Created by adam applecansuckmybigtodger on 24/04/2012. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#import "SKBasicDataTypes.h" - -const SVGLength SVGLengthZero = { 0.0, SVGLengthTypeUnknown }; - -/** Only supports raw float numbers now, and pretends they are pixels */ -SVGLength SVGLengthFromNSString( NSString* value ) -{ - SVGLength result = { [value floatValue], SVGLengthTypePx }; - return result; -} - -SVGLength SVGLengthGetWidth( CGRect rect ) -{ - SVGLength result = { CGRectGetWidth(rect), SVGLengthTypePx }; - return result; -} - -SVGLength SVGLengthGetHeight( CGRect rect ) -{ - SVGLength result = { CGRectGetHeight(rect), SVGLengthTypePx }; - return result; -} - -CGFloat SVGLengthAsPixels( SVGLength len ) -{ - switch( len.type ) - { - case SVGLengthTypeUnknown: - case SVGLengthTypeNumber: - case SVGLengthTypePercentage: - case SVGLengthTypeEms: - case SVGLengthTypeExs: - case SVGLengthTypeCm: - case SVGLengthTypeMm: - case SVGLengthTypeIn: - case SVGLengthTypePt: - case SVGLengthTypePc: - { - NSCAssert( FALSE, @"Can't convert this particular SVGLength type to pixels" ); - } - - case SVGLengthTypePx: - return len.value; - } -} - -/*! Currently returns length-as-pixels (even though Apple has 4x real pixels to the apple points, right now the SVG lib does NOTHING special to handle Retina displays) - - TODO: add Retina support to SVGKit, and when it works: this method should perhaps return pixels / (points/pixel) - */ -CGFloat SVGLengthAsApplePoints( SVGLength len ) -{ - return SVGLengthAsPixels(len); -} - -@implementation SVGBasicDataTypes - -@end diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index 8a1abf2ec..8eca08614 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -35,7 +35,9 @@ */ -#import "SKBasicDataTypes.h" +#import + +#import "SVGLength.h" #import "SVGDocument.h" #import "SVGElement.h" #import "SVGSVGElement.h" @@ -55,8 +57,8 @@ @property (nonatomic, readonly) UIImage* UIImage; /** generates an image on the fly */ #endif -@property (nonatomic, readonly) SVGLength svgWidth; -@property (nonatomic, readonly) SVGLength svgHeight; +@property (nonatomic, readonly) SVGLength* svgWidth; +@property (nonatomic, readonly) SVGLength* svgHeight; @property (nonatomic, retain, readonly) SVGKSource* source; @property (nonatomic, retain, readonly) SVGKParseResult* parseErrorsAndWarnings; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 294599ec0..09cf82acb 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -10,8 +10,8 @@ @interface SVGKImage () -@property (nonatomic, readwrite) SVGLength svgWidth; -@property (nonatomic, readwrite) SVGLength svgHeight; +@property (nonatomic, readwrite) SVGLength* svgWidth; +@property (nonatomic, readwrite) SVGLength* svgHeight; @property (nonatomic, retain, readwrite) SVGKParseResult* parseErrorsAndWarnings; @property (nonatomic, retain, readwrite) SVGKSource* source; @@ -73,8 +73,8 @@ + (SVGKImage*) imageWithContentsOfFile:(NSString *)aPath { - (id)initWithParsedSVG:(SVGKParseResult *)parseResult { self = [super init]; if (self) { - self.svgWidth = SVGLengthZero; - self.svgHeight = SVGLengthZero; + self.svgWidth = [SVGLength svgLengthZero]; + self.svgHeight = [SVGLength svgLengthZero]; self.parseErrorsAndWarnings = parseResult; @@ -151,7 +151,7 @@ - (id)initWithData:(NSData *)data -(CGSize)size { - return CGSizeMake( SVGLengthAsApplePoints(self.svgWidth), SVGLengthAsApplePoints(self.svgHeight)); + return CGSizeMake( [self.svgWidth pixelsValue], [self.svgHeight pixelsValue] ); } -(CGFloat)scale @@ -323,7 +323,7 @@ -(CALayer *)newCALayerTree // TODO: calc the correct transform! CGRect frameViewBox = self.DOMTree.viewBoxFrame; - CGRect frameImage = CGRectMake(0,0, SVGLengthAsPixels( self.DOMTree.width), SVGLengthAsPixels( self.DOMTree.height ) ); + CGRect frameImage = CGRectMake(0,0, [self.DOMTree.width pixelsValue], [self.DOMTree.height pixelsValue] ); if( ! CGRectIsEmpty( frameViewBox ) ) preTransform = CGAffineTransformMakeScale( frameImage.size.width / frameViewBox.size.width, frameImage.size.height / frameViewBox.size.height); diff --git a/Core/SVGKParser.h b/Core/SVGKParser.h index 732c880c1..ba354b67c 100644 --- a/Core/SVGKParser.h +++ b/Core/SVGKParser.h @@ -41,7 +41,6 @@ #import "SVGKParserExtension.h" #import "SVGKParseResult.h" -#import "SVGKParserStackItem.h" #import "SVGElement.h" @@ -56,7 +55,9 @@ @private BOOL _storingChars; NSMutableString *_storedChars; - NSMutableArray *_elementStack; + //NSMutableArray *_elementStack; + NSMutableArray * _stackOfParserExtensions; + Node * _parentOfCurrentNode; } @property(nonatomic,retain,readonly) SVGKSource* source; diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index ef9ab4945..b18de8422 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -15,6 +15,8 @@ #import "SVGDocument_Mutable.h" // so we can modify the SVGDocuments we're parsing +#import "Node.h" + @interface SVGKParser() @property(nonatomic,retain, readwrite) SVGKSource* source; @property(nonatomic,retain, readwrite) SVGKParseResult* currentParseRun; @@ -60,7 +62,7 @@ - (id)initWithSource:(SVGKSource *) s { self.source = s; _storedChars = [NSMutableString new]; - _elementStack = [NSMutableArray new]; + _stackOfParserExtensions = [NSMutableArray new]; } return self; } @@ -69,7 +71,7 @@ - (void)dealloc { self.currentParseRun = nil; self.source = nil; [_storedChars release]; - [_elementStack release]; + [_stackOfParserExtensions release]; self.parserExtensions = nil; [super dealloc]; } @@ -96,6 +98,8 @@ - (void) addParserExtension:(NSObject*) extension - (SVGKParseResult*) parseSynchronously { self.currentParseRun = [[SVGKParseResult new] autorelease]; + _parentOfCurrentNode = nil; + [_stackOfParserExtensions removeAllObjects]; /* // 1. while (source has chunks of BYTES) @@ -171,42 +175,60 @@ - (void)connection:(NSURLConnection *)connection */ -- (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes { +- (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes +{ + BOOL parsingRootTag = FALSE; + + if( _parentOfCurrentNode == nil ) + parsingRootTag = TRUE; - for( NSObject* subParser in self.parserExtensions ) + /** + Search for a Parser Extension to handle this XML tag ... + + (most tags are handled by the default SVGParserSVG - but if you have other XML embedded in your SVG, you'll + have custom parser extentions too) + */ + for( NSObject* subParser in self.parserExtensions ) + { + if( [[subParser supportedNamespaces] containsObject:XMLNSURI] + && [[subParser supportedTags] containsObject:name] ) { - if( [[subParser supportedNamespaces] containsObject:XMLNSURI] - && [[subParser supportedTags] containsObject:name] ) + [_stackOfParserExtensions addObject:subParser]; + + /** Parser Extenstion creates a node for us */ + Node* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentNode:_parentOfCurrentNode]; + + _parentOfCurrentNode = subParserResult; + + NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); + + /** Add the new (partially parsed) node to the parent node in tree + + (need this for some of the parsing, later on, where we need to be able to read up + the tree to make decisions about the data - this is REQUIRED by the SVG Spec) + */ + [subParserResult appendChild:subParserResult]; // this is a DOM method: should NOT have side-effects + + if ([subParser createdNodeShouldStoreContent:subParserResult]) { + [_storedChars setString:@""]; + _storingChars = YES; + } + else { + _storingChars = NO; + } + + if( parsingRootTag ) { - SVGKParserStackItem* parentStackItem = [_elementStack lastObject]; - - Node* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentStackItem:parentStackItem]; - - NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); - - SVGKParserStackItem* stackItem = [[[SVGKParserStackItem alloc] init] autorelease];; - stackItem.parserForThisItem = subParser; - stackItem.item = subParserResult; - - [_elementStack addObject:stackItem]; - - if ([subParser createdItemShouldStoreContent:stackItem.item]) { - [_storedChars setString:@""]; - _storingChars = YES; - } - else { - _storingChars = NO; - } - return; - + currentParseRun.parsedDocument.rootElement = (SVGSVGElement*) subParserResult; } - // otherwise ignore it - the parser extension didn't recognise the element + + return; } + // otherwise ignore it - the parser extension didn't recognise the element + } - NSLog(@"[%@] ERROR: could not find a parser for tag: <%@:%@>; adding empty placeholder", [self class], prefix, name ); - - SVGKParserStackItem* emptyItem = [[[SVGKParserStackItem alloc] init] autorelease]; - [_elementStack addObject:emptyItem]; + /*! this was an unmatched tag - we have no parser for it, so we're pruning it from the tree */ + NSLog(@"[%@] WARN: found a non-parsed tag () - this will NOT be added to the output tree", [self class], name ); } @@ -282,51 +304,40 @@ but it keeps returning nil pointer (not always, but often). WTF? Not sure what w - (void)handleEndElement:(NSString *)name { //DELETE DEBUG NSLog(@"ending element, name = %@", name); - SVGKParserStackItem* stackItem = [_elementStack lastObject]; - [_elementStack removeLastObject]; + NSObject* lastobject = [_stackOfParserExtensions lastObject]; + + [_stackOfParserExtensions removeLastObject]; - if( stackItem.parserForThisItem == nil ) + if( lastobject == [NSNull null] ) { /*! this was an unmatched tag - we have no parser for it, so we're pruning it from the tree */ NSLog(@"[%@] WARN: ended non-parsed tag () - this will NOT be added to the output tree", [self class], name ); } else { - SVGKParserStackItem* parentStackItem = [_elementStack lastObject]; - - NSObject* parserHandlingTheParentItem = parentStackItem.parserForThisItem; - - BOOL closingRootTag = FALSE; - if( parentStackItem.item == nil ) - { - /** - Special case: we've hit the closing of the root tag. - - Because each parser-extension MIGHT need to do cleanup / post-processing on the end tag, - we need to ensure that whichever class parsed the root tag gets one final callback to tell it that the end - tag has been reached - */ - - closingRootTag = TRUE; - parserHandlingTheParentItem = stackItem.parserForThisItem; - } + NSObject* parser = (NSObject*)lastobject; + NSObject* parentParser = [_stackOfParserExtensions lastObject]; - NSLog(@"[%@] DEBUG-PARSER: ended tag (): telling parser (%@) to add that item to tree-parent = %@", [self class], name, parserHandlingTheParentItem, parentStackItem.item ); - [parserHandlingTheParentItem addChildObject:stackItem.item toObject:parentStackItem.item parseResult:self.currentParseRun parentStackItem:parentStackItem]; + + NSLog(@"[%@] DEBUG-PARSER: ended tag (), handled by parser (%@) with parent parsed by %@", [self class], name, parser, parentParser ); - if ( [stackItem.parserForThisItem createdItemShouldStoreContent:stackItem.item]) { - [stackItem.parserForThisItem parseContent:_storedChars forItem:stackItem.item]; + /** + At this point, the "parent of current node" is still set to the node we're + closing - because we haven't finished closing it yet + */ + if ( [parser createdNodeShouldStoreContent:_parentOfCurrentNode]) { + [parser handleStringContent:_storedChars forNode:_parentOfCurrentNode]; [_storedChars setString:@""]; _storingChars = NO; } - - if( closingRootTag ) - { - currentParseRun.parsedDocument.rootElement = (SVGSVGElement*) stackItem.item; - } } + + /** Update the _parentOfCurrentNod to point to the parent of the node we just closed... + */ + _parentOfCurrentNode = _parentOfCurrentNode.parentNode; + } static void endElementSAX (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI) { diff --git a/Core/SVGKParserStackItem.h b/Core/SVGKParserStackItem.h deleted file mode 100644 index 679dbe8d1..000000000 --- a/Core/SVGKParserStackItem.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@protocol SVGKParserExtension; -#import "SVGKParserExtension.h" - -#import "Node.h" - -@interface SVGKParserStackItem : NSObject -@property(nonatomic,retain) NSObject* parserForThisItem; -@property(nonatomic,retain) Node* item; -@end diff --git a/Core/SVGKParserStackItem.m b/Core/SVGKParserStackItem.m deleted file mode 100644 index 535ccf835..000000000 --- a/Core/SVGKParserStackItem.m +++ /dev/null @@ -1,14 +0,0 @@ -#import "SVGKParserStackItem.h" - -@implementation SVGKParserStackItem -@synthesize item; -@synthesize parserForThisItem; - -- (void) dealloc -{ - self.item = nil; - self.parserForThisItem = nil; - [super dealloc]; -} - -@end diff --git a/Core/SVGKSource.m b/Core/SVGKSource.m index 961154af0..28f9381ec 100644 --- a/Core/SVGKSource.m +++ b/Core/SVGKSource.m @@ -54,7 +54,7 @@ -(id) newHandle:(NSError**) error if( error != nil ) { - NSLog( @"[%@] ERROR: failed to parse SVG from URL, because failed to download file at URL = %@, error = %@", [self class], self.URL, error ); + NSLog( @"[%@] ERROR: failed to parse SVG from URL, because failed to download file at URL = %@, error = %@", [self class], self.URL, *error ); return nil; } diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index ecdec99a5..efe16da4a 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -18,14 +18,12 @@ 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; - 6643AE2815B8503500E5F2AB /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */; }; 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E815697534000F3A27 /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141EE15697534000F3A27 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -182,7 +180,6 @@ 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; - 667A2C5715B9DFF000F4464E /* SVGKParserStackItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; }; 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; }; 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -198,9 +195,6 @@ 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; - 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD515475254002F99FF /* SKBasicDataTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SKBasicDataTypes.m */; }; - 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD615475254002F99FF /* SKBasicDataTypes.m */; }; 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGKSource.m */; }; 66B79B2015475254002F99FF /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGKSource.m */; }; @@ -217,8 +211,10 @@ 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; - 66CBCA4E15AF27B000C36B57 /* SVGKParserStackItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */; }; - 66CBCA4F15AF27B000C36B57 /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */; }; + 66BB059615F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; }; + 66BB059715F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; }; + 66BB059815F40A870005D834 /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BB059515F40A860005D834 /* SVGLength.m */; }; + 66BB059915F40A870005D834 /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BB059515F40A860005D834 /* SVGLength.m */; }; 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; }; 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; }; @@ -347,8 +343,6 @@ 6694713A157421B800EA533D /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; 66B79AD315475254002F99FF /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; 66B79AD415475254002F99FF /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 66B79AD515475254002F99FF /* SKBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBasicDataTypes.h; sourceTree = ""; }; - 66B79AD615475254002F99FF /* SKBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBasicDataTypes.m; sourceTree = ""; }; 66B79ADD15475254002F99FF /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; 66B79ADE15475254002F99FF /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; 66B79AE515475254002F99FF /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; @@ -360,8 +354,8 @@ 66B79AF615475254002F99FF /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserStackItem.h; sourceTree = ""; }; - 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserStackItem.m; sourceTree = ""; }; + 66BB059415F40A860005D834 /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; + 66BB059515F40A860005D834 /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; 66CBCA5115B0536D00C36B57 /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; 66CBCA5215B056D000C36B57 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; 66CBCA5815B057AD00C36B57 /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; @@ -623,6 +617,8 @@ 66CBCA7D15B3641600C36B57 /* SVGAngle.h */, 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */, 66CBCA5215B056D000C36B57 /* SVGRect.h */, + 66BB059415F40A860005D834 /* SVGLength.h */, + 66BB059515F40A860005D834 /* SVGLength.m */, 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */, 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */, 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */, @@ -657,8 +653,6 @@ 6661429D156C2E69000F3A27 /* Parsing */, 66B79AD315475254002F99FF /* CGPathAdditions.h */, 66B79AD415475254002F99FF /* CGPathAdditions.m */, - 66B79AD515475254002F99FF /* SKBasicDataTypes.h */, - 66B79AD615475254002F99FF /* SKBasicDataTypes.m */, 66B79ADD15475254002F99FF /* SVGKSource.h */, 66B79ADE15475254002F99FF /* SVGKSource.m */, 66B79AE515475254002F99FF /* SVGKImage.h */, @@ -666,8 +660,6 @@ 66B79AEB15475254002F99FF /* SVGKit.h */, 66B79AEE15475254002F99FF /* SVGKParser.h */, 66B79AEF15475254002F99FF /* SVGKParser.m */, - 66CBCA4C15AF27AF00C36B57 /* SVGKParserStackItem.h */, - 66CBCA4D15AF27B000C36B57 /* SVGKParserStackItem.m */, 66B79AF515475254002F99FF /* SVGKPattern.h */, 66B79AF615475254002F99FF /* SVGKPattern.m */, 66B79B0715475254002F99FF /* SVGUtils.h */, @@ -695,7 +687,6 @@ buildActionMask = 2147483647; files = ( 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */, - 666141D815697534000F3A27 /* SKBasicDataTypes.h in Headers */, 666141E015697534000F3A27 /* SVGKSource.h in Headers */, 666141E815697534000F3A27 /* SVGKImage.h in Headers */, 666141EE15697534000F3A27 /* SVGKit.h in Headers */, @@ -726,7 +717,6 @@ 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */, 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */, 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */, - 667A2C5715B9DFF000F4464E /* SVGKParserStackItem.h in Headers */, 666142FD156C2F14000F3A27 /* Document.h in Headers */, 66614303156C3A0B000F3A27 /* Node.h in Headers */, 66614309156C3B95000F3A27 /* NodeList.h in Headers */, @@ -756,6 +746,7 @@ 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */, 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */, + 66BB059715F40A870005D834 /* SVGLength.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -766,7 +757,6 @@ 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */, 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */, 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */, - 66B79B0D15475254002F99FF /* SKBasicDataTypes.h in Headers */, 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */, 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */, 66B79B3915475254002F99FF /* SVGKit.h in Headers */, @@ -814,7 +804,6 @@ 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */, 6694713B157421B800EA533D /* SVGDocument.h in Headers */, 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, - 66CBCA4E15AF27B000C36B57 /* SVGKParserStackItem.h in Headers */, 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */, 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */, 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */, @@ -825,6 +814,7 @@ 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */, 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */, + 66BB059615F40A870005D834 /* SVGLength.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -934,7 +924,6 @@ 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */, 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */, - 66B79B1015475254002F99FF /* SKBasicDataTypes.m in Sources */, 66B79B2015475254002F99FF /* SVGKSource.m in Sources */, 66B79B3015475254002F99FF /* SVGKImage.m in Sources */, 66B79B4215475254002F99FF /* SVGKParser.m in Sources */, @@ -981,7 +970,7 @@ 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */, 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */, 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */, - 6643AE2815B8503500E5F2AB /* SVGKParserStackItem.m in Sources */, + 66BB059915F40A870005D834 /* SVGLength.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -992,7 +981,6 @@ 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */, 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */, - 66B79B0F15475254002F99FF /* SKBasicDataTypes.m in Sources */, 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */, 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */, 66B79B4115475254002F99FF /* SVGKParser.m in Sources */, @@ -1036,12 +1024,12 @@ 6661435F156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */, 6694713D157421B800EA533D /* SVGDocument.m in Sources */, 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, - 66CBCA4F15AF27B000C36B57 /* SVGKParserStackItem.m in Sources */, 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */, 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */, 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */, 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */, 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */, + 66BB059815F40A870005D834 /* SVGLength.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From dc91ae7abed61581fd478001816b110659b0e116 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 2 Sep 2012 23:25:57 +0100 Subject: [PATCH 068/110] Added warning comment --- Core/SVGKImage.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 09cf82acb..9ea02aeeb 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -291,6 +291,11 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element preTr return layer; } + /** + TODO / FIXME: at this point, we should also detect if anything in the current SVGElement ("element") has + changed the viewBox - if it has, we should modify the "preTransform" before applying it to sub-nodes / child + nodes + */ for (SVGElement *child in element.childNodes ) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { From 7989dfa24c1497947066ab5f04ff42a5f1fb62b0 Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 3 Sep 2012 03:21:55 +0100 Subject: [PATCH 069/110] FINISHED: Document.getTagsByName - both the plain and the namespace version - now work correctly --- Core/DOM classes/Core DOM/Document.h | 2 +- Core/DOM classes/Core DOM/Document.m | 85 +++++++++----- Core/DOM classes/Core DOM/Node.m | 2 + Core/DOM classes/SVGElement.h | 12 +- Core/DOM classes/SVGElement.m | 78 ++++--------- Core/SVGKParser.m | 18 ++- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 104 +++++++++--------- 7 files changed, 156 insertions(+), 145 deletions(-) diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index 2b8788e29..dcd433a74 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -102,7 +102,7 @@ -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName; // Introduced in DOM Level 2: --(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI qualifiedName:(NSString*) localName; +-(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName; // Introduced in DOM Level 2: -(Element*) getElementById:(NSString*) elementId; diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index 4ceecdd89..1266a8a74 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -4,8 +4,8 @@ #import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt specify how lists are made mutable @interface Document() -/*! private method used in implementation of the getElementsByTagName method */ --(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; +/*! private method used in implementation of the MULTIPLE getElementsByTagName methods */ +-(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; @end @implementation Document @@ -17,7 +17,7 @@ @implementation Document -(Element*) createElement:(NSString*) tagName { - Element* newElement = [[Element alloc] initElement:tagName]; + Element* newElement = [[Element alloc] initWithLocalName:tagName attributes:nil]; NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); @@ -63,30 +63,11 @@ -(EntityReference*) createEntityReference:(NSString*) data -(NodeList*) getElementsByTagName:(NSString*) data { NodeList* accumulator = [[NodeList alloc] init]; - [self privateGetElementsByTagName:data childrenOfElement:self.documentElement addToList:accumulator]; + [self privateGetElementsByName:data inNamespace:nil childrenOfElement:self.documentElement addToList:accumulator]; return accumulator; } --(void) privateGetElementsByTagName:(NSString*) tagName childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator -{ - /** According to spec, this is only valid for ELEMENT nodes */ - if( [parent isKindOfClass:[Element class]] ) - { - /** According to spec, "tag name" for an Element is the value of its .nodeName property; that means SOMETIMES its a qualified name! */ - if( [tagName isEqualToString:@"*"] - || [parent.nodeName isEqualToString:tagName] ) - { - [accumulator.internalArray addObject:parent]; - } - } - - for( Node* childNode in parent.childNodes ) - { - [self privateGetElementsByTagName:tagName childrenOfElement:childNode addToList:accumulator]; - } -} - // Introduced in DOM Level 2: -(Node*) importNode:(Node*) importedNode deep:(BOOL) deep { @@ -97,7 +78,7 @@ -(Node*) importNode:(Node*) importedNode deep:(BOOL) deep // Introduced in DOM Level 2: -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName { - Element* newElement = [[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:[NSURL URLWithString:namespaceURI] attributes:nil]; + Element* newElement = [[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:namespaceURI attributes:nil]; NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); @@ -113,10 +94,12 @@ -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qu } // Introduced in DOM Level 2: --(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI qualifiedName:(NSString*) localName +-(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName { - NSAssert( FALSE, @"Not implemented. According to spec: Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree." ); - return nil; + NodeList* accumulator = [[NodeList alloc] init]; + [self privateGetElementsByName:localName inNamespace:namespaceURI childrenOfElement:self.documentElement addToList:accumulator]; + + return accumulator; } // Introduced in DOM Level 2: @@ -129,4 +112,52 @@ -(Element*) getElementById:(NSString*) elementId return nil; } +#pragma mark - Non-Spec methods required to implement the Spec methods + +/*! This useful method provides both the DOM level 1 and the DOM level 2 implementations of searching the tree for a node - because THEY ARE DIFFERENT + yet very similar + */ +-(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator +{ + /** According to spec, this is only valid for ELEMENT nodes */ + if( [parent isKindOfClass:[Element class]] ) + { + if( namespaceURI != nil && ! [parent.namespaceURI isEqualToString:namespaceURI] ) + { + // skip + } + else + { + Element* parentAsElement = (Element*) parent; + + /** According to spec, "tag name" for an Element is the value of its .nodeName property; that means SOMETIMES its a qualified name! */ + BOOL includeThisNode = FALSE; + + + if( [name isEqualToString:@"*"] ) + includeThisNode = TRUE; + + if( !includeThisNode ) + if( namespaceURI == nil ) // No namespace? then do a qualified compare + { + includeThisNode = [parentAsElement.tagName isEqualToString:name]; + } + else // namespace? then do an UNqualified compare + { + includeThisNode = [parentAsElement.localName isEqualToString:name]; + } + + if( includeThisNode ) + { + [accumulator.internalArray addObject:parent]; + } + } + } + + for( Node* childNode in parent.childNodes ) + { + [self privateGetElementsByName:name inNamespace:namespaceURI childrenOfElement:childNode addToList:accumulator]; + } +} + @end diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index a13967acd..5b079253a 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -127,6 +127,8 @@ - (id)initElement:(NSString*) n inNameSpaceURI:(NSString*) nsURI { self.localName = [nameSpaceParts lastObject]; if( [nameSpaceParts count] > 1 ) self.prefix = [nameSpaceParts objectAtIndex:0]; + + self.namespaceURI = nsURI; } return self; } diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index 3f0e36696..8951f79a8 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -21,7 +21,14 @@ @property (nonatomic, readwrite, retain) NSString *identifier; // 'id' is reserved in Obj-C, so we have to break SVG Spec here, slightly @property (nonatomic, retain) NSString* xmlbase; -@property (nonatomic, retain) SVGSVGElement* ownerSVGElement; +/*! + + http://www.w3.org/TR/SVG/intro.html#TermSVGDocumentFragment + + SVG document fragment + The XML document sub-tree which starts with an ‘svg’ element. An SVG document fragment can consist of a stand-alone SVG document, or a fragment of a parent XML document enclosed by an ‘svg’ element. When an ‘svg’ element is a descendant of another ‘svg’ element, there are two SVG document fragments, one for each ‘svg’ element. (One SVG document fragment is contained within another SVG document fragment.) + */ +@property (nonatomic, retain) SVGSVGElement* rootOfCurrentDocumentFragment; /*! The viewport is set / re-set whenever an SVG node specifies a "width" (and optionally: a "height") attribute, assuming that SVG node is one of: svg, symbol, image, foreignobject @@ -47,10 +54,11 @@ - (void)parseContent:(NSString *)content; -#pragma mark - Objective-C init methods (not in SVG Spec - the official spec has no explicit way to create nodes, which is clearly a bug in the Spec. Until they fix the spec, we have to do something or else SVG would be unusable) +#pragma mark - SVG-spec supporting methods that aren't in the Spec itself - (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attributes; - (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes; +-(void) reCalculateAndSetViewportElementReferenceUsingFirstSVGAncestor:(SVGElement*) firstAncestor; @end \ No newline at end of file diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index ef1e002f1..2e8b95736 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -29,7 +29,7 @@ @implementation SVGElement @synthesize identifier = _identifier; @synthesize xmlbase; -@synthesize ownerSVGElement; +@synthesize rootOfCurrentDocumentFragment; @synthesize viewportElement; @synthesize stringValue = _stringValue; @@ -43,13 +43,16 @@ + (BOOL)shouldStoreContent { } /*! As per the SVG Spec, the local reference to "viewportElement" depends on the values of the - attributes of the node - does it have a "width" attribute? */ --(void) reCalculateAndSetViewportElementReference + attributes of the node - does it have a "width" attribute? + + NB: by definition, tags MAY NOT have a width, but they are still viewports */ +-(void) reCalculateAndSetViewportElementReferenceUsingFirstSVGAncestor:(SVGElement*) firstAncestor { - if( [self.attributes getNamedItem:@"width"] != nil ) + if( [self.tagName isEqualToString:@"svg"] // if its the tag, its automatically the viewportElement + || [self.attributes getNamedItem:@"width"] != nil ) self.viewportElement = self; else - self.viewportElement = ((SVGElement*) self.parentNode).viewportElement; + self.viewportElement = firstAncestor.viewportElement; } /*! Override so that we can automatically set / unset the ownerSVGElement and viewportElement properties, @@ -62,7 +65,7 @@ -(void)setParentNode:(Node *)newParent if( [self isKindOfClass:[SVGSVGElement class]] && (self.parentNode == nil || ! [self.parentNode isKindOfClass:[SVGElement class]]) ) { - self.ownerSVGElement = nil; + self.rootOfCurrentDocumentFragment = nil; self.viewportElement = nil; } else @@ -78,73 +81,32 @@ But if there are custom nodes in there (any other DOM node, for instance), it ge */ if( [self isKindOfClass:[SVGSVGElement class]] ) - self.ownerSVGElement = (SVGSVGElement*) self; + { + self.rootOfCurrentDocumentFragment = (SVGSVGElement*) self; + self.viewportElement = self; + } else { - SVGElement* firstAncestorThatIsSVG = nil; Node* currentAncestor = newParent; - - // current ancestor (conquest:bonus node) has nil ancestor because this is being called before its been added to its parent! - while( firstAncestorThatIsSVG == nil + SVGElement* firstAncestorThatIsAnyKindOfSVGElement = nil; + while( firstAncestorThatIsAnyKindOfSVGElement == nil && currentAncestor != nil ) // if we run out of tree! This would be an error (see below) { if( [currentAncestor isKindOfClass:[SVGElement class]] ) - firstAncestorThatIsSVG = (SVGElement*) currentAncestor; + firstAncestorThatIsAnyKindOfSVGElement = (SVGElement*) currentAncestor; else currentAncestor = currentAncestor.parentNode; } - NSAssert( firstAncestorThatIsSVG != nil, @"This node has no valid SVG tags as ancestor, but it's not an tag, so this is an impossible SVG file" ); + NSAssert( firstAncestorThatIsAnyKindOfSVGElement != nil, @"This node has no valid SVG tags as ancestor, but it's not an tag, so this is an impossible SVG file" ); - self.ownerSVGElement = firstAncestorThatIsSVG.ownerSVGElement; + self.rootOfCurrentDocumentFragment = firstAncestorThatIsAnyKindOfSVGElement.rootOfCurrentDocumentFragment; + [self reCalculateAndSetViewportElementReferenceUsingFirstSVGAncestor:firstAncestorThatIsAnyKindOfSVGElement]; } - - [self reCalculateAndSetViewportElementReference]; } } -/*! Override so that we can automatically set / unset the viewportElement property, - as required by SVG Spec */ --(void)setAttributes:(NamedNodeMap *)attributes -{ - [super setAttributes:attributes]; - - [self reCalculateAndSetViewportElementReference]; -} - -/*! Override so that we can automatically set / unset the viewportElement property, - as required by SVG Spec */ - --(void) setAttribute:(NSString*) name value:(NSString*) value -{ - [super setAttribute:name value:value]; - - [self reCalculateAndSetViewportElementReference]; -} --(void) removeAttribute:(NSString*) name -{ - [super removeAttribute:name]; - - [self reCalculateAndSetViewportElementReference]; -} --(Attr*) setAttributeNode:(Attr*) newAttr -{ - Attr* a = [super setAttributeNode:newAttr]; - - [self reCalculateAndSetViewportElementReference]; - - return a; -} --(Attr*) removeAttributeNode:(Attr*) oldAttr -{ - Attr* a = [super removeAttributeNode:oldAttr]; - - [self reCalculateAndSetViewportElementReference]; - - return a; -} - - (void)dealloc { [_stringValue release]; [_identifier release]; @@ -316,7 +278,7 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { */ -(CGAffineTransform) transformAbsolute { - if( self.viewportElement == nil ) + if( self.viewportElement == nil ) // this is the outermost, root tag return self.transformRelative; else { diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index b18de8422..dd9596d7a 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -198,8 +198,6 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa /** Parser Extenstion creates a node for us */ Node* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentNode:_parentOfCurrentNode]; - _parentOfCurrentNode = subParserResult; - NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); /** Add the new (partially parsed) node to the parent node in tree @@ -207,7 +205,9 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa (need this for some of the parsing, later on, where we need to be able to read up the tree to make decisions about the data - this is REQUIRED by the SVG Spec) */ - [subParserResult appendChild:subParserResult]; // this is a DOM method: should NOT have side-effects + [_parentOfCurrentNode appendChild:subParserResult]; // this is a DOM method: should NOT have side-effects + _parentOfCurrentNode = subParserResult; + if ([subParser createdNodeShouldStoreContent:subParserResult]) { [_storedChars setString:@""]; @@ -228,7 +228,15 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa } /*! this was an unmatched tag - we have no parser for it, so we're pruning it from the tree */ - NSLog(@"[%@] WARN: found a non-parsed tag () - this will NOT be added to the output tree", [self class], name ); + NSLog(@"[%@] WARN: found an unrecognized tag () - this will get an empty, dumb Node in the DOM", [self class], name ); + + NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; + /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ + Element *blankElement = [[[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributes] autorelease]; + [_parentOfCurrentNode appendChild:blankElement]; + _parentOfCurrentNode = blankElement; + + [_stackOfParserExtensions addObject:[NSNull null]]; // so that we can later detect that this tag was NOT parsed } @@ -334,7 +342,7 @@ - (void)handleEndElement:(NSString *)name { } } - /** Update the _parentOfCurrentNod to point to the parent of the node we just closed... + /** Update the _parentOfCurrentNode to point to the parent of the node we just closed... */ _parentOfCurrentNode = _parentOfCurrentNode.parentNode; diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index efe16da4a..ec71cecd9 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -19,9 +19,9 @@ 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; - 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; }; + 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; }; + 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -34,161 +34,161 @@ 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142121569756C000F3A27 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; }; + 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; - 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; }; + 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; - 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; }; + 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; - 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; }; + 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142B3156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; 666142B4156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; - 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; }; + 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142B7156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; 666142B8156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; - 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; }; + 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142BB156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; 666142BC156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; - 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; }; + 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142BF156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; 666142C0156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; - 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; }; + 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142C3156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; 666142C4156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; - 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; }; + 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142C7156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; 666142C8156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; - 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; }; + 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142CB156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; 666142CC156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; - 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; }; + 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142CF156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; 666142D0156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; - 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; }; + 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142D3156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; 666142D4156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; - 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; }; + 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142D7156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; 666142D8156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; - 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; }; + 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; - 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; }; + 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; - 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; }; + 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; - 666142E5156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; }; + 666142E5156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142E6156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142E7156C2E6A000F3A27 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */; }; 666142E8156C2E6A000F3A27 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */; }; - 666142E9156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; }; + 666142E9156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142EB156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; }; + 666142EB156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142ED156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */; }; 666142EE156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */; }; - 666142EF156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; }; + 666142EF156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142F1156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */; }; 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */; }; - 666142FC156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; }; + 666142FC156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142FD156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666142FE156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; 666142FF156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; - 66614302156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; }; + 66614302156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614303156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614304156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; 66614305156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; - 66614308156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; }; + 66614308156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614309156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661430A156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; 6661430B156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; - 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; }; + 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614310156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; 66614311156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; - 66614314156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; }; + 66614314156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614315156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614316156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; 66614317156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; - 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; }; + 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661431C156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; 6661431D156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; - 66614320156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; }; + 66614320156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614321156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614322156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; 66614323156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; - 66614326156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; }; + 66614326156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614327156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614328156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; 66614329156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; - 6661432C156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; }; + 6661432C156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661432D156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661432E156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; 6661432F156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; - 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; }; + 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614334156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; 66614335156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; - 66614338156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; }; + 66614338156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614339156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661433A156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; 6661433B156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; - 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; }; + 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614340156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; 66614341156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; - 66614344156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; }; + 66614344156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614345156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614346156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; 66614347156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; - 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; }; + 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614351156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; }; + 66614351156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614352156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614353156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; 66614354156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; - 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; }; + 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; }; + 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661435E156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6661435F156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */; }; 66614360156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */; }; - 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; }; + 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; - 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; }; - 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; }; + 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; 6684CD4B1566D07400A46247 /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6684CD4D1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; 6684CD4E1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; - 6694713B157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; }; + 6694713B157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6694713C157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6694713D157421B800EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694713A157421B800EA533D /* SVGDocument.m */; }; 6694713E157421B800EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694713A157421B800EA533D /* SVGDocument.m */; }; @@ -211,29 +211,29 @@ 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; - 66BB059615F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; }; - 66BB059715F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; }; + 66BB059615F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66BB059715F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66BB059815F40A870005D834 /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BB059515F40A860005D834 /* SVGLength.m */; }; 66BB059915F40A870005D834 /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BB059515F40A860005D834 /* SVGLength.m */; }; - 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; }; + 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; }; + 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; - 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; }; + 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; }; + 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; - 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; }; + 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; }; + 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; - 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; }; + 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; From d3de32074fbe0b6fcd0ee95a4162e820c09a2032 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 22 Sep 2012 21:28:38 +0100 Subject: [PATCH 070/110] BROKEN - renders nothing, ever NB: has major fixes for the DOM parsing code --- Core/DOM classes/Core DOM/Attr.h | 5 +- Core/DOM classes/Core DOM/Attr.m | 24 +- Core/DOM classes/Core DOM/CDATASection.h | 2 + Core/DOM classes/Core DOM/CDATASection.m | 7 + Core/DOM classes/Core DOM/Comment.h | 2 + Core/DOM classes/Core DOM/Comment.m | 8 + Core/DOM classes/Core DOM/Document.m | 16 +- Core/DOM classes/Core DOM/DocumentFragment.m | 8 + Core/DOM classes/Core DOM/Element.m | 10 +- Core/DOM classes/Core DOM/Node.h | 23 +- Core/DOM classes/Core DOM/Node.m | 196 +++-- .../Core DOM/ProcessingInstruction.h | 2 + .../Core DOM/ProcessingInstruction.m | 10 + Core/DOM classes/Core DOM/Text.h | 2 + Core/DOM classes/Core DOM/Text.m | 8 + Core/DOM classes/SVG-DOM/SVGDocument.h | 4 + Core/DOM classes/SVG-DOM/SVGDocument.m | 10 + Core/DOM classes/SVGElement.h | 2 +- Core/DOM classes/SVGElement.m | 73 +- Core/DOM classes/SVGGroupElement.m | 30 +- Core/DOM classes/SVGImageElement.m | 6 +- Core/DOM classes/SVGLayeredElement.h | 7 +- Core/DOM classes/SVGSVGElement.m | 2 +- Core/DOM classes/SVGShapeElement.m | 41 +- Core/DOM classes/SVGTextElement.m | 6 +- Core/Parsing/SVGKParserSVG.m | 2 + Core/SVGKImage.m | 25 +- .../SVGPad.xcodeproj/project.pbxproj | 674 +++++++++--------- 28 files changed, 635 insertions(+), 570 deletions(-) diff --git a/Core/DOM classes/Core DOM/Attr.h b/Core/DOM classes/Core DOM/Attr.h index d748d339b..4802d7926 100644 --- a/Core/DOM classes/Core DOM/Attr.h +++ b/Core/DOM classes/Core DOM/Attr.h @@ -22,6 +22,7 @@ @interface Attr : Node +/*! NB: The official DOM spec FAILS TO SPECIFY what the value of "name" is */ @property(nonatomic,retain,readonly) NSString* name; @property(nonatomic,readonly) BOOL specified; @property(nonatomic,retain,readonly) NSString* value; @@ -31,7 +32,7 @@ #pragma mark - ObjC methods -- (id)initWithName:(NSString*) n; -- (id)initWithNamespace:(NSString*) ns qualifiedName:(NSString*) qn; +- (id)initWithName:(NSString*) n value:(NSString*) v; +- (id)initWithNamespace:(NSString*) ns qualifiedName:(NSString*) qn value:(NSString*) v; @end diff --git a/Core/DOM classes/Core DOM/Attr.m b/Core/DOM classes/Core DOM/Attr.m index 49be35fa2..f7f81a36e 100644 --- a/Core/DOM classes/Core DOM/Attr.m +++ b/Core/DOM classes/Core DOM/Attr.m @@ -28,22 +28,24 @@ @implementation Attr // Introduced in DOM Level 2: @synthesize ownerElement; -- (id)initWithName:(NSString*) n { - self = [super init]; - if (self) { - self.nodeName = self.name = n; +- (id)initWithName:(NSString*) n value:(NSString*) v +{ + self = [super initType:SKNodeType_ATTRIBUTE_NODE name:n value:v]; + if (self) + { + self.name = n; + self.value = v; } return self; } -- (id)initWithNamespace:(NSString*) ns qualifiedName:(NSString*) qn { - self = [super init]; - if (self) { - self.nodeName = qn; - self.namespaceURI = ns; +- (id)initWithNamespace:(NSString*) ns qualifiedName:(NSString*) qn value:(NSString *)v +{ + self = [super initType:SKNodeType_ATTRIBUTE_NODE name:qn value:v inNamespace:ns]; + if (self) + { self.name = qn; - - NSAssert( FALSE, @"Spec requires us to set two more properties using a process I don't understand: Node.prefix = prefix, extracted from qualifiedName, or null if there is no prefix. Node.localName = local name, extracted from qualifiedName" ); + self.value = v; } return self; } diff --git a/Core/DOM classes/Core DOM/CDATASection.h b/Core/DOM classes/Core DOM/CDATASection.h index 3aeac6952..36de5cf43 100644 --- a/Core/DOM classes/Core DOM/CDATASection.h +++ b/Core/DOM classes/Core DOM/CDATASection.h @@ -13,4 +13,6 @@ @interface CDATASection : Text +- (id)initWithValue:(NSString*) v; + @end diff --git a/Core/DOM classes/Core DOM/CDATASection.m b/Core/DOM classes/Core DOM/CDATASection.m index 2c2adc448..47b08b8aa 100644 --- a/Core/DOM classes/Core DOM/CDATASection.m +++ b/Core/DOM classes/Core DOM/CDATASection.m @@ -10,4 +10,11 @@ @implementation CDATASection +- (id)initWithValue:(NSString*) v +{ + self = [super initType:SKNodeType_CDATA_SECTION_NODE name:@"#cdata-section" value:v]; + if (self) { + } + return self; +} @end diff --git a/Core/DOM classes/Core DOM/Comment.h b/Core/DOM classes/Core DOM/Comment.h index e48c0d3db..1c8e18a14 100644 --- a/Core/DOM classes/Core DOM/Comment.h +++ b/Core/DOM classes/Core DOM/Comment.h @@ -13,4 +13,6 @@ @interface Comment : CharacterData +- (id)initWithValue:(NSString*) v; + @end diff --git a/Core/DOM classes/Core DOM/Comment.m b/Core/DOM classes/Core DOM/Comment.m index 493871056..2723281c6 100644 --- a/Core/DOM classes/Core DOM/Comment.m +++ b/Core/DOM classes/Core DOM/Comment.m @@ -10,4 +10,12 @@ @implementation Comment +- (id)initWithValue:(NSString*) v +{ + self = [super initType:SKNodeType_COMMENT_NODE name:@"#comment" value:v]; + if (self) { + } + return self; +} + @end diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index 1266a8a74..74f0cc724 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -26,22 +26,22 @@ -(Element*) createElement:(NSString*) tagName -(DocumentFragment*) createDocumentFragment { - return [[[DocumentFragment alloc] initDocumentFragment:nil] autorelease]; + return [[[DocumentFragment alloc] init] autorelease]; } -(Text*) createTextNode:(NSString*) data { - return [[[Text alloc] initText:nil value:data] autorelease]; + return [[[Text alloc] initWithValue:data] autorelease]; } -(Comment*) createComment:(NSString*) data { - return [[[Comment alloc] initComment:nil value:data] autorelease]; + return [[[Comment alloc] initWithValue:data] autorelease]; } -(CDATASection*) createCDATASection:(NSString*) data { - return [[[CDATASection alloc] initCDATASection:nil value:data] autorelease]; + return [[[CDATASection alloc] initWithValue:data] autorelease]; } -(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(NSString*) data @@ -49,9 +49,9 @@ -(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(N return [[[ProcessingInstruction alloc] initProcessingInstruction:target value:data] autorelease]; } --(Attr*) createAttribute:(NSString*) data +-(Attr*) createAttribute:(NSString*) n { - return [[[Attr alloc] initAttr:data value:nil] autorelease]; + return [[[Attr alloc] initWithName:n value:@""] autorelease]; } -(EntityReference*) createEntityReference:(NSString*) data @@ -89,7 +89,7 @@ -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) q -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName { NSAssert( FALSE, @"This should be re-implemented to share code with createElementNS: method above" ); - Attr* newAttr = [[[Attr alloc] initWithNamespace:namespaceURI qualifiedName:qualifiedName] autorelease]; + Attr* newAttr = [[[Attr alloc] initWithNamespace:namespaceURI qualifiedName:qualifiedName value:@""] autorelease]; return newAttr; } @@ -138,6 +138,7 @@ -(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namesp includeThisNode = TRUE; if( !includeThisNode ) + { if( namespaceURI == nil ) // No namespace? then do a qualified compare { includeThisNode = [parentAsElement.tagName isEqualToString:name]; @@ -146,6 +147,7 @@ -(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namesp { includeThisNode = [parentAsElement.localName isEqualToString:name]; } + } if( includeThisNode ) { diff --git a/Core/DOM classes/Core DOM/DocumentFragment.m b/Core/DOM classes/Core DOM/DocumentFragment.m index d7497ed55..4a6bbe8a1 100644 --- a/Core/DOM classes/Core DOM/DocumentFragment.m +++ b/Core/DOM classes/Core DOM/DocumentFragment.m @@ -10,4 +10,12 @@ @implementation DocumentFragment +- (id)init +{ + self = [super initType:SKNodeType_DOCUMENT_FRAGMENT_NODE name:nil]; + if (self) { + + } + return self; +} @end diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index 232a6873d..3b0c45f65 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -11,7 +11,7 @@ @implementation Element @synthesize tagName; - (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attributes { - self = [super initElement:n]; + self = [super initType:SKNodeType_ELEMENT_NODE name:n]; if (self) { self.tagName = n; @@ -29,7 +29,7 @@ - (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attribut return self; } - (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes { - self = [super initElement:n inNameSpaceURI:nsURI]; + self = [super initType:SKNodeType_ELEMENT_NODE name:n inNamespace:nsURI]; if (self) { self.tagName = n; @@ -60,7 +60,7 @@ -(NSString*) getAttribute:(NSString*) name -(void) setAttribute:(NSString*) name value:(NSString*) value { - Attr* att = [[[Attr alloc] initAttr:name value:value] autorelease]; + Attr* att = [[[Attr alloc] initWithName:name value:value] autorelease]; [self.attributes setNamedItem:att]; } @@ -111,7 +111,9 @@ -(NSString*) getAttributeNS:(NSString*) namespaceURI localName:(NSString*) local // Introduced in DOM Level 2: -(void) setAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName value:(NSString*) value { - NSAssert( FALSE, @"Not implemented yet" ); + Attr* att = [[[Attr alloc] initWithNamespace:namespaceURI qualifiedName:qualifiedName value:value] autorelease]; + + [self.attributes setNamedItemNS:att]; } // Introduced in DOM Level 2: diff --git a/Core/DOM classes/Core DOM/Node.h b/Core/DOM classes/Core DOM/Node.h index fd10162bf..227b417d6 100644 --- a/Core/DOM classes/Core DOM/Node.h +++ b/Core/DOM classes/Core DOM/Node.h @@ -136,23 +136,10 @@ typedef enum SKNodeType @property(nonatomic) BOOL hasAttributes; #pragma mark - Objective-C init methods (not in SVG Spec - you're supposed to use SVGDocument's createXXX methods instead) -/** Generic init method - used by all the other methods (designated initializer, effectively) */ -- (id)initType:(SKNodeType) nt; - -- (id)initAttr:(NSString*) n value:(NSString*) v; -- (id)initCDATASection:(NSString*) n value:(NSString*) v; -- (id)initComment:(NSString*) n value:(NSString*) v; -- (id)initDocument:(NSString*) n; -- (id)initDocumentFragment:(NSString*) n; -- (id)initDocumentType:(NSString*) n; -/*! DOM level 1 (leaves various things set to nil) */ -- (id)initElement:(NSString*) n; -/*! DOM level 2 (ALWAYS use this if possible: otherwise lots of things left at nil) */ -- (id)initElement:(NSString*) n inNameSpaceURI:(NSString*) nsURI; -- (id)initEntity:(NSString*) n; -- (id)initEntityReference:(NSString*) n; -- (id)initNotation:(NSString*) n; -- (id)initProcessingInstruction:(NSString*) n value:(NSString*) v; -- (id)initText:(NSString*) n value:(NSString*) v; +/** Designated initializers - 2 pairs (one for DOM 1, no namespace, the other for DOM 2, with namespace) of 2 methods (one for nodes that REQUIRE a value, the other for nodes that MUST NOT have a value) */ +- (id)initType:(SKNodeType) nt name:(NSString*) n; +- (id)initType:(SKNodeType) nt name:(NSString*) n value:(NSString*) v; +- (id)initType:(SKNodeType) nt name:(NSString*) n inNamespace:(NSString*) nsURI; +- (id)initType:(SKNodeType) nt name:(NSString*) n value:(NSString*) v inNamespace:(NSString*) nsURI; @end diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index 5b079253a..1eba9ad79 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -33,31 +33,43 @@ @implementation Node @synthesize localName; -- (id)initType:(SKNodeType) nt +- (id)init +{ + NSAssert( FALSE, @"This class has no init method - it MUST NOT be init'd via init - you MUST use one of the multi-argument constructors instead" ); + + return nil; +} + +- (id)initType:(SKNodeType) nt name:(NSString*) n value:(NSString*) v { self = [super init]; if (self) { self.nodeType = nt; switch( nt ) { - case SKNodeType_ELEMENT_NODE: - { - self.attributes = [[[NamedNodeMap alloc] init] autorelease]; - }break; case SKNodeType_ATTRIBUTE_NODE: - case SKNodeType_TEXT_NODE: case SKNodeType_CDATA_SECTION_NODE: - case SKNodeType_ENTITY_REFERENCE_NODE: - case SKNodeType_ENTITY_NODE: - case SKNodeType_PROCESSING_INSTRUCTION_NODE: case SKNodeType_COMMENT_NODE: + case SKNodeType_PROCESSING_INSTRUCTION_NODE: + case SKNodeType_TEXT_NODE: + { + self.nodeName = n; + self.nodeValue = v; + }break; + + case SKNodeType_DOCUMENT_NODE: case SKNodeType_DOCUMENT_TYPE_NODE: case SKNodeType_DOCUMENT_FRAGMENT_NODE: + case SKNodeType_ENTITY_REFERENCE_NODE: + case SKNodeType_ENTITY_NODE: case SKNodeType_NOTATION_NODE: + case SKNodeType_ELEMENT_NODE: { + NSAssert( FALSE, @"NodeType = %i cannot be init'd with a value; nodes of that type have no value in the DOM spec", nt); + self = nil; }break; } @@ -66,111 +78,87 @@ - (id)initType:(SKNodeType) nt return self; } -- (id)initAttr:(NSString*) n value:(NSString*) v { - self = [self initType:SKNodeType_ATTRIBUTE_NODE]; - if (self) { - self.nodeName = n; - self.nodeValue = v; - } - return self; -} -- (id)initCDATASection:(NSString*) n value:(NSString*) v { - self = [self initType:SKNodeType_CDATA_SECTION_NODE]; - if (self) { - self.nodeName = n; - self.nodeValue = v; - } - return self; -} -- (id)initComment:(NSString*) n value:(NSString*) v { - self = [self initType:SKNodeType_COMMENT_NODE]; - if (self) { - self.nodeName = n; - self.nodeValue = v; - } - return self; -} -- (id)initDocument:(NSString*) n { - self = [self initType:SKNodeType_DOCUMENT_NODE]; - if (self) { - self.nodeName = n; - } - return self; -} -- (id)initDocumentFragment:(NSString*) n { - self = [self initType:SKNodeType_DOCUMENT_FRAGMENT_NODE]; - if (self) { - self.nodeName = n; - } - return self; -} -- (id)initDocumentType:(NSString*) n { - self = [self initType:SKNodeType_DOCUMENT_TYPE_NODE]; - if (self) { - self.nodeName = n; - } - return self; -} -- (id)initElement:(NSString*) n { - self = [self initType:SKNodeType_ELEMENT_NODE]; - if (self) { - self.nodeName = n; - } - return self; -} -- (id)initElement:(NSString*) n inNameSpaceURI:(NSString*) nsURI { - self = [self initType:SKNodeType_ELEMENT_NODE]; +- (id)initType:(SKNodeType) nt name:(NSString*) n +{ + self = [super init]; if (self) { - self.nodeName = n; - - NSArray* nameSpaceParts = [n componentsSeparatedByString:@":"]; - self.localName = [nameSpaceParts lastObject]; - if( [nameSpaceParts count] > 1 ) - self.prefix = [nameSpaceParts objectAtIndex:0]; + self.nodeType = nt; + switch( nt ) + { + + case SKNodeType_ATTRIBUTE_NODE: + case SKNodeType_CDATA_SECTION_NODE: + case SKNodeType_COMMENT_NODE: + case SKNodeType_PROCESSING_INSTRUCTION_NODE: + case SKNodeType_TEXT_NODE: + { + NSAssert( FALSE, @"NodeType = %i cannot be init'd without a value; nodes of that type MUST have a value in the DOM spec", nt); + + self = nil; + }break; + + + case SKNodeType_DOCUMENT_NODE: + case SKNodeType_DOCUMENT_TYPE_NODE: + case SKNodeType_DOCUMENT_FRAGMENT_NODE: + case SKNodeType_ENTITY_REFERENCE_NODE: + case SKNodeType_ENTITY_NODE: + case SKNodeType_NOTATION_NODE: + { + self.nodeName = n; + }break; + + case SKNodeType_ELEMENT_NODE: + { + + self.nodeName = n; + + self.attributes = [[[NamedNodeMap alloc] init] autorelease]; + }break; + } - self.namespaceURI = nsURI; + self.childNodes = [[[NodeList alloc] init] autorelease]; } return self; } -- (id)initEntity:(NSString*) n { - self = [self initType:SKNodeType_ENTITY_NODE]; - if (self) { - self.nodeName = n; - } - return self; -} -- (id)initEntityReference:(NSString*) n { - self = [self initType:SKNodeType_ENTITY_REFERENCE_NODE]; - if (self) { - self.nodeName = n; - } - return self; -} -- (id)initNotation:(NSString*) n { - self = [self initType:SKNodeType_NOTATION_NODE]; - if (self) { - self.nodeName = n; - } - return self; + +#pragma mark - Objective-C init methods DOM LEVEL 2 (preferred init - safer/better!) +-(void) postInitNamespaceHandling:(NSString*) nsURI +{ + NSArray* nameSpaceParts = [self.nodeName componentsSeparatedByString:@":"]; + self.localName = [nameSpaceParts lastObject]; + if( [nameSpaceParts count] > 1 ) + self.prefix = [nameSpaceParts objectAtIndex:0]; + + self.namespaceURI = nsURI; } -- (id)initProcessingInstruction:(NSString*) n value:(NSString*) v { - self = [self initType:SKNodeType_PROCESSING_INSTRUCTION_NODE]; - if (self) { - self.nodeName = n; - self.nodeValue = v; - } - return self; + +- (id)initType:(SKNodeType) nt name:(NSString*) n inNamespace:(NSString*) nsURI +{ + self = [self initType:nt name:n]; + + if( self ) + { + [self postInitNamespaceHandling:nsURI]; + } + + return self; } -- (id)initText:(NSString*) n value:(NSString*) v { - self = [self initType:SKNodeType_TEXT_NODE]; - if (self) { - self.nodeName = n; - self.nodeValue = v; - } - return self; + +- (id)initType:(SKNodeType) nt name:(NSString*) n value:(NSString*) v inNamespace:(NSString*) nsURI +{ + self = [self initType:nt name:n value:v]; + + if( self ) + { + [self postInitNamespaceHandling:nsURI]; + } + + return self; } +#pragma mark - Official DOM method implementations -(Node*) insertBefore:(Node*) newChild refChild:(Node*) refChild { diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.h b/Core/DOM classes/Core DOM/ProcessingInstruction.h index 591d6f21e..74fbea8d5 100644 --- a/Core/DOM classes/Core DOM/ProcessingInstruction.h +++ b/Core/DOM classes/Core DOM/ProcessingInstruction.h @@ -20,4 +20,6 @@ @property(nonatomic,retain,readonly) NSString* target; @property(nonatomic,retain,readonly) NSString* data; +-(id) initProcessingInstruction:(NSString*) target value:(NSString*) data; + @end diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.m b/Core/DOM classes/Core DOM/ProcessingInstruction.m index 027b90c3d..b234548e7 100644 --- a/Core/DOM classes/Core DOM/ProcessingInstruction.m +++ b/Core/DOM classes/Core DOM/ProcessingInstruction.m @@ -18,4 +18,14 @@ @implementation ProcessingInstruction @synthesize target; @synthesize data; +-(id) initProcessingInstruction:(NSString*) t value:(NSString*) d +{ + self = [super initType:SKNodeType_PROCESSING_INSTRUCTION_NODE name:t value:d]; + if (self) { + self.target = t; + self.data = d; + } + return self; +} + @end diff --git a/Core/DOM classes/Core DOM/Text.h b/Core/DOM classes/Core DOM/Text.h index e62783595..00e7b00c7 100644 --- a/Core/DOM classes/Core DOM/Text.h +++ b/Core/DOM classes/Core DOM/Text.h @@ -16,6 +16,8 @@ @interface Text : CharacterData +- (id)initWithValue:(NSString*) v; + -(Text*) splitText:(unsigned long) offset; @end diff --git a/Core/DOM classes/Core DOM/Text.m b/Core/DOM classes/Core DOM/Text.m index 08859c9e0..b6fe00f6d 100644 --- a/Core/DOM classes/Core DOM/Text.m +++ b/Core/DOM classes/Core DOM/Text.m @@ -10,6 +10,14 @@ @implementation Text +- (id)initWithValue:(NSString*) v +{ + self = [super initType:SKNodeType_TEXT_NODE name:@"#text" value:v]; + if (self) { + + } + return self; +} -(Text*) splitText:(unsigned long) offset; { NSAssert( FALSE, @"Not implemented yet" ); diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.h b/Core/DOM classes/SVG-DOM/SVGDocument.h index 32300c48c..cc4ad1eaf 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.h +++ b/Core/DOM classes/SVG-DOM/SVGDocument.h @@ -26,4 +26,8 @@ @property (nonatomic, retain, readonly) NSString* URL; @property (nonatomic, retain, readonly) SVGSVGElement* rootElement; +#pragma mark - Objective-C init methods (not part of DOM spec, but necessary!) + +- (id)init; + @end diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Core/DOM classes/SVG-DOM/SVGDocument.m index 78aaf455a..161602983 100644 --- a/Core/DOM classes/SVG-DOM/SVGDocument.m +++ b/Core/DOM classes/SVG-DOM/SVGDocument.m @@ -20,6 +20,16 @@ @implementation SVGDocument @synthesize URL; @synthesize rootElement=_rootElement; + +- (id)init +{ + self = [super initType:SKNodeType_DOCUMENT_NODE name:@"#document"]; + if (self) { + + } + return self; +} + -(void)setRootElement:(SVGSVGElement *)rootElement { [_rootElement release]; diff --git a/Core/DOM classes/SVGElement.h b/Core/DOM classes/SVGElement.h index 8951f79a8..959f899fb 100644 --- a/Core/DOM classes/SVGElement.h +++ b/Core/DOM classes/SVGElement.h @@ -1,7 +1,7 @@ /** SVGElement - http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + http://www.w3.org/TR/SVG/types.html#InterfaceSVGElement NB: "id" is illegal in Objective-C language, so we use "identifier" instead diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 2e8b95736..f0d4a99a4 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -269,35 +269,64 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { } -/*! implemented making heavy use of the self.viewportElement to optimize performance - I believe this is what the - SVG Spec authors intended - - FIXME: this method could be removed by cut/pasting the code below directly into SVGKImage and its CALayer generation - code. Previously, this method recursed through the whole tree, but now that it's using the self.viewportElement property - it's a bit simpler. +/*! ADAM: SVG Official spec is EXTREMELY BADLY WRITTEN for this aspect (transforms + viewports + viewboxes) - almost all the documentation + is "missing" and what's there is mumbo-jumbo appallingly bad English. I've had to do lots of "intelligent guessing" and "trial and error" + to work out what the heck the authors were TRYING to say, but failing badly at actually saying. */ -(CGAffineTransform) transformAbsolute { - if( self.viewportElement == nil ) // this is the outermost, root tag - return self.transformRelative; + /** + + Each time you hit a viewPortElement in the DOM Tree, you + have to insert an ADDITIONAL transform into the flow of: + + parent-transform -> child-transform + + has to become: + + parent-transform -> VIEWPORT-TRANSFORM -> child-transform + */ + + CGAffineTransform parentAbsoluteTransform; + CGAffineTransform selfRelativeTransform; + CGAffineTransform optionalViewportTransform; + + NSAssert( self.parentNode == nil || [self.parentNode isKindOfClass:[SVGElement class]], @"I don't know what to do when parent node is NOT an SVG element of some kind; presumably, this is when SVG root node gets embedded inside something else? The Spec IS VERY BADLY WRITTEN and doesn't clearly define ANYTHING here, and provides very few examples" ); + + /** PARENT absolute */ + SVGElement* parentSVGElement = (SVGElement*) self.parentNode; + if( self.parentNode == nil) + parentAbsoluteTransform = CGAffineTransformIdentity; + else + parentAbsoluteTransform = [parentSVGElement transformAbsolute]; + + /** SELF relative */ + selfRelativeTransform = self.transformRelative; + + /** VIEWPORT relative */ + if( self.viewportElement != self ) + optionalViewportTransform = CGAffineTransformIdentity; else { - /** - If this node altered the viewport, then the "inherited" info is whatever its parent had. - - Otherwise, its whatever the pre-saved self.viewportElement is using. - - NB: this is an optimization that is built-in to the SVG spec; previous implementation in SVGKit - recursed up the entire tree of SVGElement's, even though most SVGElement's are NOT ALLOWED to - redefine the viewport - */ - if( self.viewportElement == self ) - { - return CGAffineTransformConcat( self.transformRelative, ((SVGElement*) self.parentNode).viewportElement.transformAbsolute ); - } + NSAssert( [self isKindOfClass:[SVGSVGElement class]], @"I don't know how to handle a VIEWPORT element that is NOT an tag. The SVG Spec is appallingly badly written, provides zero guidance, and zero examples. Someone will need to investigate as soon as we have an example!"); + + SVGSVGElement* selfAsSVGTag = (SVGSVGElement*) self; + CGRect frameViewBox = selfAsSVGTag.viewBoxFrame; + CGRect frameViewport = CGRectMake(0,0, [selfAsSVGTag.width pixelsValue], [selfAsSVGTag.height pixelsValue] ); + + if( ! CGRectIsEmpty( frameViewBox ) ) + optionalViewportTransform = CGAffineTransformMakeScale( frameViewport.size.width / frameViewBox.size.width, frameViewport.size.height / frameViewBox.size.height); else - return [self.viewportElement transformAbsolute]; + optionalViewportTransform = CGAffineTransformIdentity; } + + + /** SELF absolute */ + CGAffineTransform result = CGAffineTransformConcat( selfRelativeTransform, CGAffineTransformConcat( optionalViewportTransform, parentAbsoluteTransform)); + + NSLog( @"[%@] self.transformAbsolute: returning: affine( (%2.1f %2.1f %2.1f %2.1f), (%2.1f %2.1f)", [self class], result.a, result.b, result.c, result.d, result.tx, result.ty); + + return result; } - (void)parseContent:(NSString *)content { diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index 2b36ec687..0cd1a27f6 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -35,7 +35,7 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { _opacity = [[self getAttribute:@"opacity"] floatValue]; } -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +- (CALayer *) newLayer { CALayer* _layer = [[CALayerWithChildHitTest layer] retain]; @@ -53,26 +53,28 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform } - (void)layoutLayer:(CALayer *)layer { - NSArray *sublayers = [layer sublayers]; CGRect mainRect = CGRectZero; - for (NSUInteger n = 0; n < [sublayers count]; n++) { - CALayer *currentLayer = [sublayers objectAtIndex:n]; - + /** Adam: make a frame thats the UNION of all sublayers frames */ + for ( CALayer *currentLayer in [layer sublayers] ) + { CGRect subLayerFrame = currentLayer.frame; - - if (n == 0) { - mainRect = subLayerFrame; - } - else { - mainRect = CGRectUnion(mainRect, subLayerFrame); - } + mainRect = CGRectUnion(mainRect, subLayerFrame); } layer.frame = mainRect; - // TODO: this code looks insanely wrong to me. WTF is it doing? Why? WHY? - for (CALayer *currentLayer in sublayers) { + /** Adam:(dont know why this is here): set each sublayer to have a frame the same size as the parent frame, but with 0 offset. + + Adam: if I understand this correctly, the person who wrote it should have just written: + + "currentLayer.bounds = layer.frame" + + i.e. make every layer have the same size as the parent layer. + + But whoever wrote this didn't document their bad code, so I have no idea if thats correct or not + */ + for (CALayer *currentLayer in [layer sublayers]) { CGRect frame = currentLayer.frame; frame.origin.x -= mainRect.origin.x; frame.origin.y -= mainRect.origin.y; diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index b4f48b937..331cf889d 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -66,15 +66,17 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { self.href = [self getAttribute:@"href"]; } -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +- (CALayer *) newLayer { + NSAssert( FALSE, @"NOT SUPPORTED: SVG Image Element . newLayer -- must be upgraded using the algorithm in SVGShapeElement.newLayer"); + __block CALayer *layer = [[CALayer layer] retain]; layer.name = self.identifier; [layer setValue:self.identifier forKey:kSVGElementIdentifier]; CGRect frame = CGRectMake(_x, _y, _width, _height); - frame = CGRectApplyAffineTransform(frame, preTransform); + frame = CGRectApplyAffineTransform(frame, [self transformAbsolute]); layer.frame = frame; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ diff --git a/Core/DOM classes/SVGLayeredElement.h b/Core/DOM classes/SVGLayeredElement.h index a4642063d..94dc569d1 100644 --- a/Core/DOM classes/SVGLayeredElement.h +++ b/Core/DOM classes/SVGLayeredElement.h @@ -4,17 +4,12 @@ @protocol SVGLayeredElement < NSObject > /*! - SVG's can be specified in any arbitrary resolution; many on the internet have impossibly huge co-ordinates, e.g. "1 million x 1 million", - but when you render them, you're expected to scale that co-ord down to your local co-ords - e.g. "1024x768" for an iPad 1 screen. So, when - generating layers, we provide the transform that will perform that scale (NB: this is the compound transform from all "viewbox / width,height" - found in higher layers of the tree) - NB: the returned layer has - as its "name" property - the "identifier" property of the SVGElement that created it; but that can be overwritten by applications (for valid reasons), so we ADDITIONALLY store the identifier into a custom key - kSVGElementIdentifier - on the CALayer. Because it's a custom key, it's (almost) guaranteed not to be overwritten / altered by other application code */ -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform; +- (CALayer *) newLayer; - (void)layoutLayer:(CALayer *)layer; @end diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index a4c61f9ba..d8410114f 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -114,7 +114,7 @@ - (SVGElement *)findFirstElementOfClass:(Class)class { return nil; } -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +- (CALayer *) newLayer { CALayer* _layer = [[CALayerWithChildHitTest layer] retain]; diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index b18056bb6..5453ca952 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -52,8 +52,6 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; - id value = nil; - _opacity = [[self getAttribute:@"opacity"] floatValue]; if ([[self getAttribute:@"fill"] length] > 0 ) { @@ -67,7 +65,7 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult _fillType = SVGFillTypeNone; } else { - _fillColor = SVGColorFromString([value UTF8String]); + _fillColor = SVGColorFromString(cvalue); _fillType = SVGFillTypeSolid; } } @@ -108,14 +106,13 @@ - (void)setPathByCopyingPathFromLocalSpace:(CGPathRef)aPath { } } -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { +- (CALayer *) newLayer +{ CAShapeLayer* _shapeLayer = [[CAShapeLayerWithHitTest layer] retain]; _shapeLayer.name = self.identifier; [_shapeLayer setValue:self.identifier forKey:kSVGElementIdentifier]; _shapeLayer.opacity = _opacity; - - CGAffineTransform svgEffectiveTransform = [((SVGElement*)self) transformAbsolute]; - + #if OUTLINE_SHAPES #if TARGET_OS_IPHONE @@ -125,27 +122,13 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { _shapeLayer.borderWidth = 1.0f; #endif - /** - We've parsed this shape using the size values specified RAW inside the SVG. - - Before we attempt to *render* it, we need to convert those values into - screen-space. - - Most SVG docs have screenspace == unit space - but some docs have an explicit "viewBox" - attribute on the SVG document. As per the SVG spec, this defines an alternative - conversion from unit space to screenspace - - NB: if you DO NOT do this, many SVG's will *crash* your system, because they use ultra-large co-ordinate systems, - and "assume" you will scale them down to sane numbers before rendering. e.g. many Wikipedia maps are specified in - "hundreds of thousands" of pixels (or higher) - which would lead to multi-gigabyte images in memory, enough to crash - most OS's - */ - CGAffineTransform transformAbsoluteThenGlobalViewBoxFix = CGAffineTransformConcat(svgEffectiveTransform, preTransform); - + /** transform our LOCAL path into ABSOLUTE space */ + CGAffineTransform transformAbsolute = [self transformAbsolute]; CGMutablePathRef pathToPlaceInLayer = CGPathCreateMutable(); - CGPathAddPath( pathToPlaceInLayer, &transformAbsoluteThenGlobalViewBoxFix, _pathRelative); + CGPathAddPath( pathToPlaceInLayer, &transformAbsolute, _pathRelative); - CGRect rect = CGPathGetPathBoundingBox( _pathRelative ); + /** find out the ABSOLUTE BOUNDING BOX of our transformed path */ + CGRect localPathBB = CGPathGetPathBoundingBox( _pathRelative ); //DEBUG ONLY: CGRect unTransformedPathBB = CGPathGetBoundingBox( _pathRelative ); CGRect transformedPathBB = CGPathGetBoundingBox( pathToPlaceInLayer ); @@ -153,7 +136,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { because Apple didn't provide a BOOL to disable that "feature", we have to pre-shift the path forwards by the amount it will be shifted backwards */ CGPathRef finalPath = CGPathCreateByOffsettingPath( pathToPlaceInLayer, transformedPathBB.origin.x, transformedPathBB.origin.y ); - + /** Can't use this - iOS 5 only! path = CGPathCreateCopyByTransformingPath(path, transformFromSVGUnitsToScreenUnits ); */ _shapeLayer.path = finalPath; @@ -164,7 +147,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { NB: this line, by changing the FRAME of the layer, has the side effect of also changing the CGPATH's position in absolute space! This is why we needed the "CGPathRef finalPath =" line a few lines above... */ - _shapeLayer.frame = CGRectApplyAffineTransform( rect, CGAffineTransformConcat( svgEffectiveTransform, preTransform ) ); + _shapeLayer.frame = CGRectApplyAffineTransform( localPathBB, transformAbsolute ); //DEBUG ONLY: CGRect shapeLayerFrame = _shapeLayer.frame; @@ -173,7 +156,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform { We have to apply any scale-factor part of the affine transform to the stroke itself (this is bizarre and horrible, yes, but that's the spec for you!) */ CGPoint fakePoint = CGPointMake( _strokeWidth, 0); - fakePoint = CGPointApplyAffineTransform( fakePoint, preTransform ); + fakePoint = CGPointApplyAffineTransform( fakePoint, transformAbsolute ); _shapeLayer.lineWidth = fakePoint.x; _shapeLayer.strokeColor = CGColorWithSVGColor(_strokeColor); } diff --git a/Core/DOM classes/SVGTextElement.m b/Core/DOM classes/SVGTextElement.m index ad3bb9ac8..56efa4cca 100644 --- a/Core/DOM classes/SVGTextElement.m +++ b/Core/DOM classes/SVGTextElement.m @@ -69,8 +69,10 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult // "writing-mode" = "lr-tb"; } -- (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform +- (CALayer *) newLayer { + NSAssert( FALSE, @"NOT SUPPORTED: SVG Text Element . newLayer -- must be upgraded using the algorithm in SVGShapeElement.newLayer"); + #if TARGET_OS_IPHONE NSString* textToDraw = self.stringValue; @@ -82,7 +84,7 @@ - (CALayer *) newLayerPreTransformed:(CGAffineTransform) preTransform [label setName:self.identifier]; [label setFont:_fontFamily]; [label setFontSize:_fontSize]; - [label setFrame:CGRectApplyAffineTransform( CGRectMake(_x, _y, sizeOfTextRect.width, sizeOfTextRect.height), preTransform ) ]; + [label setFrame:CGRectApplyAffineTransform( CGRectMake(_x, _y, sizeOfTextRect.width, sizeOfTextRect.height), [self transformAbsolute] ) ]; [label setString:textToDraw]; [label setAlignmentMode:kCAAlignmentLeft]; [label setForegroundColor:[[UIColor blackColor] CGColor]]; diff --git a/Core/Parsing/SVGKParserSVG.m b/Core/Parsing/SVGKParserSVG.m index 45aa6c33a..3126426bd 100644 --- a/Core/Parsing/SVGKParserSVG.m +++ b/Core/Parsing/SVGKParserSVG.m @@ -158,6 +158,8 @@ - (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource } if( generateAnSVGDocument ) { + NSAssert( [element isKindOfClass:[SVGSVGElement class]], @"Trying to create a new internal SVGDocument from a Node that is NOT of type SVGSVGElement (tag: svg). Node was of type: %@", NSStringFromClass([element class])); + SVGDocument* newDocument = [[[SVGDocument alloc] init] autorelease]; newDocument.rootElement = (SVGSVGElement*) element; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 9ea02aeeb..b2ecb5261 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -104,7 +104,9 @@ - (id)initWithParsedSVG:(SVGKParseResult *)parseResult { } - (id)initWithSource:(SVGKSource *)newSource { - self = [self initWithParsedSVG:[SVGKParser parseSourceUsingDefaultSVGKParser:self.source]]; + NSAssert( newSource != nil, @"Attempted to init an SVGKImage using a nil SVGKSource"); + + self = [self initWithParsedSVG:[SVGKParser parseSourceUsingDefaultSVGKParser:newSource]]; if (self) { self.source = newSource; } @@ -282,10 +284,12 @@ -(CALayer*) newCopyPositionedAbsoluteLayerWithIdentifier:(NSString *)identifier } } -- (CALayer *)newLayerWithElement:(SVGElement *)element preTransform:(CGAffineTransform) preTransform { - CALayer *layer = [element newLayerPreTransformed:preTransform]; +- (CALayer *)newLayerWithElement:(SVGElement *)element +{ + + CALayer *layer = [element newLayer]; - NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), element.identifier); + NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@ frame:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), NSStringFromCGRect( layer.frame ), element.identifier); if ( element.childNodes.length < 1 ) { return layer; @@ -299,7 +303,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element preTr for (SVGElement *child in element.childNodes ) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { - CALayer *sublayer = [self newLayerWithElement:(id)child preTransform:preTransform]; + CALayer *sublayer = [self newLayerWithElement:(id)child]; if (!sublayer) { continue; @@ -309,9 +313,8 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element preTr } } - if (element != self.DOMTree) { + //ADAM: no explanation for WTF this if statement is for! : if (element != self.DOMTree) [element layoutLayer:layer]; - } [layer setNeedsDisplay]; @@ -324,6 +327,10 @@ -(CALayer *)newCALayerTree return nil; else { + /**** + + delete all this if it works without it + CGAffineTransform preTransform = CGAffineTransformIdentity; // TODO: calc the correct transform! @@ -332,8 +339,8 @@ -(CALayer *)newCALayerTree if( ! CGRectIsEmpty( frameViewBox ) ) preTransform = CGAffineTransformMakeScale( frameImage.size.width / frameViewBox.size.width, frameImage.size.height / frameViewBox.size.height); - - return [self newLayerWithElement:self.DOMTree preTransform:preTransform]; + */ + return [self newLayerWithElement:self.DOMTree]; } } diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index 5a7246265..ca3572ade 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -21,7 +21,6 @@ 3BF50426148C63F500CC7D17 /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041F148C63F500CC7D17 /* Note.svg */; }; 3BF50427148C63F500CC7D17 /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50420148C63F500CC7D17 /* test-wave-1.svg */; }; 3BF50428148C63F500CC7D17 /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50421148C63F500CC7D17 /* Text.svg */; }; - 662D1A2115B36C270027D07B /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 662D1A2015B36C270027D07B /* AppleSucksDOMImplementation.m */; }; 662D1A2215B36C800027D07B /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28042008108E984D000629CD /* RootViewController.m */; }; 662D1A2315B36C830027D07B /* SVGPadAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SVGPadAppDelegate.m */; }; 662D1A2415B36C890027D07B /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2804200A108E984D000629CD /* DetailViewController.m */; }; @@ -30,61 +29,60 @@ 663DEFEF14BFDAC100C56E07 /* uk-only.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* uk-only.svg */; }; 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; + 66853A90160E561C00FE256C /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A80160E561B00FE256C /* CGPathAdditions.m */; }; + 66853A91160E561C00FE256C /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A82160E561B00FE256C /* SVGKImage.m */; }; + 66853A92160E561C00FE256C /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A84160E561B00FE256C /* SVGKImage+SVGPathView.m */; }; + 66853A93160E561C00FE256C /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A87160E561B00FE256C /* SVGKParser.m */; }; + 66853A94160E561C00FE256C /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A89160E561B00FE256C /* SVGKPattern.m */; }; + 66853A95160E561C00FE256C /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A8B160E561B00FE256C /* SVGKSource.m */; }; + 66853A96160E561C00FE256C /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A8D160E561B00FE256C /* SVGKView.m */; }; + 66853A97160E561C00FE256C /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A8F160E561C00FE256C /* SVGUtils.m */; }; + 66853AB9160E565900FE256C /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A99160E565900FE256C /* AppleSucksDOMImplementation.m */; }; + 66853ABA160E565900FE256C /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A9B160E565900FE256C /* Attr.m */; }; + 66853ABB160E565900FE256C /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A9D160E565900FE256C /* CDATASection.m */; }; + 66853ABC160E565900FE256C /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A9F160E565900FE256C /* CharacterData.m */; }; + 66853ABD160E565900FE256C /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA1160E565900FE256C /* Comment.m */; }; + 66853ABE160E565900FE256C /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA3160E565900FE256C /* Document.m */; }; + 66853ABF160E565900FE256C /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA6160E565900FE256C /* DocumentFragment.m */; }; + 66853AC0160E565900FE256C /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA8160E565900FE256C /* DocumentType.m */; }; + 66853AC1160E565900FE256C /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AAA160E565900FE256C /* Element.m */; }; + 66853AC2160E565900FE256C /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AAC160E565900FE256C /* EntityReference.m */; }; + 66853AC3160E565900FE256C /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AAE160E565900FE256C /* NamedNodeMap.m */; }; + 66853AC4160E565900FE256C /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB0160E565900FE256C /* Node.m */; }; + 66853AC5160E565900FE256C /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB3160E565900FE256C /* NodeList.m */; }; + 66853AC6160E565900FE256C /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB6160E565900FE256C /* ProcessingInstruction.m */; }; + 66853AC7160E565900FE256C /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB8160E565900FE256C /* Text.m */; }; + 66853AD9160E566500FE256C /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AC9160E566500FE256C /* SVGAngle.m */; }; + 66853ADA160E566500FE256C /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853ACC160E566500FE256C /* SVGDocument.m */; }; + 66853ADB160E566500FE256C /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853ACE160E566500FE256C /* SVGLength.m */; }; + 66853ADC160E566500FE256C /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AD0160E566500FE256C /* SVGMatrix.m */; }; + 66853ADD160E566500FE256C /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AD3160E566500FE256C /* SVGPoint.m */; }; + 66853ADE160E566500FE256C /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AD7160E566500FE256C /* SVGTransform.m */; }; + 66853B01160E567300FE256C /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE0160E567300FE256C /* SVGCircleElement.m */; }; + 66853B02160E567300FE256C /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE2160E567300FE256C /* SVGDefsElement.m */; }; + 66853B03160E567300FE256C /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE4160E567300FE256C /* SVGDescriptionElement.m */; }; + 66853B04160E567300FE256C /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE7160E567300FE256C /* SVGElement.m */; }; + 66853B05160E567300FE256C /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE9160E567300FE256C /* SVGEllipseElement.m */; }; + 66853B06160E567300FE256C /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AEB160E567300FE256C /* SVGGroupElement.m */; }; + 66853B07160E567300FE256C /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AED160E567300FE256C /* SVGImageElement.m */; }; + 66853B08160E567300FE256C /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF0160E567300FE256C /* SVGLineElement.m */; }; + 66853B09160E567300FE256C /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF2160E567300FE256C /* SVGPathElement.m */; }; + 66853B0A160E567300FE256C /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF4160E567300FE256C /* SVGPolygonElement.m */; }; + 66853B0B160E567300FE256C /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF6160E567300FE256C /* SVGPolylineElement.m */; }; + 66853B0C160E567300FE256C /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF8160E567300FE256C /* SVGRectElement.m */; }; + 66853B0D160E567300FE256C /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AFA160E567300FE256C /* SVGShapeElement.m */; }; + 66853B0E160E567300FE256C /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AFC160E567300FE256C /* SVGSVGElement.m */; }; + 66853B0F160E567300FE256C /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AFE160E567300FE256C /* SVGTextElement.m */; }; + 66853B10160E567300FE256C /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B00160E567300FE256C /* SVGTitleElement.m */; }; + 66853B17160E568200FE256C /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B12160E568200FE256C /* CALayerWithChildHitTest.m */; }; + 66853B18160E568200FE256C /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B14160E568200FE256C /* CAShapeLayerWithHitTest.m */; }; + 66853B19160E568200FE256C /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B16160E568200FE256C /* SVGPathView.m */; }; + 66853B23160E569A00FE256C /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B1B160E569A00FE256C /* SVGKParseResult.m */; }; + 66853B24160E569A00FE256C /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B1E160E569A00FE256C /* SVGKParserPatternsAndGradients.m */; }; + 66853B25160E569A00FE256C /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B20160E569A00FE256C /* SVGKParserSVG.m */; }; + 66853B26160E569A00FE256C /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B22160E569A00FE256C /* SVGKPointsAndPathsParser.m */; }; 66BBD74315028F0A00102FEF /* australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* australia_states_blank.svg */; }; 66BBD7461502A4EE00102FEF /* Europe_states_reduced.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */; }; - 66CBCA8415B368F300C36B57 /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */; }; - 66CBCA8515B368F300C36B57 /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CDE61566D3EA00A46247 /* SVGUtils.m */; }; - 66CBCA8615B3694A00C36B57 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471471574221200EA533D /* Attr.m */; }; - 66CBCA8715B3694A00C36B57 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471491574221200EA533D /* CDATASection.m */; }; - 66CBCA8815B3694A00C36B57 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714B1574221200EA533D /* CharacterData.m */; }; - 66CBCA8915B3694A00C36B57 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714D1574221200EA533D /* Comment.m */; }; - 66CBCA8A15B3694A00C36B57 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694714F1574221200EA533D /* Document.m */; }; - 66CBCA8B15B3694A00C36B57 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471511574221200EA533D /* DocumentFragment.m */; }; - 66CBCA8C15B3694A00C36B57 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471531574221200EA533D /* DocumentType.m */; }; - 66CBCA8E15B3694A00C36B57 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471571574221200EA533D /* Element.m */; }; - 66CBCA8F15B3694A00C36B57 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471591574221200EA533D /* EntityReference.m */; }; - 66CBCA9015B3694A00C36B57 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694715B1574221200EA533D /* NamedNodeMap.m */; }; - 66CBCA9115B3694A00C36B57 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694715E1574221200EA533D /* Node.m */; }; - 66CBCA9215B3694A00C36B57 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471611574221200EA533D /* NodeList.m */; }; - 66CBCA9315B3694A00C36B57 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471631574221200EA533D /* ProcessingInstruction.m */; }; - 66CBCA9415B3694A00C36B57 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471651574221200EA533D /* Text.m */; }; - 66CBCA9515B3694A00C36B57 /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471681574221200EA533D /* SVGDocument.m */; }; - 66CBCA9615B3694A00C36B57 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716A1574221200EA533D /* SVGCircleElement.m */; }; - 66CBCA9715B3694A00C36B57 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716C1574221200EA533D /* SVGDefsElement.m */; }; - 66CBCA9815B3694A00C36B57 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694716E1574221200EA533D /* SVGDescriptionElement.m */; }; - 66CBCA9915B3694A00C36B57 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471701574221200EA533D /* SVGElement.m */; }; - 66CBCA9A15B3694A00C36B57 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471721574221200EA533D /* SVGEllipseElement.m */; }; - 66CBCA9B15B3694B00C36B57 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471741574221200EA533D /* SVGGroupElement.m */; }; - 66CBCA9C15B3694B00C36B57 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471761574221200EA533D /* SVGImageElement.m */; }; - 66CBCA9D15B3694B00C36B57 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471781574221200EA533D /* SVGLineElement.m */; }; - 66CBCA9E15B3694B00C36B57 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717A1574221200EA533D /* SVGPathElement.m */; }; - 66CBCA9F15B3694B00C36B57 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717C1574221200EA533D /* SVGPolygonElement.m */; }; - 66CBCAA015B3694B00C36B57 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694717E1574221200EA533D /* SVGPolylineElement.m */; }; - 66CBCAA115B3694B00C36B57 /* SVGRectElement.h in Sources */ = {isa = PBXBuildFile; fileRef = 6694717F1574221200EA533D /* SVGRectElement.h */; }; - 66CBCAA215B3694B00C36B57 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471821574221200EA533D /* SVGShapeElement.m */; }; - 66CBCAA315B3694B00C36B57 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471841574221200EA533D /* SVGSVGElement.m */; }; - 66CBCAA415B3694B00C36B57 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471861574221200EA533D /* SVGTextElement.m */; }; - 66CBCAA515B3694B00C36B57 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471881574221200EA533D /* SVGTitleElement.m */; }; - 66CBCAA615B3694B00C36B57 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694718B1574221200EA533D /* SVGKParseResult.m */; }; - 66CBCAA715B3694B00C36B57 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694718E1574221200EA533D /* SVGKParserSVG.m */; }; - 66CBCAA815B3694B00C36B57 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471901574221200EA533D /* SVGKPointsAndPathsParser.m */; }; - 66CBCAA915B3694B00C36B57 /* SKBasicDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471921574221200EA533D /* SKBasicDataTypes.m */; }; - 66CBCAAA15B3694B00C36B57 /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471941574221200EA533D /* SVGKImage.m */; }; - 66CBCAAB15B3694B00C36B57 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471961574221200EA533D /* SVGKImage+SVGPathView.m */; }; - 66CBCAAC15B3694B00C36B57 /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471981574221200EA533D /* SVGKParser.m */; }; - 66CBCAAD15B3694B00C36B57 /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719A1574221200EA533D /* SVGKPattern.m */; }; - 66CBCAAE15B3694B00C36B57 /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719C1574221200EA533D /* SVGKSource.m */; }; - 66CBCAAF15B3694B00C36B57 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694719E1574221200EA533D /* SVGKView.m */; }; - 66CBCABF15B3696E00C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAB115B3696E00C36B57 /* SVGAngle.m */; }; - 66CBCAC115B3696E00C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAB615B3696E00C36B57 /* SVGMatrix.m */; }; - 66CBCAC215B3696E00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAB915B3696E00C36B57 /* SVGPoint.m */; }; - 66CBCAC315B3696E00C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCABD15B3696E00C36B57 /* SVGTransform.m */; }; - 66CBCAC615B3699000C36B57 /* SVGKParserStackItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAC515B3698F00C36B57 /* SVGKParserStackItem.m */; }; - 66CBCAC915B369AA00C36B57 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCAC815B369AA00C36B57 /* SVGKParserPatternsAndGradients.m */; }; - 66CBCACA15B36A4000C36B57 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */; }; - 66CBCACB15B36A4300C36B57 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */; }; - 66CBCACC15B36A4700C36B57 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF503F8148C62D900CC7D17 /* SVGPathView.m */; }; - 66CBCACD15B36A5A00C36B57 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 669471801574221200EA533D /* SVGRectElement.m */; }; C94B6C5D1274BBFC00B456EB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */; }; /* End PBXBuildFile section */ @@ -104,12 +102,6 @@ 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 3BC23F061488686900FC74CE /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - 3BF503F1148C62D900CC7D17 /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; - 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; - 3BF503F3148C62D900CC7D17 /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; - 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 3BF503F7148C62D900CC7D17 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; - 3BF503F8148C62D900CC7D17 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; 3BF5041C148C63F500CC7D17 /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; 3BF5041D148C63F500CC7D17 /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; @@ -117,123 +109,130 @@ 3BF5041F148C63F500CC7D17 /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; 3BF50420148C63F500CC7D17 /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; 3BF50421148C63F500CC7D17 /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; - 662D1A1F15B36C270027D07B /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; - 662D1A2015B36C270027D07B /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; 663DEFEE14BFDAC100C56E07 /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; 66436E5214A0BCEF001CC769 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; - 6684CDAD1566D3EA00A46247 /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; - 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 6684CDC51566D3EA00A46247 /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 6684CDE51566D3EA00A46247 /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; - 6684CDE61566D3EA00A46247 /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 669471461574221200EA533D /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; - 669471471574221200EA533D /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; - 669471481574221200EA533D /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; - 669471491574221200EA533D /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; - 6694714A1574221200EA533D /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; - 6694714B1574221200EA533D /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; - 6694714C1574221200EA533D /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; - 6694714D1574221200EA533D /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; - 6694714E1574221200EA533D /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; - 6694714F1574221200EA533D /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; - 669471501574221200EA533D /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; - 669471511574221200EA533D /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; - 669471521574221200EA533D /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; - 669471531574221200EA533D /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; - 669471561574221200EA533D /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; - 669471571574221200EA533D /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; - 669471581574221200EA533D /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; - 669471591574221200EA533D /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; - 6694715A1574221200EA533D /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; - 6694715B1574221200EA533D /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; - 6694715C1574221200EA533D /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; - 6694715D1574221200EA533D /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; - 6694715E1574221200EA533D /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; - 6694715F1574221200EA533D /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; - 669471601574221200EA533D /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; - 669471611574221200EA533D /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; - 669471621574221200EA533D /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; - 669471631574221200EA533D /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; - 669471641574221200EA533D /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; - 669471651574221200EA533D /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; - 669471671574221200EA533D /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 669471681574221200EA533D /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; - 669471691574221200EA533D /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 6694716A1574221200EA533D /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 6694716B1574221200EA533D /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 6694716C1574221200EA533D /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 6694716D1574221200EA533D /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 6694716E1574221200EA533D /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 6694716F1574221200EA533D /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 669471701574221200EA533D /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SVGElement.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 669471711574221200EA533D /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 669471721574221200EA533D /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 669471731574221200EA533D /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 669471741574221200EA533D /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 669471751574221200EA533D /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 669471761574221200EA533D /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; - 669471771574221200EA533D /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 669471781574221200EA533D /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 669471791574221200EA533D /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 6694717A1574221200EA533D /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 6694717B1574221200EA533D /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 6694717C1574221200EA533D /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 6694717D1574221200EA533D /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 6694717E1574221200EA533D /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 6694717F1574221200EA533D /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 669471801574221200EA533D /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 669471811574221200EA533D /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 669471821574221200EA533D /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 669471831574221200EA533D /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; - 669471841574221200EA533D /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 669471851574221200EA533D /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; - 669471861574221200EA533D /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 669471871574221200EA533D /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 669471881574221200EA533D /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 6694718A1574221200EA533D /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = SVGKParseResult.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 6694718B1574221200EA533D /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; - 6694718C1574221200EA533D /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; - 6694718D1574221200EA533D /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; - 6694718E1574221200EA533D /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; - 6694718F1574221200EA533D /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; - 669471901574221200EA533D /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; - 669471911574221200EA533D /* SKBasicDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKBasicDataTypes.h; sourceTree = ""; }; - 669471921574221200EA533D /* SKBasicDataTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKBasicDataTypes.m; sourceTree = ""; }; - 669471931574221200EA533D /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; - 669471941574221200EA533D /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; - 669471951574221200EA533D /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+SVGPathView.h"; sourceTree = ""; }; - 669471961574221200EA533D /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+SVGPathView.m"; sourceTree = ""; }; - 669471971574221200EA533D /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; - 669471981574221200EA533D /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; - 669471991574221200EA533D /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; - 6694719A1574221200EA533D /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; - 6694719B1574221200EA533D /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; - 6694719C1574221200EA533D /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; - 6694719D1574221200EA533D /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; - 6694719E1574221200EA533D /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; + 66853A7F160E561B00FE256C /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; + 66853A80160E561B00FE256C /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; + 66853A81160E561B00FE256C /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; + 66853A82160E561B00FE256C /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; + 66853A83160E561B00FE256C /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+SVGPathView.h"; sourceTree = ""; }; + 66853A84160E561B00FE256C /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+SVGPathView.m"; sourceTree = ""; }; + 66853A85160E561B00FE256C /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; + 66853A86160E561B00FE256C /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; + 66853A87160E561B00FE256C /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; + 66853A88160E561B00FE256C /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; + 66853A89160E561B00FE256C /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; + 66853A8A160E561B00FE256C /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; + 66853A8B160E561B00FE256C /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; + 66853A8C160E561B00FE256C /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; + 66853A8D160E561B00FE256C /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; + 66853A8E160E561C00FE256C /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; + 66853A8F160E561C00FE256C /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; + 66853A98160E565900FE256C /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; + 66853A99160E565900FE256C /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; + 66853A9A160E565900FE256C /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; + 66853A9B160E565900FE256C /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; + 66853A9C160E565900FE256C /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; + 66853A9D160E565900FE256C /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; + 66853A9E160E565900FE256C /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; + 66853A9F160E565900FE256C /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; + 66853AA0160E565900FE256C /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; + 66853AA1160E565900FE256C /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; + 66853AA2160E565900FE256C /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; + 66853AA3160E565900FE256C /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; + 66853AA4160E565900FE256C /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; + 66853AA5160E565900FE256C /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; + 66853AA6160E565900FE256C /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; + 66853AA7160E565900FE256C /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; + 66853AA8160E565900FE256C /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; + 66853AA9160E565900FE256C /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; + 66853AAA160E565900FE256C /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; + 66853AAB160E565900FE256C /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; + 66853AAC160E565900FE256C /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; + 66853AAD160E565900FE256C /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; + 66853AAE160E565900FE256C /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; + 66853AAF160E565900FE256C /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; + 66853AB0160E565900FE256C /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; + 66853AB1160E565900FE256C /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; + 66853AB2160E565900FE256C /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; + 66853AB3160E565900FE256C /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; + 66853AB4160E565900FE256C /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; + 66853AB5160E565900FE256C /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; + 66853AB6160E565900FE256C /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; + 66853AB7160E565900FE256C /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; + 66853AB8160E565900FE256C /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; + 66853AC8160E566500FE256C /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; + 66853AC9160E566500FE256C /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; + 66853ACA160E566500FE256C /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; + 66853ACB160E566500FE256C /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; + 66853ACC160E566500FE256C /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 66853ACD160E566500FE256C /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; + 66853ACE160E566500FE256C /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; + 66853ACF160E566500FE256C /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; + 66853AD0160E566500FE256C /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; + 66853AD1160E566500FE256C /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; + 66853AD2160E566500FE256C /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; + 66853AD3160E566500FE256C /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; + 66853AD4160E566500FE256C /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; + 66853AD5160E566500FE256C /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; + 66853AD6160E566500FE256C /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; + 66853AD7160E566500FE256C /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; + 66853AD8160E566500FE256C /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; + 66853ADF160E567300FE256C /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; + 66853AE0160E567300FE256C /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; + 66853AE1160E567300FE256C /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 66853AE2160E567300FE256C /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 66853AE3160E567300FE256C /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; + 66853AE4160E567300FE256C /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; + 66853AE5160E567300FE256C /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; + 66853AE6160E567300FE256C /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; + 66853AE7160E567300FE256C /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 66853AE8160E567300FE256C /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; + 66853AE9160E567300FE256C /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; + 66853AEA160E567300FE256C /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; + 66853AEB160E567300FE256C /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; + 66853AEC160E567300FE256C /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; + 66853AED160E567300FE256C /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 66853AEE160E567300FE256C /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; + 66853AEF160E567300FE256C /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; + 66853AF0160E567300FE256C /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; + 66853AF1160E567300FE256C /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; + 66853AF2160E567300FE256C /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; + 66853AF3160E567300FE256C /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; + 66853AF4160E567300FE256C /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; + 66853AF5160E567300FE256C /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; + 66853AF6160E567300FE256C /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; + 66853AF7160E567300FE256C /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; + 66853AF8160E567300FE256C /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; + 66853AF9160E567300FE256C /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; + 66853AFA160E567300FE256C /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; + 66853AFB160E567300FE256C /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 66853AFC160E567300FE256C /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 66853AFD160E567300FE256C /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; + 66853AFE160E567300FE256C /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; + 66853AFF160E567300FE256C /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; + 66853B00160E567300FE256C /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 66853B11160E568200FE256C /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; + 66853B12160E568200FE256C /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; + 66853B13160E568200FE256C /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; + 66853B14160E568200FE256C /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; + 66853B15160E568200FE256C /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; + 66853B16160E568200FE256C /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; + 66853B1A160E569A00FE256C /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; + 66853B1B160E569A00FE256C /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; + 66853B1C160E569A00FE256C /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; + 66853B1D160E569A00FE256C /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; + 66853B1E160E569A00FE256C /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; + 66853B1F160E569A00FE256C /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; + 66853B20160E569A00FE256C /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; + 66853B21160E569A00FE256C /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; + 66853B22160E569A00FE256C /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; 66BBD74215028F0A00102FEF /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; - 66CBCAB015B3696E00C36B57 /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; - 66CBCAB115B3696E00C36B57 /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; - 66CBCAB215B3696E00C36B57 /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; - 66CBCAB515B3696E00C36B57 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; - 66CBCAB615B3696E00C36B57 /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; - 66CBCAB715B3696E00C36B57 /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; - 66CBCAB815B3696E00C36B57 /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; - 66CBCAB915B3696E00C36B57 /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; - 66CBCABA15B3696E00C36B57 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; - 66CBCABB15B3696E00C36B57 /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; - 66CBCABC15B3696E00C36B57 /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; - 66CBCABD15B3696E00C36B57 /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; - 66CBCABE15B3696E00C36B57 /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; - 66CBCAC415B3698F00C36B57 /* SVGKParserStackItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserStackItem.h; sourceTree = ""; }; - 66CBCAC515B3698F00C36B57 /* SVGKParserStackItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserStackItem.m; sourceTree = ""; }; - 66CBCAC715B369AA00C36B57 /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; - 66CBCAC815B369AA00C36B57 /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; 8D1107310486CEB800E47090 /* SVGPad-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SVGPad-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -334,29 +333,25 @@ 3BF503C0148C62D900CC7D17 /* Core */ = { isa = PBXGroup; children = ( - 6684CDAD1566D3EA00A46247 /* CGPathAdditions.h */, - 6684CDAE1566D3EA00A46247 /* CGPathAdditions.m */, - 6684CDC51566D3EA00A46247 /* SVGKit.h */, - 6684CDE51566D3EA00A46247 /* SVGUtils.h */, - 6684CDE61566D3EA00A46247 /* SVGUtils.m */, + 66853A7F160E561B00FE256C /* CGPathAdditions.h */, + 66853A80160E561B00FE256C /* CGPathAdditions.m */, + 66853A81160E561B00FE256C /* SVGKImage.h */, + 66853A82160E561B00FE256C /* SVGKImage.m */, + 66853A83160E561B00FE256C /* SVGKImage+SVGPathView.h */, + 66853A84160E561B00FE256C /* SVGKImage+SVGPathView.m */, + 66853A85160E561B00FE256C /* SVGKit.h */, + 66853A86160E561B00FE256C /* SVGKParser.h */, + 66853A87160E561B00FE256C /* SVGKParser.m */, + 66853A88160E561B00FE256C /* SVGKPattern.h */, + 66853A89160E561B00FE256C /* SVGKPattern.m */, + 66853A8A160E561B00FE256C /* SVGKSource.h */, + 66853A8B160E561B00FE256C /* SVGKSource.m */, + 66853A8C160E561B00FE256C /* SVGKView.h */, + 66853A8D160E561B00FE256C /* SVGKView.m */, + 66853A8E160E561C00FE256C /* SVGUtils.h */, + 66853A8F160E561C00FE256C /* SVGUtils.m */, 669471441574221200EA533D /* DOM classes */, 669471891574221200EA533D /* Parsing */, - 669471911574221200EA533D /* SKBasicDataTypes.h */, - 669471921574221200EA533D /* SKBasicDataTypes.m */, - 66CBCAC415B3698F00C36B57 /* SVGKParserStackItem.h */, - 66CBCAC515B3698F00C36B57 /* SVGKParserStackItem.m */, - 669471931574221200EA533D /* SVGKImage.h */, - 669471941574221200EA533D /* SVGKImage.m */, - 669471951574221200EA533D /* SVGKImage+SVGPathView.h */, - 669471961574221200EA533D /* SVGKImage+SVGPathView.m */, - 669471971574221200EA533D /* SVGKParser.h */, - 669471981574221200EA533D /* SVGKParser.m */, - 669471991574221200EA533D /* SVGKPattern.h */, - 6694719A1574221200EA533D /* SVGKPattern.m */, - 6694719B1574221200EA533D /* SVGKSource.h */, - 6694719C1574221200EA533D /* SVGKSource.m */, - 6694719D1574221200EA533D /* SVGKView.h */, - 6694719E1574221200EA533D /* SVGKView.m */, ); name = Core; path = ../../Core; @@ -365,12 +360,12 @@ 3BF503F0148C62D900CC7D17 /* iOS */ = { isa = PBXGroup; children = ( - 3BF503F1148C62D900CC7D17 /* CALayerWithChildHitTest.h */, - 3BF503F2148C62D900CC7D17 /* CALayerWithChildHitTest.m */, - 3BF503F3148C62D900CC7D17 /* CAShapeLayerWithHitTest.h */, - 3BF503F4148C62D900CC7D17 /* CAShapeLayerWithHitTest.m */, - 3BF503F7148C62D900CC7D17 /* SVGPathView.h */, - 3BF503F8148C62D900CC7D17 /* SVGPathView.m */, + 66853B11160E568200FE256C /* CALayerWithChildHitTest.h */, + 66853B12160E568200FE256C /* CALayerWithChildHitTest.m */, + 66853B13160E568200FE256C /* CAShapeLayerWithHitTest.h */, + 66853B14160E568200FE256C /* CAShapeLayerWithHitTest.m */, + 66853B15160E568200FE256C /* SVGPathView.h */, + 66853B16160E568200FE256C /* SVGPathView.m */, ); name = iOS; path = ../../iOS; @@ -410,40 +405,42 @@ 669471441574221200EA533D /* DOM classes */ = { isa = PBXGroup; children = ( + 66853ADF160E567300FE256C /* SVGCircleElement.h */, + 66853AE0160E567300FE256C /* SVGCircleElement.m */, + 66853AE1160E567300FE256C /* SVGDefsElement.h */, + 66853AE2160E567300FE256C /* SVGDefsElement.m */, + 66853AE3160E567300FE256C /* SVGDescriptionElement.h */, + 66853AE4160E567300FE256C /* SVGDescriptionElement.m */, + 66853AE5160E567300FE256C /* SVGElement_ForParser.h */, + 66853AE6160E567300FE256C /* SVGElement.h */, + 66853AE7160E567300FE256C /* SVGElement.m */, + 66853AE8160E567300FE256C /* SVGEllipseElement.h */, + 66853AE9160E567300FE256C /* SVGEllipseElement.m */, + 66853AEA160E567300FE256C /* SVGGroupElement.h */, + 66853AEB160E567300FE256C /* SVGGroupElement.m */, + 66853AEC160E567300FE256C /* SVGImageElement.h */, + 66853AED160E567300FE256C /* SVGImageElement.m */, + 66853AEE160E567300FE256C /* SVGLayeredElement.h */, + 66853AEF160E567300FE256C /* SVGLineElement.h */, + 66853AF0160E567300FE256C /* SVGLineElement.m */, + 66853AF1160E567300FE256C /* SVGPathElement.h */, + 66853AF2160E567300FE256C /* SVGPathElement.m */, + 66853AF3160E567300FE256C /* SVGPolygonElement.h */, + 66853AF4160E567300FE256C /* SVGPolygonElement.m */, + 66853AF5160E567300FE256C /* SVGPolylineElement.h */, + 66853AF6160E567300FE256C /* SVGPolylineElement.m */, + 66853AF7160E567300FE256C /* SVGRectElement.h */, + 66853AF8160E567300FE256C /* SVGRectElement.m */, + 66853AF9160E567300FE256C /* SVGShapeElement.h */, + 66853AFA160E567300FE256C /* SVGShapeElement.m */, + 66853AFB160E567300FE256C /* SVGSVGElement.h */, + 66853AFC160E567300FE256C /* SVGSVGElement.m */, + 66853AFD160E567300FE256C /* SVGTextElement.h */, + 66853AFE160E567300FE256C /* SVGTextElement.m */, + 66853AFF160E567300FE256C /* SVGTitleElement.h */, + 66853B00160E567300FE256C /* SVGTitleElement.m */, 669471451574221200EA533D /* Core DOM */, 669471661574221200EA533D /* SVG-DOM */, - 669471691574221200EA533D /* SVGCircleElement.h */, - 6694716A1574221200EA533D /* SVGCircleElement.m */, - 6694716B1574221200EA533D /* SVGDefsElement.h */, - 6694716C1574221200EA533D /* SVGDefsElement.m */, - 6694716D1574221200EA533D /* SVGDescriptionElement.h */, - 6694716E1574221200EA533D /* SVGDescriptionElement.m */, - 6694716F1574221200EA533D /* SVGElement.h */, - 669471701574221200EA533D /* SVGElement.m */, - 669471711574221200EA533D /* SVGEllipseElement.h */, - 669471721574221200EA533D /* SVGEllipseElement.m */, - 669471731574221200EA533D /* SVGGroupElement.h */, - 669471741574221200EA533D /* SVGGroupElement.m */, - 669471751574221200EA533D /* SVGImageElement.h */, - 669471761574221200EA533D /* SVGImageElement.m */, - 669471771574221200EA533D /* SVGLineElement.h */, - 669471781574221200EA533D /* SVGLineElement.m */, - 669471791574221200EA533D /* SVGPathElement.h */, - 6694717A1574221200EA533D /* SVGPathElement.m */, - 6694717B1574221200EA533D /* SVGPolygonElement.h */, - 6694717C1574221200EA533D /* SVGPolygonElement.m */, - 6694717D1574221200EA533D /* SVGPolylineElement.h */, - 6694717E1574221200EA533D /* SVGPolylineElement.m */, - 6694717F1574221200EA533D /* SVGRectElement.h */, - 669471801574221200EA533D /* SVGRectElement.m */, - 669471811574221200EA533D /* SVGShapeElement.h */, - 669471821574221200EA533D /* SVGShapeElement.m */, - 669471831574221200EA533D /* SVGSVGElement.h */, - 669471841574221200EA533D /* SVGSVGElement.m */, - 669471851574221200EA533D /* SVGTextElement.h */, - 669471861574221200EA533D /* SVGTextElement.m */, - 669471871574221200EA533D /* SVGTitleElement.h */, - 669471881574221200EA533D /* SVGTitleElement.m */, ); path = "DOM classes"; sourceTree = ""; @@ -451,38 +448,39 @@ 669471451574221200EA533D /* Core DOM */ = { isa = PBXGroup; children = ( - 662D1A1F15B36C270027D07B /* AppleSucksDOMImplementation.h */, - 662D1A2015B36C270027D07B /* AppleSucksDOMImplementation.m */, - 669471461574221200EA533D /* Attr.h */, - 669471471574221200EA533D /* Attr.m */, - 669471481574221200EA533D /* CDATASection.h */, - 669471491574221200EA533D /* CDATASection.m */, - 6694714A1574221200EA533D /* CharacterData.h */, - 6694714B1574221200EA533D /* CharacterData.m */, - 6694714C1574221200EA533D /* Comment.h */, - 6694714D1574221200EA533D /* Comment.m */, - 6694714E1574221200EA533D /* Document.h */, - 6694714F1574221200EA533D /* Document.m */, - 669471501574221200EA533D /* DocumentFragment.h */, - 669471511574221200EA533D /* DocumentFragment.m */, - 669471521574221200EA533D /* DocumentType.h */, - 669471531574221200EA533D /* DocumentType.m */, - 669471561574221200EA533D /* Element.h */, - 669471571574221200EA533D /* Element.m */, - 669471581574221200EA533D /* EntityReference.h */, - 669471591574221200EA533D /* EntityReference.m */, - 6694715A1574221200EA533D /* NamedNodeMap.h */, - 6694715B1574221200EA533D /* NamedNodeMap.m */, - 6694715C1574221200EA533D /* Node+Mutable.h */, - 6694715D1574221200EA533D /* Node.h */, - 6694715E1574221200EA533D /* Node.m */, - 6694715F1574221200EA533D /* NodeList+Mutable.h */, - 669471601574221200EA533D /* NodeList.h */, - 669471611574221200EA533D /* NodeList.m */, - 669471621574221200EA533D /* ProcessingInstruction.h */, - 669471631574221200EA533D /* ProcessingInstruction.m */, - 669471641574221200EA533D /* Text.h */, - 669471651574221200EA533D /* Text.m */, + 66853A98160E565900FE256C /* AppleSucksDOMImplementation.h */, + 66853A99160E565900FE256C /* AppleSucksDOMImplementation.m */, + 66853A9A160E565900FE256C /* Attr.h */, + 66853A9B160E565900FE256C /* Attr.m */, + 66853A9C160E565900FE256C /* CDATASection.h */, + 66853A9D160E565900FE256C /* CDATASection.m */, + 66853A9E160E565900FE256C /* CharacterData.h */, + 66853A9F160E565900FE256C /* CharacterData.m */, + 66853AA0160E565900FE256C /* Comment.h */, + 66853AA1160E565900FE256C /* Comment.m */, + 66853AA2160E565900FE256C /* Document.h */, + 66853AA3160E565900FE256C /* Document.m */, + 66853AA4160E565900FE256C /* Document+Mutable.h */, + 66853AA5160E565900FE256C /* DocumentFragment.h */, + 66853AA6160E565900FE256C /* DocumentFragment.m */, + 66853AA7160E565900FE256C /* DocumentType.h */, + 66853AA8160E565900FE256C /* DocumentType.m */, + 66853AA9160E565900FE256C /* Element.h */, + 66853AAA160E565900FE256C /* Element.m */, + 66853AAB160E565900FE256C /* EntityReference.h */, + 66853AAC160E565900FE256C /* EntityReference.m */, + 66853AAD160E565900FE256C /* NamedNodeMap.h */, + 66853AAE160E565900FE256C /* NamedNodeMap.m */, + 66853AAF160E565900FE256C /* Node.h */, + 66853AB0160E565900FE256C /* Node.m */, + 66853AB1160E565900FE256C /* Node+Mutable.h */, + 66853AB2160E565900FE256C /* NodeList.h */, + 66853AB3160E565900FE256C /* NodeList.m */, + 66853AB4160E565900FE256C /* NodeList+Mutable.h */, + 66853AB5160E565900FE256C /* ProcessingInstruction.h */, + 66853AB6160E565900FE256C /* ProcessingInstruction.m */, + 66853AB7160E565900FE256C /* Text.h */, + 66853AB8160E565900FE256C /* Text.m */, ); path = "Core DOM"; sourceTree = ""; @@ -490,21 +488,23 @@ 669471661574221200EA533D /* SVG-DOM */ = { isa = PBXGroup; children = ( - 66CBCAB015B3696E00C36B57 /* SVGAngle.h */, - 66CBCAB115B3696E00C36B57 /* SVGAngle.m */, - 66CBCAB215B3696E00C36B57 /* SVGDocument_Mutable.h */, - 66CBCAB515B3696E00C36B57 /* SVGMatrix.h */, - 66CBCAB615B3696E00C36B57 /* SVGMatrix.m */, - 66CBCAB715B3696E00C36B57 /* SVGNumber.h */, - 66CBCAB815B3696E00C36B57 /* SVGPoint.h */, - 66CBCAB915B3696E00C36B57 /* SVGPoint.m */, - 66CBCABA15B3696E00C36B57 /* SVGRect.h */, - 66CBCABB15B3696E00C36B57 /* SVGSVGElement_Mutable.h */, - 66CBCABC15B3696E00C36B57 /* SVGTransform.h */, - 66CBCABD15B3696E00C36B57 /* SVGTransform.m */, - 66CBCABE15B3696E00C36B57 /* SVGViewSpec.h */, - 669471671574221200EA533D /* SVGDocument.h */, - 669471681574221200EA533D /* SVGDocument.m */, + 66853AC8160E566500FE256C /* SVGAngle.h */, + 66853AC9160E566500FE256C /* SVGAngle.m */, + 66853ACA160E566500FE256C /* SVGDocument_Mutable.h */, + 66853ACB160E566500FE256C /* SVGDocument.h */, + 66853ACC160E566500FE256C /* SVGDocument.m */, + 66853ACD160E566500FE256C /* SVGLength.h */, + 66853ACE160E566500FE256C /* SVGLength.m */, + 66853ACF160E566500FE256C /* SVGMatrix.h */, + 66853AD0160E566500FE256C /* SVGMatrix.m */, + 66853AD1160E566500FE256C /* SVGNumber.h */, + 66853AD2160E566500FE256C /* SVGPoint.h */, + 66853AD3160E566500FE256C /* SVGPoint.m */, + 66853AD4160E566500FE256C /* SVGRect.h */, + 66853AD5160E566500FE256C /* SVGSVGElement_Mutable.h */, + 66853AD6160E566500FE256C /* SVGTransform.h */, + 66853AD7160E566500FE256C /* SVGTransform.m */, + 66853AD8160E566500FE256C /* SVGViewSpec.h */, ); path = "SVG-DOM"; sourceTree = ""; @@ -512,15 +512,15 @@ 669471891574221200EA533D /* Parsing */ = { isa = PBXGroup; children = ( - 6694718A1574221200EA533D /* SVGKParseResult.h */, - 6694718B1574221200EA533D /* SVGKParseResult.m */, - 6694718C1574221200EA533D /* SVGKParserExtension.h */, - 66CBCAC715B369AA00C36B57 /* SVGKParserPatternsAndGradients.h */, - 66CBCAC815B369AA00C36B57 /* SVGKParserPatternsAndGradients.m */, - 6694718D1574221200EA533D /* SVGKParserSVG.h */, - 6694718E1574221200EA533D /* SVGKParserSVG.m */, - 6694718F1574221200EA533D /* SVGKPointsAndPathsParser.h */, - 669471901574221200EA533D /* SVGKPointsAndPathsParser.m */, + 66853B1A160E569A00FE256C /* SVGKParseResult.h */, + 66853B1B160E569A00FE256C /* SVGKParseResult.m */, + 66853B1C160E569A00FE256C /* SVGKParserExtension.h */, + 66853B1D160E569A00FE256C /* SVGKParserPatternsAndGradients.h */, + 66853B1E160E569A00FE256C /* SVGKParserPatternsAndGradients.m */, + 66853B1F160E569A00FE256C /* SVGKParserSVG.h */, + 66853B20160E569A00FE256C /* SVGKParserSVG.m */, + 66853B21160E569A00FE256C /* SVGKPointsAndPathsParser.h */, + 66853B22160E569A00FE256C /* SVGKPointsAndPathsParser.m */, ); path = Parsing; sourceTree = ""; @@ -604,64 +604,62 @@ buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 66CBCA8415B368F300C36B57 /* CGPathAdditions.m in Sources */, - 66CBCA8515B368F300C36B57 /* SVGUtils.m in Sources */, - 66CBCA8615B3694A00C36B57 /* Attr.m in Sources */, - 66CBCA8715B3694A00C36B57 /* CDATASection.m in Sources */, - 66CBCA8815B3694A00C36B57 /* CharacterData.m in Sources */, - 66CBCA8915B3694A00C36B57 /* Comment.m in Sources */, - 66CBCA8A15B3694A00C36B57 /* Document.m in Sources */, - 66CBCA8B15B3694A00C36B57 /* DocumentFragment.m in Sources */, - 66CBCA8C15B3694A00C36B57 /* DocumentType.m in Sources */, - 66CBCA8E15B3694A00C36B57 /* Element.m in Sources */, - 66CBCA8F15B3694A00C36B57 /* EntityReference.m in Sources */, - 66CBCA9015B3694A00C36B57 /* NamedNodeMap.m in Sources */, - 66CBCA9115B3694A00C36B57 /* Node.m in Sources */, - 66CBCA9215B3694A00C36B57 /* NodeList.m in Sources */, - 66CBCA9315B3694A00C36B57 /* ProcessingInstruction.m in Sources */, - 66CBCA9415B3694A00C36B57 /* Text.m in Sources */, - 66CBCA9515B3694A00C36B57 /* SVGDocument.m in Sources */, - 66CBCA9615B3694A00C36B57 /* SVGCircleElement.m in Sources */, - 66CBCA9715B3694A00C36B57 /* SVGDefsElement.m in Sources */, - 66CBCA9815B3694A00C36B57 /* SVGDescriptionElement.m in Sources */, - 66CBCA9915B3694A00C36B57 /* SVGElement.m in Sources */, - 66CBCA9A15B3694A00C36B57 /* SVGEllipseElement.m in Sources */, - 66CBCA9B15B3694B00C36B57 /* SVGGroupElement.m in Sources */, - 66CBCA9C15B3694B00C36B57 /* SVGImageElement.m in Sources */, - 66CBCA9D15B3694B00C36B57 /* SVGLineElement.m in Sources */, - 66CBCA9E15B3694B00C36B57 /* SVGPathElement.m in Sources */, - 66CBCA9F15B3694B00C36B57 /* SVGPolygonElement.m in Sources */, - 66CBCAA015B3694B00C36B57 /* SVGPolylineElement.m in Sources */, - 66CBCAA115B3694B00C36B57 /* SVGRectElement.h in Sources */, - 66CBCAA215B3694B00C36B57 /* SVGShapeElement.m in Sources */, - 66CBCAA315B3694B00C36B57 /* SVGSVGElement.m in Sources */, - 66CBCAA415B3694B00C36B57 /* SVGTextElement.m in Sources */, - 66CBCAA515B3694B00C36B57 /* SVGTitleElement.m in Sources */, - 66CBCAA615B3694B00C36B57 /* SVGKParseResult.m in Sources */, - 66CBCAA715B3694B00C36B57 /* SVGKParserSVG.m in Sources */, - 66CBCAA815B3694B00C36B57 /* SVGKPointsAndPathsParser.m in Sources */, - 66CBCAA915B3694B00C36B57 /* SKBasicDataTypes.m in Sources */, - 66CBCAAA15B3694B00C36B57 /* SVGKImage.m in Sources */, - 66CBCAAB15B3694B00C36B57 /* SVGKImage+SVGPathView.m in Sources */, - 66CBCAAC15B3694B00C36B57 /* SVGKParser.m in Sources */, - 66CBCAAD15B3694B00C36B57 /* SVGKPattern.m in Sources */, - 66CBCAAE15B3694B00C36B57 /* SVGKSource.m in Sources */, - 66CBCAAF15B3694B00C36B57 /* SVGKView.m in Sources */, - 66CBCABF15B3696E00C36B57 /* SVGAngle.m in Sources */, - 66CBCAC115B3696E00C36B57 /* SVGMatrix.m in Sources */, - 66CBCAC215B3696E00C36B57 /* SVGPoint.m in Sources */, - 66CBCAC315B3696E00C36B57 /* SVGTransform.m in Sources */, - 66CBCAC615B3699000C36B57 /* SVGKParserStackItem.m in Sources */, - 66CBCAC915B369AA00C36B57 /* SVGKParserPatternsAndGradients.m in Sources */, - 66CBCACA15B36A4000C36B57 /* CALayerWithChildHitTest.m in Sources */, - 66CBCACB15B36A4300C36B57 /* CAShapeLayerWithHitTest.m in Sources */, - 66CBCACC15B36A4700C36B57 /* SVGPathView.m in Sources */, - 66CBCACD15B36A5A00C36B57 /* SVGRectElement.m in Sources */, - 662D1A2115B36C270027D07B /* AppleSucksDOMImplementation.m in Sources */, 662D1A2215B36C800027D07B /* RootViewController.m in Sources */, 662D1A2315B36C830027D07B /* SVGPadAppDelegate.m in Sources */, 662D1A2415B36C890027D07B /* DetailViewController.m in Sources */, 662D1A2515B36C9C0027D07B /* CALayerExporter.m in Sources */, + 66853A90160E561C00FE256C /* CGPathAdditions.m in Sources */, + 66853A91160E561C00FE256C /* SVGKImage.m in Sources */, + 66853A92160E561C00FE256C /* SVGKImage+SVGPathView.m in Sources */, + 66853A93160E561C00FE256C /* SVGKParser.m in Sources */, + 66853A94160E561C00FE256C /* SVGKPattern.m in Sources */, + 66853A95160E561C00FE256C /* SVGKSource.m in Sources */, + 66853A96160E561C00FE256C /* SVGKView.m in Sources */, + 66853A97160E561C00FE256C /* SVGUtils.m in Sources */, + 66853AB9160E565900FE256C /* AppleSucksDOMImplementation.m in Sources */, + 66853ABA160E565900FE256C /* Attr.m in Sources */, + 66853ABB160E565900FE256C /* CDATASection.m in Sources */, + 66853ABC160E565900FE256C /* CharacterData.m in Sources */, + 66853ABD160E565900FE256C /* Comment.m in Sources */, + 66853ABE160E565900FE256C /* Document.m in Sources */, + 66853ABF160E565900FE256C /* DocumentFragment.m in Sources */, + 66853AC0160E565900FE256C /* DocumentType.m in Sources */, + 66853AC1160E565900FE256C /* Element.m in Sources */, + 66853AC2160E565900FE256C /* EntityReference.m in Sources */, + 66853AC3160E565900FE256C /* NamedNodeMap.m in Sources */, + 66853AC4160E565900FE256C /* Node.m in Sources */, + 66853AC5160E565900FE256C /* NodeList.m in Sources */, + 66853AC6160E565900FE256C /* ProcessingInstruction.m in Sources */, + 66853AC7160E565900FE256C /* Text.m in Sources */, + 66853AD9160E566500FE256C /* SVGAngle.m in Sources */, + 66853ADA160E566500FE256C /* SVGDocument.m in Sources */, + 66853ADB160E566500FE256C /* SVGLength.m in Sources */, + 66853ADC160E566500FE256C /* SVGMatrix.m in Sources */, + 66853ADD160E566500FE256C /* SVGPoint.m in Sources */, + 66853ADE160E566500FE256C /* SVGTransform.m in Sources */, + 66853B01160E567300FE256C /* SVGCircleElement.m in Sources */, + 66853B02160E567300FE256C /* SVGDefsElement.m in Sources */, + 66853B03160E567300FE256C /* SVGDescriptionElement.m in Sources */, + 66853B04160E567300FE256C /* SVGElement.m in Sources */, + 66853B05160E567300FE256C /* SVGEllipseElement.m in Sources */, + 66853B06160E567300FE256C /* SVGGroupElement.m in Sources */, + 66853B07160E567300FE256C /* SVGImageElement.m in Sources */, + 66853B08160E567300FE256C /* SVGLineElement.m in Sources */, + 66853B09160E567300FE256C /* SVGPathElement.m in Sources */, + 66853B0A160E567300FE256C /* SVGPolygonElement.m in Sources */, + 66853B0B160E567300FE256C /* SVGPolylineElement.m in Sources */, + 66853B0C160E567300FE256C /* SVGRectElement.m in Sources */, + 66853B0D160E567300FE256C /* SVGShapeElement.m in Sources */, + 66853B0E160E567300FE256C /* SVGSVGElement.m in Sources */, + 66853B0F160E567300FE256C /* SVGTextElement.m in Sources */, + 66853B10160E567300FE256C /* SVGTitleElement.m in Sources */, + 66853B17160E568200FE256C /* CALayerWithChildHitTest.m in Sources */, + 66853B18160E568200FE256C /* CAShapeLayerWithHitTest.m in Sources */, + 66853B19160E568200FE256C /* SVGPathView.m in Sources */, + 66853B23160E569A00FE256C /* SVGKParseResult.m in Sources */, + 66853B24160E569A00FE256C /* SVGKParserPatternsAndGradients.m in Sources */, + 66853B25160E569A00FE256C /* SVGKParserSVG.m in Sources */, + 66853B26160E569A00FE256C /* SVGKPointsAndPathsParser.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From b7ecd72ea8e4c300fd64b5c50bfa8efd65c18f19 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Sep 2012 10:07:25 +0100 Subject: [PATCH 071/110] FIXED: Most SVG's now render again BROKEN: huge SVG's are not rendering (probably I've still got the viewport-change-handling code commented out?) BROKEN: Monkey sample SVG has his offsets wrong - his face is pushed to the right, and his head wobbles around a corner instead of around the center --- Core/DOM classes/Core DOM/Element.m | 11 ++++++++++- Core/DOM classes/SVGElement.m | 5 +++++ Core/DOM classes/SVGEllipseElement.m | 4 ++++ Core/DOM classes/SVGGroupElement.m | 1 + Core/DOM classes/SVGImageElement.m | 5 +++++ Core/DOM classes/SVGLineElement.m | 4 ++++ Core/DOM classes/SVGRectElement.m | 6 ++++++ Core/DOM classes/SVGSVGElement.m | 3 +++ Core/DOM classes/SVGShapeElement.m | 4 +++- Core/DOM classes/SVGTextElement.m | 2 ++ .../SVGPadDemo/SVGPad.xcodeproj/project.pbxproj | 2 +- 11 files changed, 44 insertions(+), 3 deletions(-) diff --git a/Core/DOM classes/Core DOM/Element.m b/Core/DOM classes/Core DOM/Element.m index 3b0c45f65..19ad0cea5 100644 --- a/Core/DOM classes/Core DOM/Element.m +++ b/Core/DOM classes/Core DOM/Element.m @@ -47,9 +47,18 @@ - (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attri return self; } - -(NSString*) getAttribute:(NSString*) name { + /** + WARNING: the definition in the spec WILL CORRUPT all Objective-C code. + + The spec - instead of defining 'nil' - defines "" (empty string) as the + correct response. + + But in most of the modern, C-based, (non-scripting) languages, "" means 0. + + Very dangerous! + */ Attr* result = (Attr*) [self.attributes getNamedItem:name]; if( result == nil || result.value == nil ) diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index f0d4a99a4..88e3a9faa 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -174,6 +174,8 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { NSString* command = [transformString substringToIndex:loc.location]; NSArray* parameterStrings = [[transformString substringFromIndex:loc.location+1] componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@","]]; + command = [command stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@" "]]; + if( [command isEqualToString:@"translate"] ) { CGFloat xtrans = [(NSString*)[parameterStrings objectAtIndex:0] floatValue]; @@ -259,6 +261,9 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { } else { + NSLog(@"command = '%@' ... scale = 'scale'", command); + BOOL isScale = [command isEqualToString:@"scale"]; + NSAssert( FALSE, @"Not implemented yet: transform = %@ %@", command, transformString ); } }]; diff --git a/Core/DOM classes/SVGEllipseElement.m b/Core/DOM classes/SVGEllipseElement.m index 1ba182765..5a2cdb51a 100644 --- a/Core/DOM classes/SVGEllipseElement.m +++ b/Core/DOM classes/SVGEllipseElement.m @@ -26,12 +26,16 @@ @implementation SVGEllipseElement - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"cx"] length] > 0 ) self.cx = [[self getAttribute:@"cx"] floatValue]; + if( [[self getAttribute:@"cy"] length] > 0 ) self.cy = [[self getAttribute:@"cy"] floatValue]; + if( [[self getAttribute:@"rx"] length] > 0 ) self.rx = [[self getAttribute:@"rx"] floatValue]; + if( [[self getAttribute:@"ry"] length] > 0 ) self.ry = [[self getAttribute:@"ry"] floatValue]; if( [[self getAttribute:@"r"] length] > 0 ) { // circle diff --git a/Core/DOM classes/SVGGroupElement.m b/Core/DOM classes/SVGGroupElement.m index 0cd1a27f6..7664365a4 100644 --- a/Core/DOM classes/SVGGroupElement.m +++ b/Core/DOM classes/SVGGroupElement.m @@ -32,6 +32,7 @@ - (void)loadDefaults { - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"opacity"] length] > 0 ) _opacity = [[self getAttribute:@"opacity"] floatValue]; } diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 331cf889d..5c4585d2f 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -55,14 +55,19 @@ - (void)dealloc { - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"x"] length] > 0 ) _x = [[self getAttribute:@"x"] floatValue]; + if( [[self getAttribute:@"y"] length] > 0 ) _y = [[self getAttribute:@"y"] floatValue]; + if( [[self getAttribute:@"width"] length] > 0 ) _width = [[self getAttribute:@"width"] floatValue]; + if( [[self getAttribute:@"height"] length] > 0 ) _height = [[self getAttribute:@"height"] floatValue]; + if( [[self getAttribute:@"href"] length] > 0 ) self.href = [self getAttribute:@"href"]; } diff --git a/Core/DOM classes/SVGLineElement.m b/Core/DOM classes/SVGLineElement.m index f83a8ad84..2dabc15f4 100644 --- a/Core/DOM classes/SVGLineElement.m +++ b/Core/DOM classes/SVGLineElement.m @@ -19,12 +19,16 @@ @implementation SVGLineElement - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"x1"] length] > 0 ) _x1 = [[self getAttribute:@"x1"] floatValue]; + if( [[self getAttribute:@"y1"] length] > 0 ) _y1 = [[self getAttribute:@"y1"] floatValue]; + if( [[self getAttribute:@"x2"] length] > 0 ) _x2 = [[self getAttribute:@"x2"] floatValue]; + if( [[self getAttribute:@"y2"] length] > 0 ) _y2 = [[self getAttribute:@"y2"] floatValue]; CGMutablePathRef path = CGPathCreateMutable(); diff --git a/Core/DOM classes/SVGRectElement.m b/Core/DOM classes/SVGRectElement.m index 7924236d2..d0b900eb5 100644 --- a/Core/DOM classes/SVGRectElement.m +++ b/Core/DOM classes/SVGRectElement.m @@ -58,16 +58,22 @@ void CGPathAddRoundedRect (CGMutablePathRef path, CGRect rect, CGFloat radius) { - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"x"] length] > 0 ) _x = [[self getAttribute:@"x"] floatValue]; + if( [[self getAttribute:@"y"] length] > 0 ) _y = [[self getAttribute:@"y"] floatValue]; + if( [[self getAttribute:@"width"] length] > 0 ) _width = [[self getAttribute:@"width"] floatValue]; + if( [[self getAttribute:@"height"] length] > 0 ) _height = [[self getAttribute:@"height"] floatValue]; + if( [[self getAttribute:@"rx"] length] > 0 ) _rx = [[self getAttribute:@"rx"] floatValue]; + if( [[self getAttribute:@"ry"] length] > 0 ) _ry = [[self getAttribute:@"ry"] floatValue]; CGMutablePathRef path = CGPathCreateMutable(); diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index d8410114f..ff22b0503 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -84,6 +84,9 @@ -(Element*) getElementById:(NSString*) elementId { NSAssert( FALSE, @"Not implem - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + NSAssert( [[self getAttribute:@"width"] length] > 0, @"Not supported yet: tag that is missing an explicit width attribute"); + NSAssert( [[self getAttribute:@"height"] length] > 0, @"Not supported yet: tag that is missing an explicit height attribute"); + self.width = [SVGLength svgLengthFromNSString:[self getAttribute:@"width"]]; self.height = [SVGLength svgLengthFromNSString:[self getAttribute:@"height"]]; diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 5453ca952..437e4ebc3 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -52,6 +52,7 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"opacity"] length] > 0 ) _opacity = [[self getAttribute:@"opacity"] floatValue]; if ([[self getAttribute:@"fill"] length] > 0 ) { @@ -70,7 +71,8 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult } } - _strokeWidth = [[self getAttribute:@"stroke-width"] floatValue]; + if( [[self getAttribute:@"stroke-width"] length] > 0 ) + _strokeWidth = [[self getAttribute:@"stroke-width"] floatValue]; if ( [[self getAttribute:@"stroke"] length] > 0 ) { const char *cvalue = [[self getAttribute:@"stroke"] UTF8String]; diff --git a/Core/DOM classes/SVGTextElement.m b/Core/DOM classes/SVGTextElement.m index 56efa4cca..01b8ea8d0 100644 --- a/Core/DOM classes/SVGTextElement.m +++ b/Core/DOM classes/SVGTextElement.m @@ -35,8 +35,10 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { [super postProcessAttributesAddingErrorsTo:parseResult]; + if( [[self getAttribute:@"x"] length] > 0 ) _x = [[self getAttribute:@"x"] floatValue]; + if( [[self getAttribute:@"y"] length] > 0 ) _y = [[self getAttribute:@"y"] floatValue]; // TODO: class diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj index ca3572ade..ff2afeebc 100755 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj @@ -190,7 +190,7 @@ 66853AE4160E567300FE256C /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; 66853AE5160E567300FE256C /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; 66853AE6160E567300FE256C /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 66853AE7160E567300FE256C /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 66853AE7160E567300FE256C /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 66853AE8160E567300FE256C /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; 66853AE9160E567300FE256C /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; 66853AEA160E567300FE256C /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; From 3ad765d6515450bdff5f28f685a516912ab546ee Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Sep 2012 10:41:39 +0100 Subject: [PATCH 072/110] FIXED: all HUGE SVG's that use viewports / viewboxes to shrink themselves now render correctly BROKEN: the ONLY failing sample file - that was previously working - is the Monkey, which still has its transforms / offsets slightly wrong --- Core/DOM classes/SVGElement.m | 37 ++++++++++++++++++++++++++------ Core/DOM classes/SVGSVGElement.m | 3 ++- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Core/DOM classes/SVGElement.m b/Core/DOM classes/SVGElement.m index 88e3a9faa..af9912fdb 100644 --- a/Core/DOM classes/SVGElement.m +++ b/Core/DOM classes/SVGElement.m @@ -48,11 +48,33 @@ + (BOOL)shouldStoreContent { NB: by definition, tags MAY NOT have a width, but they are still viewports */ -(void) reCalculateAndSetViewportElementReferenceUsingFirstSVGAncestor:(SVGElement*) firstAncestor { - if( [self.tagName isEqualToString:@"svg"] // if its the tag, its automatically the viewportElement - || [self.attributes getNamedItem:@"width"] != nil ) + // NB the root svg element IS a viewport, but SVG Spec defines it as NOT a viewport, and so we will overwrite this later + BOOL isTagAllowedToBeAViewport = [self.tagName isEqualToString:@"svg"] || [self.tagName isEqualToString:@"image"] || [self.tagName isEqualToString:@"foreignObject"]; + + BOOL isTagDefiningAViewport = [self.attributes getNamedItem:@"width"] != nil || [self.attributes getNamedItem:@"height"] != nil; + + if( isTagAllowedToBeAViewport && isTagDefiningAViewport ) + { + NSLog(@"[%@] WARNING: setting self (tag = %@) to be a viewport", [self class], self.tagName ); self.viewportElement = self; + } else - self.viewportElement = firstAncestor.viewportElement; + { + SVGElement* ancestorsViewport = firstAncestor.viewportElement; + + if( ancestorsViewport == nil ) + { + /** + Because of the poorly-designed SVG Spec on Viewports, all the children of the root + SVG node will find that their ancestor has a nil viewport! (this is defined in the spec) + + So, in that special case, we INSTEAD guess that the ancestor itself was the viewport... + */ + self.viewportElement = firstAncestor; + } + else + self.viewportElement = ancestorsViewport; + } } /*! Override so that we can automatically set / unset the ownerSVGElement and viewportElement properties, @@ -103,6 +125,8 @@ But if there are custom nodes in there (any other DOM node, for instance), it ge self.rootOfCurrentDocumentFragment = firstAncestorThatIsAnyKindOfSVGElement.rootOfCurrentDocumentFragment; [self reCalculateAndSetViewportElementReferenceUsingFirstSVGAncestor:firstAncestorThatIsAnyKindOfSVGElement]; + + NSLog(@"viewport Element = %@ ... for node/element = %@", self.viewportElement, self.tagName); } } } @@ -261,9 +285,6 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { } else { - NSLog(@"command = '%@' ... scale = 'scale'", command); - BOOL isScale = [command isEqualToString:@"scale"]; - NSAssert( FALSE, @"Not implemented yet: transform = %@ %@", command, transformString ); } }]; @@ -309,7 +330,9 @@ -(CGAffineTransform) transformAbsolute selfRelativeTransform = self.transformRelative; /** VIEWPORT relative */ - if( self.viewportElement != self ) + if( self.viewportElement != nil // if it's nil, it means THE OPPOSITE of what you'd expect - it means that it IS the viewport element - SVG Spec REQUIRES this + && self.viewportElement != self // if it's some-other-object, then: we simply don't need to worry about it + ) optionalViewportTransform = CGAffineTransformIdentity; else { diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index ff22b0503..f5c91c4f1 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -91,7 +91,8 @@ - (void)postProcessAttributesAddingErrorsTo:(SVGKParseResult *)parseResult { self.height = [SVGLength svgLengthFromNSString:[self getAttribute:@"height"]]; - if( [[self getAttribute:@"viewBox"] length] > 0 ) { + if( [[self getAttribute:@"viewBox"] length] > 0 ) + { NSArray* boxElements = [[self getAttribute:@"viewBox"] componentsSeparatedByString:@" "]; _viewBoxFrame = CGRectMake([[boxElements objectAtIndex:0] floatValue], [[boxElements objectAtIndex:1] floatValue], [[boxElements objectAtIndex:2] floatValue], [[boxElements objectAtIndex:3] floatValue]); From 893f34bb7160acd71634ce0f93725fc4931fa99b Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Sep 2012 13:02:37 +0100 Subject: [PATCH 073/110] FIXED: stroke-widths were being incorrectly scaled (now scaling correctly) --- Core/DOM classes/SVGShapeElement.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index 437e4ebc3..b167d6f43 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -157,9 +157,9 @@ - (CALayer *) newLayer /* We have to apply any scale-factor part of the affine transform to the stroke itself (this is bizarre and horrible, yes, but that's the spec for you!) */ - CGPoint fakePoint = CGPointMake( _strokeWidth, 0); - fakePoint = CGPointApplyAffineTransform( fakePoint, transformAbsolute ); - _shapeLayer.lineWidth = fakePoint.x; + CGSize fakeSize = CGSizeMake( _strokeWidth, 0 ); + fakeSize = CGSizeApplyAffineTransform( fakeSize, transformAbsolute ); + _shapeLayer.lineWidth = fakeSize.width; _shapeLayer.strokeColor = CGColorWithSVGColor(_strokeColor); } From f7585670186287e1ece153eadf3ee55474d0334a Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Sep 2012 14:05:12 +0100 Subject: [PATCH 074/110] CHANGED: added small changes that SHOULD make strokes marked "none" NOT render - but Apple is rendering them anyway --- Core/DOM classes/Core DOM/Node.m | 2 +- Core/DOM classes/SVGShapeElement.m | 5 +++++ Core/SVGKImage.m | 22 +--------------------- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/Core/DOM classes/Core DOM/Node.m b/Core/DOM classes/Core DOM/Node.m index 1eba9ad79..9a963048f 100644 --- a/Core/DOM classes/Core DOM/Node.m +++ b/Core/DOM classes/Core DOM/Node.m @@ -313,7 +313,7 @@ -(NSString *)description default: nodeTypeName = @"N/A (DATA IS MISSING FROM NODE INSTANCE)"; } - return [NSString stringWithFormat:@"Node: %@ (%@) @@%ld attributes + %ld x children", self.nodeName, nodeTypeName, self.attributes.length, self.childNodes.length]; + return [NSString stringWithFormat:@"Node: %@ (%@) value:[%@] @@%ld attributes + %ld x children", self.nodeName, nodeTypeName, [self.nodeValue length]<11 ? self.nodeValue : [NSString stringWithFormat:@"%@...",[self.nodeValue substringToIndex:10]], self.attributes.length, self.childNodes.length]; } @end diff --git a/Core/DOM classes/SVGShapeElement.m b/Core/DOM classes/SVGShapeElement.m index b167d6f43..c3acbc4b2 100644 --- a/Core/DOM classes/SVGShapeElement.m +++ b/Core/DOM classes/SVGShapeElement.m @@ -162,6 +162,11 @@ - (CALayer *) newLayer _shapeLayer.lineWidth = fakeSize.width; _shapeLayer.strokeColor = CGColorWithSVGColor(_strokeColor); } + else + { + _shapeLayer.strokeColor = nil; // This is how you tell Apple that the stroke is disabled; a strokewidth of 0 will NOT achieve this + _shapeLayer.lineWidth = 0.0f; // MUST set this explicitly, or Apple assumes 1.0 + } if (_fillType == SVGFillTypeNone) { _shapeLayer.fillColor = nil; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index b2ecb5261..78382cb74 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -286,7 +286,6 @@ -(CALayer*) newCopyPositionedAbsoluteLayerWithIdentifier:(NSString *)identifier - (CALayer *)newLayerWithElement:(SVGElement *)element { - CALayer *layer = [element newLayer]; NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@ frame:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), NSStringFromCGRect( layer.frame ), element.identifier); @@ -295,11 +294,6 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element return layer; } - /** - TODO / FIXME: at this point, we should also detect if anything in the current SVGElement ("element") has - changed the viewBox - if it has, we should modify the "preTransform" before applying it to sub-nodes / child - nodes - */ for (SVGElement *child in element.childNodes ) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { @@ -313,8 +307,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element } } - //ADAM: no explanation for WTF this if statement is for! : if (element != self.DOMTree) - [element layoutLayer:layer]; + [element layoutLayer:layer]; [layer setNeedsDisplay]; @@ -327,19 +320,6 @@ -(CALayer *)newCALayerTree return nil; else { - /**** - - delete all this if it works without it - - CGAffineTransform preTransform = CGAffineTransformIdentity; - - // TODO: calc the correct transform! - CGRect frameViewBox = self.DOMTree.viewBoxFrame; - CGRect frameImage = CGRectMake(0,0, [self.DOMTree.width pixelsValue], [self.DOMTree.height pixelsValue] ); - - if( ! CGRectIsEmpty( frameViewBox ) ) - preTransform = CGAffineTransformMakeScale( frameImage.size.width / frameViewBox.size.width, frameImage.size.height / frameViewBox.size.height); - */ return [self newLayerWithElement:self.DOMTree]; } } From c86a98514e07367a94d8e4d1314626568799c751 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 27 Sep 2012 15:14:50 +0100 Subject: [PATCH 075/110] ADDED: a new XcodeProj that ONLY BUILDS the iOS static library (reduces conflicts when building) --- Core/DOM classes/Core DOM/Document.m | 8 +- Core/DOM classes/SVG-DOM/SVGLength.m | 4 +- Core/DOM classes/SVGPolygonElement.m | 2 +- Core/DOM classes/SVGSVGElement.m | 2 +- Core/SVGKImage.m | 2 +- Core/SVGKImageView.h | 31 + Core/SVGKImageView.m | 56 ++ Core/SVGKParser.m | 13 +- Core/SVGKSource.h | 19 +- Core/SVGKSource.m | 57 +- .../SVGKit-iOS.xcodeproj/project.pbxproj | 822 ++++++++++++++++++ .../SVGKit-iOS/SVGKit-iOS-Prefix.pch | 7 + 12 files changed, 989 insertions(+), 34 deletions(-) create mode 100755 Core/SVGKImageView.h create mode 100755 Core/SVGKImageView.m create mode 100644 XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj create mode 100644 XCodeProjects/SVGKit-iOS/SVGKit-iOS/SVGKit-iOS-Prefix.pch diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index 74f0cc724..b362888d0 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -21,7 +21,7 @@ -(Element*) createElement:(NSString*) tagName NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); - return newElement; + return newElement; /** NOTE: clang says this is a leak - it is NOT, it is a REQUIRED RETAIN COUNT, as per SVG Spec */ } -(DocumentFragment*) createDocumentFragment @@ -62,7 +62,7 @@ -(EntityReference*) createEntityReference:(NSString*) data -(NodeList*) getElementsByTagName:(NSString*) data { - NodeList* accumulator = [[NodeList alloc] init]; + NodeList* accumulator = [[[NodeList alloc] init] autorelease]; [self privateGetElementsByName:data inNamespace:nil childrenOfElement:self.documentElement addToList:accumulator]; return accumulator; @@ -82,7 +82,7 @@ -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) q NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); - return newElement; + return newElement; /** NOTE: clang says this is a leak - it is NOT, it is a REQUIRED RETAIN COUNT, as per SVG Spec */ } // Introduced in DOM Level 2: @@ -96,7 +96,7 @@ -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qu // Introduced in DOM Level 2: -(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName { - NodeList* accumulator = [[NodeList alloc] init]; + NodeList* accumulator = [[[NodeList alloc] init] autorelease]; [self privateGetElementsByName:localName inNamespace:namespaceURI childrenOfElement:self.documentElement addToList:accumulator]; return accumulator; diff --git a/Core/DOM classes/SVG-DOM/SVGLength.m b/Core/DOM classes/SVG-DOM/SVGLength.m index 3f14b3442..d95d61302 100644 --- a/Core/DOM classes/SVG-DOM/SVGLength.m +++ b/Core/DOM classes/SVG-DOM/SVGLength.m @@ -19,7 +19,7 @@ -(void) convertToSpecifiedUnits:(SVG_LENGTH_TYPE) unitType +(SVGLength*) svgLengthZero { - SVGLength* result = [SVGLength new]; + SVGLength* result = [[SVGLength new] autorelease]; result.value = 0.0f; return result; @@ -27,7 +27,7 @@ +(SVGLength*) svgLengthZero +(SVGLength*) svgLengthFromNSString:(NSString*) s { - SVGLength* result = [SVGLength new]; + SVGLength* result = [[SVGLength new] autorelease]; result.value = [s floatValue]; diff --git a/Core/DOM classes/SVGPolygonElement.m b/Core/DOM classes/SVGPolygonElement.m index 9660feedf..2d1afd348 100644 --- a/Core/DOM classes/SVGPolygonElement.m +++ b/Core/DOM classes/SVGPolygonElement.m @@ -53,7 +53,7 @@ - (void)parseData:(NSString *)data isRelative:FALSE]; - lastCoordinate = [SVGKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:@"z"] + [SVGKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:@"z"] path:path relativeTo:lastCoordinate]; diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index f5c91c4f1..3e7e786f2 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -64,7 +64,7 @@ -(SVGNumber) createSVGNumber } -(SVGLength*) createSVGLength { - return [SVGLength new]; + return [SVGLength new]; /** NOTE: clang says this is a leak - it is NOT, it is a REQUIRED RETAIN COUNT, as per SVG Spec */ } -(SVGAngle*) createSVGAngle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } -(SVGPoint*) createSVGPoint { NSAssert( FALSE, @"Not implemented yet" ); return nil; } diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 78382cb74..26c1d4e11 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -241,7 +241,7 @@ - (CALayer *)layerWithIdentifier:(NSString *)identifier layer:(CALayer *)layer { -(CALayer*) newCopyPositionedAbsoluteLayerWithIdentifier:(NSString *)identifier { CALayer* originalLayer = [self layerWithIdentifier:identifier]; - CALayer* clonedLayer = [[[[originalLayer class] alloc] init] autorelease]; + CALayer* clonedLayer = [[[originalLayer class] alloc] init]; clonedLayer.frame = originalLayer.frame; if( [originalLayer isKindOfClass:[CAShapeLayer class]] ) diff --git a/Core/SVGKImageView.h b/Core/SVGKImageView.h new file mode 100755 index 000000000..3d8a297c5 --- /dev/null +++ b/Core/SVGKImageView.h @@ -0,0 +1,31 @@ +#import + +#import "SVGKit.h" + +/** + * ADAM: SVGKit's version of UIImageView - with some improvements over Apple's design + + Basic usage: + - as per UIImageView, simpy: + - SVGKImageView *skv = [[SVGKImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"image.svg"]]; + - [self.view addSubview: skv]; + + Advanced usage: + - to make the contents shrink to half their actual size, set self.scaleMultiplier = CGSizeMake( 0.5f, 0.5f ); + NOTE: I'd prefer to do this view UIViewContentMode, but Apple didn't make it extensible + - to make the contents "tile" to fill the frame of the ImageView, set self.tileContents = TRUE; + + Performance: + - NOTE: the way this works - calling Apple's renderInContext: method - MAY BE artificially slow, because of Apple's implementation + - NOTE: you MUST NOT call SVGKImage.CALayerTree.transform - that will have unexpected side-effects, because of Apple's implementation + (hence: we currently use renderInContext:, even though we'd prefer not to :( ) + */ +@interface SVGKImageView : UIView + +@property(nonatomic,retain) SVGKImage* image; +@property(nonatomic) CGSize scaleMultiplier; +@property(nonatomic) BOOL tileContents; + +- (id)initWithSVGKImage:(SVGKImage*) im; + +@end diff --git a/Core/SVGKImageView.m b/Core/SVGKImageView.m new file mode 100755 index 000000000..faf653541 --- /dev/null +++ b/Core/SVGKImageView.m @@ -0,0 +1,56 @@ +#import "SVGKImageView.h" + +@implementation SVGKImageView + +@synthesize image; +@synthesize scaleMultiplier; +@synthesize tileContents; + +- (id)init +{ + NSAssert(false, @"init not supported, use initWithSVGKImage:"); + + return nil; +} + +- (id)initWithSVGKImage:(SVGKImage*) im +{ + self = [super init]; + if (self) + { + self.image = im; + self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image + self.scaleMultiplier = CGSizeMake(1.0, 1.0); + self.backgroundColor = [UIColor clearColor]; + } + return self; +} + +-(void)drawRect:(CGRect)rect +{ + CGRect imageFrameAtZero = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); + CGRect scaledImageFrame = CGRectApplyAffineTransform( imageFrameAtZero, CGAffineTransformMakeScale( self.scaleMultiplier.width, self.scaleMultiplier.height)); + + int cols = 1 + self.bounds.size.width / scaledImageFrame.size.width; + int rows = 1 + self.bounds.size.height / scaledImageFrame.size.height; + + if( ! self.tileContents ) + cols = rows = 1; + + /** To support tiling, and to allow internal shrinking, we use renderInContext */ + CGContextRef context = UIGraphicsGetCurrentContext(); + for( int k=0; k 0 ) { int libXmlParserParseError = xmlParseChunk(ctx, buff, bytesRead, 0); @@ -148,12 +150,13 @@ - (SVGKParseResult*) parseSynchronously break; } - bytesRead = [source handle:handle readNextChunk:(char *)&buff maxBytes:READ_CHUNK_SZ]; + bytesRead = [source reader:reader readNextChunk:(char *)&buff maxBytes:READ_CHUNK_SZ]; } } - [source closeHandle:handle]; // close the handle NO MATTER WHAT - + [source closeReader:reader]; // close the handle NO MATTER WHAT + [reader release]; + if (!currentParseRun.libXMLFailed) xmlParseChunk(ctx, NULL, 0, 1); // EOF diff --git a/Core/SVGKSource.h b/Core/SVGKSource.h index 324983e6e..df13e29b8 100644 --- a/Core/SVGKSource.h +++ b/Core/SVGKSource.h @@ -15,6 +15,19 @@ #import +@interface SVGKSourceReader : NSObject +@end + +@interface SVGKSourceFileReader : SVGKSourceReader +{ + FILE *fileHandle; +} +@end + +@interface SVGKSourceURLReader : SVGKSourceReader +@property(nonatomic,retain) NSData* httpDataFullyDownloaded; +@end + @interface SVGKSource : NSObject @property(nonatomic,retain) NSString* svgLanguageVersion; /*< */ @@ -25,8 +38,8 @@ +(SVGKSource*) sourceFromFilename:(NSString*) p; +(SVGKSource*) sourceFromURL:(NSURL*) u; --(id) newHandle:(NSError**) error; --(void) closeHandle:(id) handle; --(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ; +-(SVGKSourceReader*) newReader:(NSError**) error; +-(void) closeReader:(SVGKSourceReader*) reader; +-(int) reader:(SVGKSourceReader*) reader readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ; @end diff --git a/Core/SVGKSource.m b/Core/SVGKSource.m index 28f9381ec..950db838c 100644 --- a/Core/SVGKSource.m +++ b/Core/SVGKSource.m @@ -1,6 +1,23 @@ #import "SVGKSource.h" +@implementation SVGKSourceFileReader +-(void) setFileHandle:(FILE*) f +{ + fileHandle = f; +} + +-(FILE*) fileHandle +{ + return fileHandle; +} +@end + +@implementation SVGKSourceURLReader +@synthesize httpDataFullyDownloaded; +@end + + @implementation SVGKSource @synthesize svgLanguageVersion; @@ -27,7 +44,7 @@ +(SVGKSource*) sourceFromURL:(NSURL*) u return d; } --(id) newHandle:(NSError**) error +-(SVGKSourceReader*) newReader:(NSError**) error { /** Is this file being loaded from disk? @@ -50,7 +67,7 @@ -(id) newHandle:(NSError**) error NSURLRequest* request = [NSURLRequest requestWithURL:self.URL]; - httpData = [[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error] retain]; + httpData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error]; if( error != nil ) { @@ -58,11 +75,14 @@ -(id) newHandle:(NSError**) error return nil; } - return httpData; + SVGKSourceURLReader* urlReader = [[SVGKSourceURLReader alloc] init]; + urlReader.httpDataFullyDownloaded = httpData; + + return urlReader; } else { - FILE *file; + FILE *file; // C is wonderful (ly obscure, with mem management) const char *cPath = [self.filePath fileSystemRepresentation]; file = fopen(cPath, "r"); @@ -74,12 +94,15 @@ -(id) newHandle:(NSError**) error nil]]; } - return [[NSValue valueWithPointer:file] retain]; // objc cannot cope with using C-pointers as pointers, without some help + SVGKSourceFileReader* fileReader = [[SVGKSourceFileReader alloc] init]; + fileReader.fileHandle = file; + + return fileReader; } } --(void) closeHandle:(id) handle +-(void) closeReader:(SVGKSourceReader*) reader { /** Is this file being loaded from disk? @@ -91,13 +114,11 @@ -(void) closeHandle:(id) handle } else { - FILE *file = [handle pointerValue]; // objc cannot cope with using C-pointers as pointers, without some help - - fclose(file); + fclose([((SVGKSourceFileReader*)reader) fileHandle]); } } --(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ +-(int) reader:(SVGKSourceReader*) reader readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ { /** Is this file being loaded from disk? @@ -105,25 +126,27 @@ -(int) handle:(id) handle readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK */ if( self.hasSourceURL ) { - NSData* httpData = handle; - const char* dataAsBytes = [httpData bytes]; - int dataLength = [httpData length]; + SVGKSourceURLReader* urlReader = (SVGKSourceURLReader*) reader; + + const char* dataAsBytes = [urlReader.httpDataFullyDownloaded bytes]; + int dataLength = [urlReader.httpDataFullyDownloaded length]; int actualBytesCopied = MIN( dataLength, READ_CHUNK_SZ ); memcpy( chunk, dataAsBytes, actualBytesCopied); /** trim the copied bytes out of the 'handle' NSData object */ NSRange newRange = { actualBytesCopied, dataLength - actualBytesCopied }; - handle = [httpData subdataWithRange:newRange]; + urlReader.httpDataFullyDownloaded = [urlReader.httpDataFullyDownloaded subdataWithRange:newRange]; return actualBytesCopied; } else { + SVGKSourceFileReader* fileReader = (SVGKSourceFileReader*) reader; + size_t bytesRead = 0; - FILE *file = [handle pointerValue]; // objc cannot cope with using C-pointers as pointers, without some help - - bytesRead = fread(chunk, 1, READ_CHUNK_SZ, file); + + bytesRead = fread(chunk, 1, READ_CHUNK_SZ, [fileReader fileHandle]); return bytesRead; } diff --git a/XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj new file mode 100644 index 000000000..fbafd23cb --- /dev/null +++ b/XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj @@ -0,0 +1,822 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639619116145D0400E58CCA /* Foundation.framework */; }; + 663962BC16145D5300E58CCA /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639624816145D5300E58CCA /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962BD16145D5300E58CCA /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639624916145D5300E58CCA /* CGPathAdditions.m */; }; + 663962BE16145D5300E58CCA /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639624C16145D5300E58CCA /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962BF16145D5300E58CCA /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639624D16145D5300E58CCA /* AppleSucksDOMImplementation.m */; }; + 663962C016145D5300E58CCA /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639624E16145D5300E58CCA /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962C116145D5300E58CCA /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639624F16145D5300E58CCA /* Attr.m */; }; + 663962C216145D5300E58CCA /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625016145D5300E58CCA /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962C316145D5300E58CCA /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625116145D5300E58CCA /* CDATASection.m */; }; + 663962C416145D5300E58CCA /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625216145D5300E58CCA /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962C516145D5300E58CCA /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625316145D5300E58CCA /* CharacterData.m */; }; + 663962C616145D5300E58CCA /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625416145D5300E58CCA /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962C716145D5300E58CCA /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625516145D5300E58CCA /* Comment.m */; }; + 663962C816145D5300E58CCA /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625616145D5300E58CCA /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962C916145D5300E58CCA /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625716145D5300E58CCA /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962CA16145D5300E58CCA /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625816145D5300E58CCA /* Document.m */; }; + 663962CB16145D5300E58CCA /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625916145D5300E58CCA /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962CC16145D5300E58CCA /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625A16145D5300E58CCA /* DocumentFragment.m */; }; + 663962CD16145D5300E58CCA /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625B16145D5300E58CCA /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962CE16145D5300E58CCA /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625C16145D5300E58CCA /* DocumentType.m */; }; + 663962CF16145D5300E58CCA /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625D16145D5300E58CCA /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962D016145D5300E58CCA /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625E16145D5300E58CCA /* Element.m */; }; + 663962D116145D5300E58CCA /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625F16145D5300E58CCA /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962D216145D5300E58CCA /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626016145D5300E58CCA /* EntityReference.m */; }; + 663962D316145D5300E58CCA /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626116145D5300E58CCA /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962D416145D5300E58CCA /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626216145D5300E58CCA /* NamedNodeMap.m */; }; + 663962D516145D5300E58CCA /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626316145D5300E58CCA /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962D616145D5300E58CCA /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626416145D5300E58CCA /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962D716145D5300E58CCA /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626516145D5300E58CCA /* Node.m */; }; + 663962D816145D5300E58CCA /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626616145D5300E58CCA /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962D916145D5300E58CCA /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626716145D5300E58CCA /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962DA16145D5300E58CCA /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626816145D5300E58CCA /* NodeList.m */; }; + 663962DB16145D5300E58CCA /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626916145D5300E58CCA /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962DC16145D5300E58CCA /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626A16145D5300E58CCA /* ProcessingInstruction.m */; }; + 663962DD16145D5300E58CCA /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626B16145D5300E58CCA /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962DE16145D5300E58CCA /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626C16145D5300E58CCA /* Text.m */; }; + 663962DF16145D5300E58CCA /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626E16145D5300E58CCA /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962E016145D5300E58CCA /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626F16145D5300E58CCA /* SVGAngle.m */; }; + 663962E116145D5300E58CCA /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627016145D5300E58CCA /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962E216145D5300E58CCA /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627116145D5300E58CCA /* SVGDocument.m */; }; + 663962E316145D5300E58CCA /* SVGDocument_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627216145D5300E58CCA /* SVGDocument_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962E416145D5300E58CCA /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627316145D5300E58CCA /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962E516145D5300E58CCA /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627416145D5300E58CCA /* SVGLength.m */; }; + 663962E616145D5300E58CCA /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627516145D5300E58CCA /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962E716145D5300E58CCA /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627616145D5300E58CCA /* SVGMatrix.m */; }; + 663962E816145D5300E58CCA /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627716145D5300E58CCA /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962E916145D5300E58CCA /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627816145D5300E58CCA /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962EA16145D5300E58CCA /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627916145D5300E58CCA /* SVGPoint.m */; }; + 663962EB16145D5300E58CCA /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627A16145D5300E58CCA /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962EC16145D5300E58CCA /* SVGSVGElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627B16145D5300E58CCA /* SVGSVGElement_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962ED16145D5300E58CCA /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627C16145D5300E58CCA /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962EE16145D5300E58CCA /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627D16145D5300E58CCA /* SVGTransform.m */; }; + 663962EF16145D5300E58CCA /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627E16145D5300E58CCA /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962F016145D5300E58CCA /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627F16145D5300E58CCA /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962F116145D5300E58CCA /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628016145D5300E58CCA /* SVGCircleElement.m */; }; + 663962F216145D5300E58CCA /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628116145D5300E58CCA /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962F316145D5300E58CCA /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628216145D5300E58CCA /* SVGDefsElement.m */; }; + 663962F416145D5300E58CCA /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628316145D5300E58CCA /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962F516145D5300E58CCA /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628416145D5300E58CCA /* SVGDescriptionElement.m */; }; + 663962F616145D5300E58CCA /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628516145D5300E58CCA /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962F716145D5300E58CCA /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628616145D5300E58CCA /* SVGElement.m */; }; + 663962F816145D5300E58CCA /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628716145D5300E58CCA /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962F916145D5300E58CCA /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628816145D5300E58CCA /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962FA16145D5300E58CCA /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628916145D5300E58CCA /* SVGEllipseElement.m */; }; + 663962FB16145D5300E58CCA /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628A16145D5300E58CCA /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962FC16145D5300E58CCA /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628B16145D5300E58CCA /* SVGGroupElement.m */; }; + 663962FD16145D5300E58CCA /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628C16145D5300E58CCA /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 663962FE16145D5300E58CCA /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628D16145D5300E58CCA /* SVGImageElement.m */; }; + 663962FF16145D5300E58CCA /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628E16145D5300E58CCA /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630016145D5300E58CCA /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628F16145D5300E58CCA /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630116145D5300E58CCA /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629016145D5300E58CCA /* SVGLineElement.m */; }; + 6639630216145D5300E58CCA /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629116145D5300E58CCA /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630316145D5300E58CCA /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629216145D5300E58CCA /* SVGPathElement.m */; }; + 6639630416145D5300E58CCA /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629316145D5300E58CCA /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630516145D5300E58CCA /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629416145D5300E58CCA /* SVGPolygonElement.m */; }; + 6639630616145D5300E58CCA /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629516145D5300E58CCA /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630716145D5300E58CCA /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629616145D5300E58CCA /* SVGPolylineElement.m */; }; + 6639630816145D5300E58CCA /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629716145D5300E58CCA /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630916145D5300E58CCA /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629816145D5300E58CCA /* SVGRectElement.m */; }; + 6639630A16145D5300E58CCA /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629916145D5300E58CCA /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630B16145D5300E58CCA /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629A16145D5300E58CCA /* SVGShapeElement.m */; }; + 6639630C16145D5300E58CCA /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629B16145D5300E58CCA /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630D16145D5300E58CCA /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629C16145D5300E58CCA /* SVGSVGElement.m */; }; + 6639630E16145D5300E58CCA /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629D16145D5300E58CCA /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639630F16145D5300E58CCA /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629E16145D5300E58CCA /* SVGTextElement.m */; }; + 6639631016145D5300E58CCA /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629F16145D5300E58CCA /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631116145D5300E58CCA /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A016145D5300E58CCA /* SVGTitleElement.m */; }; + 6639631216145D5300E58CCA /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A216145D5300E58CCA /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631316145D5300E58CCA /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A316145D5300E58CCA /* SVGKParseResult.m */; }; + 6639631416145D5300E58CCA /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A416145D5300E58CCA /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631516145D5300E58CCA /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A516145D5300E58CCA /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631616145D5300E58CCA /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A616145D5300E58CCA /* SVGKParserPatternsAndGradients.m */; }; + 6639631716145D5300E58CCA /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A716145D5300E58CCA /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631816145D5300E58CCA /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A816145D5300E58CCA /* SVGKParserSVG.m */; }; + 6639631916145D5300E58CCA /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A916145D5300E58CCA /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631A16145D5300E58CCA /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962AA16145D5300E58CCA /* SVGKPointsAndPathsParser.m */; }; + 6639631B16145D5300E58CCA /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962AB16145D5300E58CCA /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631C16145D5300E58CCA /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962AC16145D5300E58CCA /* SVGKImage+SVGPathView.m */; }; + 6639631D16145D5300E58CCA /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962AD16145D5300E58CCA /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639631E16145D5300E58CCA /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962AE16145D5300E58CCA /* SVGKImage.m */; }; + 6639631F16145D5300E58CCA /* SVGKImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962AF16145D5300E58CCA /* SVGKImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632016145D5300E58CCA /* SVGKImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B016145D5300E58CCA /* SVGKImageView.m */; }; + 6639632116145D5300E58CCA /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B116145D5300E58CCA /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632216145D5300E58CCA /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B216145D5300E58CCA /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632316145D5300E58CCA /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B316145D5300E58CCA /* SVGKParser.m */; }; + 6639632416145D5300E58CCA /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B416145D5300E58CCA /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632516145D5300E58CCA /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B516145D5300E58CCA /* SVGKPattern.m */; }; + 6639632616145D5300E58CCA /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B616145D5300E58CCA /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632716145D5300E58CCA /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B716145D5300E58CCA /* SVGKSource.m */; }; + 6639632816145D5300E58CCA /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B816145D5300E58CCA /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632916145D5300E58CCA /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B916145D5300E58CCA /* SVGKView.m */; }; + 6639632A16145D5300E58CCA /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962BA16145D5300E58CCA /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639632B16145D5300E58CCA /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962BB16145D5300E58CCA /* SVGUtils.m */; }; + 6639633316145D6800E58CCA /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639632D16145D6800E58CCA /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639633416145D6800E58CCA /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639632E16145D6800E58CCA /* CALayerWithChildHitTest.m */; }; + 6639633516145D6800E58CCA /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639632F16145D6800E58CCA /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639633616145D6800E58CCA /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639633016145D6800E58CCA /* CAShapeLayerWithHitTest.m */; }; + 6639633716145D6800E58CCA /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639633116145D6800E58CCA /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639633816145D6800E58CCA /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639633216145D6800E58CCA /* SVGPathView.m */; }; + 6639633C16145D7200E58CCA /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639633A16145D7200E58CCA /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6639633D16145D7200E58CCA /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639633B16145D7200E58CCA /* CALayerExporter.m */; }; + 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639633F16145DDC00E58CCA /* libxml2.dylib */; }; + 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634116148CDF00E58CCA /* QuartzCore.framework */; }; + 6639634716148DEC00E58CCA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634616148DEC00E58CCA /* CoreGraphics.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 6639618C16145D0400E58CCA /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/${PRODUCT_NAME}"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSVGKit-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6639619116145D0400E58CCA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6639619516145D0400E58CCA /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; + 6639624816145D5300E58CCA /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; + 6639624916145D5300E58CCA /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; + 6639624C16145D5300E58CCA /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; + 6639624D16145D5300E58CCA /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; + 6639624E16145D5300E58CCA /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; + 6639624F16145D5300E58CCA /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; + 6639625016145D5300E58CCA /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; + 6639625116145D5300E58CCA /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; + 6639625216145D5300E58CCA /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; + 6639625316145D5300E58CCA /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; + 6639625416145D5300E58CCA /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; + 6639625516145D5300E58CCA /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; + 6639625616145D5300E58CCA /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; + 6639625716145D5300E58CCA /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; + 6639625816145D5300E58CCA /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; + 6639625916145D5300E58CCA /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; + 6639625A16145D5300E58CCA /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; + 6639625B16145D5300E58CCA /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; + 6639625C16145D5300E58CCA /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; + 6639625D16145D5300E58CCA /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; + 6639625E16145D5300E58CCA /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; + 6639625F16145D5300E58CCA /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; + 6639626016145D5300E58CCA /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; + 6639626116145D5300E58CCA /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; + 6639626216145D5300E58CCA /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; + 6639626316145D5300E58CCA /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; + 6639626416145D5300E58CCA /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; + 6639626516145D5300E58CCA /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; + 6639626616145D5300E58CCA /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; + 6639626716145D5300E58CCA /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; + 6639626816145D5300E58CCA /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; + 6639626916145D5300E58CCA /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; + 6639626A16145D5300E58CCA /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; + 6639626B16145D5300E58CCA /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; + 6639626C16145D5300E58CCA /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; + 6639626E16145D5300E58CCA /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; + 6639626F16145D5300E58CCA /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; + 6639627016145D5300E58CCA /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; + 6639627116145D5300E58CCA /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 6639627216145D5300E58CCA /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; + 6639627316145D5300E58CCA /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; + 6639627416145D5300E58CCA /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; + 6639627516145D5300E58CCA /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; + 6639627616145D5300E58CCA /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; + 6639627716145D5300E58CCA /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; + 6639627816145D5300E58CCA /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; + 6639627916145D5300E58CCA /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; + 6639627A16145D5300E58CCA /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; + 6639627B16145D5300E58CCA /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; + 6639627C16145D5300E58CCA /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; + 6639627D16145D5300E58CCA /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; + 6639627E16145D5300E58CCA /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; + 6639627F16145D5300E58CCA /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; + 6639628016145D5300E58CCA /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; + 6639628116145D5300E58CCA /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 6639628216145D5300E58CCA /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 6639628316145D5300E58CCA /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; + 6639628416145D5300E58CCA /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; + 6639628516145D5300E58CCA /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; + 6639628616145D5300E58CCA /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 6639628716145D5300E58CCA /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; + 6639628816145D5300E58CCA /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; + 6639628916145D5300E58CCA /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; + 6639628A16145D5300E58CCA /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; + 6639628B16145D5300E58CCA /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; + 6639628C16145D5300E58CCA /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; + 6639628D16145D5300E58CCA /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 6639628E16145D5300E58CCA /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; + 6639628F16145D5300E58CCA /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; + 6639629016145D5300E58CCA /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; + 6639629116145D5300E58CCA /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; + 6639629216145D5300E58CCA /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; + 6639629316145D5300E58CCA /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; + 6639629416145D5300E58CCA /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; + 6639629516145D5300E58CCA /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; + 6639629616145D5300E58CCA /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; + 6639629716145D5300E58CCA /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; + 6639629816145D5300E58CCA /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; + 6639629916145D5300E58CCA /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; + 6639629A16145D5300E58CCA /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; + 6639629B16145D5300E58CCA /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 6639629C16145D5300E58CCA /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 6639629D16145D5300E58CCA /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; + 6639629E16145D5300E58CCA /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; + 6639629F16145D5300E58CCA /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; + 663962A016145D5300E58CCA /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 663962A216145D5300E58CCA /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; + 663962A316145D5300E58CCA /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; + 663962A416145D5300E58CCA /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; + 663962A516145D5300E58CCA /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; + 663962A616145D5300E58CCA /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; + 663962A716145D5300E58CCA /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; + 663962A816145D5300E58CCA /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; + 663962A916145D5300E58CCA /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; + 663962AA16145D5300E58CCA /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; + 663962AB16145D5300E58CCA /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+SVGPathView.h"; sourceTree = ""; }; + 663962AC16145D5300E58CCA /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+SVGPathView.m"; sourceTree = ""; }; + 663962AD16145D5300E58CCA /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; + 663962AE16145D5300E58CCA /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; + 663962AF16145D5300E58CCA /* SVGKImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImageView.h; sourceTree = ""; }; + 663962B016145D5300E58CCA /* SVGKImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImageView.m; sourceTree = ""; }; + 663962B116145D5300E58CCA /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; + 663962B216145D5300E58CCA /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; + 663962B316145D5300E58CCA /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; + 663962B416145D5300E58CCA /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; + 663962B516145D5300E58CCA /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; + 663962B616145D5300E58CCA /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; + 663962B716145D5300E58CCA /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; + 663962B816145D5300E58CCA /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; + 663962B916145D5300E58CCA /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; + 663962BA16145D5300E58CCA /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; + 663962BB16145D5300E58CCA /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; + 6639632D16145D6800E58CCA /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; + 6639632E16145D6800E58CCA /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; + 6639632F16145D6800E58CCA /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; + 6639633016145D6800E58CCA /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; + 6639633116145D6800E58CCA /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; + 6639633216145D6800E58CCA /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; + 6639633A16145D7200E58CCA /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; + 6639633B16145D7200E58CCA /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; + 6639633F16145DDC00E58CCA /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; + 6639634116148CDF00E58CCA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 6639634616148DEC00E58CCA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6639618B16145D0400E58CCA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6639634716148DEC00E58CCA /* CoreGraphics.framework in Frameworks */, + 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */, + 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */, + 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6639618316145D0400E58CCA = { + isa = PBXGroup; + children = ( + 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */, + 6639619316145D0400E58CCA /* SVGKit-iOS */, + 6639619016145D0400E58CCA /* Frameworks */, + 6639618F16145D0400E58CCA /* Products */, + ); + sourceTree = ""; + }; + 6639618F16145D0400E58CCA /* Products */ = { + isa = PBXGroup; + children = ( + 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 6639619016145D0400E58CCA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6639633F16145DDC00E58CCA /* libxml2.dylib */, + 6639634616148DEC00E58CCA /* CoreGraphics.framework */, + 6639634116148CDF00E58CCA /* QuartzCore.framework */, + 6639619116145D0400E58CCA /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6639619316145D0400E58CCA /* SVGKit-iOS */ = { + isa = PBXGroup; + children = ( + 6639619416145D0400E58CCA /* Supporting Files */, + ); + path = "SVGKit-iOS"; + sourceTree = ""; + }; + 6639619416145D0400E58CCA /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 6639619516145D0400E58CCA /* SVGKit-iOS-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 6639624716145D5300E58CCA /* Core */ = { + isa = PBXGroup; + children = ( + 6639624816145D5300E58CCA /* CGPathAdditions.h */, + 6639624916145D5300E58CCA /* CGPathAdditions.m */, + 6639624A16145D5300E58CCA /* DOM classes */, + 663962A116145D5300E58CCA /* Parsing */, + 663962AB16145D5300E58CCA /* SVGKImage+SVGPathView.h */, + 663962AC16145D5300E58CCA /* SVGKImage+SVGPathView.m */, + 663962AD16145D5300E58CCA /* SVGKImage.h */, + 663962AE16145D5300E58CCA /* SVGKImage.m */, + 663962AF16145D5300E58CCA /* SVGKImageView.h */, + 663962B016145D5300E58CCA /* SVGKImageView.m */, + 663962B116145D5300E58CCA /* SVGKit.h */, + 663962B216145D5300E58CCA /* SVGKParser.h */, + 663962B316145D5300E58CCA /* SVGKParser.m */, + 663962B416145D5300E58CCA /* SVGKPattern.h */, + 663962B516145D5300E58CCA /* SVGKPattern.m */, + 663962B616145D5300E58CCA /* SVGKSource.h */, + 663962B716145D5300E58CCA /* SVGKSource.m */, + 663962B816145D5300E58CCA /* SVGKView.h */, + 663962B916145D5300E58CCA /* SVGKView.m */, + 663962BA16145D5300E58CCA /* SVGUtils.h */, + 663962BB16145D5300E58CCA /* SVGUtils.m */, + ); + name = Core; + path = ../../Core; + sourceTree = ""; + }; + 6639624A16145D5300E58CCA /* DOM classes */ = { + isa = PBXGroup; + children = ( + 6639624B16145D5300E58CCA /* Core DOM */, + 6639626D16145D5300E58CCA /* SVG-DOM */, + 6639627F16145D5300E58CCA /* SVGCircleElement.h */, + 6639628016145D5300E58CCA /* SVGCircleElement.m */, + 6639628116145D5300E58CCA /* SVGDefsElement.h */, + 6639628216145D5300E58CCA /* SVGDefsElement.m */, + 6639628316145D5300E58CCA /* SVGDescriptionElement.h */, + 6639628416145D5300E58CCA /* SVGDescriptionElement.m */, + 6639628516145D5300E58CCA /* SVGElement.h */, + 6639628616145D5300E58CCA /* SVGElement.m */, + 6639628716145D5300E58CCA /* SVGElement_ForParser.h */, + 6639628816145D5300E58CCA /* SVGEllipseElement.h */, + 6639628916145D5300E58CCA /* SVGEllipseElement.m */, + 6639628A16145D5300E58CCA /* SVGGroupElement.h */, + 6639628B16145D5300E58CCA /* SVGGroupElement.m */, + 6639628C16145D5300E58CCA /* SVGImageElement.h */, + 6639628D16145D5300E58CCA /* SVGImageElement.m */, + 6639628E16145D5300E58CCA /* SVGLayeredElement.h */, + 6639628F16145D5300E58CCA /* SVGLineElement.h */, + 6639629016145D5300E58CCA /* SVGLineElement.m */, + 6639629116145D5300E58CCA /* SVGPathElement.h */, + 6639629216145D5300E58CCA /* SVGPathElement.m */, + 6639629316145D5300E58CCA /* SVGPolygonElement.h */, + 6639629416145D5300E58CCA /* SVGPolygonElement.m */, + 6639629516145D5300E58CCA /* SVGPolylineElement.h */, + 6639629616145D5300E58CCA /* SVGPolylineElement.m */, + 6639629716145D5300E58CCA /* SVGRectElement.h */, + 6639629816145D5300E58CCA /* SVGRectElement.m */, + 6639629916145D5300E58CCA /* SVGShapeElement.h */, + 6639629A16145D5300E58CCA /* SVGShapeElement.m */, + 6639629B16145D5300E58CCA /* SVGSVGElement.h */, + 6639629C16145D5300E58CCA /* SVGSVGElement.m */, + 6639629D16145D5300E58CCA /* SVGTextElement.h */, + 6639629E16145D5300E58CCA /* SVGTextElement.m */, + 6639629F16145D5300E58CCA /* SVGTitleElement.h */, + 663962A016145D5300E58CCA /* SVGTitleElement.m */, + ); + path = "DOM classes"; + sourceTree = ""; + }; + 6639624B16145D5300E58CCA /* Core DOM */ = { + isa = PBXGroup; + children = ( + 6639624C16145D5300E58CCA /* AppleSucksDOMImplementation.h */, + 6639624D16145D5300E58CCA /* AppleSucksDOMImplementation.m */, + 6639624E16145D5300E58CCA /* Attr.h */, + 6639624F16145D5300E58CCA /* Attr.m */, + 6639625016145D5300E58CCA /* CDATASection.h */, + 6639625116145D5300E58CCA /* CDATASection.m */, + 6639625216145D5300E58CCA /* CharacterData.h */, + 6639625316145D5300E58CCA /* CharacterData.m */, + 6639625416145D5300E58CCA /* Comment.h */, + 6639625516145D5300E58CCA /* Comment.m */, + 6639625616145D5300E58CCA /* Document+Mutable.h */, + 6639625716145D5300E58CCA /* Document.h */, + 6639625816145D5300E58CCA /* Document.m */, + 6639625916145D5300E58CCA /* DocumentFragment.h */, + 6639625A16145D5300E58CCA /* DocumentFragment.m */, + 6639625B16145D5300E58CCA /* DocumentType.h */, + 6639625C16145D5300E58CCA /* DocumentType.m */, + 6639625D16145D5300E58CCA /* Element.h */, + 6639625E16145D5300E58CCA /* Element.m */, + 6639625F16145D5300E58CCA /* EntityReference.h */, + 6639626016145D5300E58CCA /* EntityReference.m */, + 6639626116145D5300E58CCA /* NamedNodeMap.h */, + 6639626216145D5300E58CCA /* NamedNodeMap.m */, + 6639626316145D5300E58CCA /* Node+Mutable.h */, + 6639626416145D5300E58CCA /* Node.h */, + 6639626516145D5300E58CCA /* Node.m */, + 6639626616145D5300E58CCA /* NodeList+Mutable.h */, + 6639626716145D5300E58CCA /* NodeList.h */, + 6639626816145D5300E58CCA /* NodeList.m */, + 6639626916145D5300E58CCA /* ProcessingInstruction.h */, + 6639626A16145D5300E58CCA /* ProcessingInstruction.m */, + 6639626B16145D5300E58CCA /* Text.h */, + 6639626C16145D5300E58CCA /* Text.m */, + ); + path = "Core DOM"; + sourceTree = ""; + }; + 6639626D16145D5300E58CCA /* SVG-DOM */ = { + isa = PBXGroup; + children = ( + 6639626E16145D5300E58CCA /* SVGAngle.h */, + 6639626F16145D5300E58CCA /* SVGAngle.m */, + 6639627016145D5300E58CCA /* SVGDocument.h */, + 6639627116145D5300E58CCA /* SVGDocument.m */, + 6639627216145D5300E58CCA /* SVGDocument_Mutable.h */, + 6639627316145D5300E58CCA /* SVGLength.h */, + 6639627416145D5300E58CCA /* SVGLength.m */, + 6639627516145D5300E58CCA /* SVGMatrix.h */, + 6639627616145D5300E58CCA /* SVGMatrix.m */, + 6639627716145D5300E58CCA /* SVGNumber.h */, + 6639627816145D5300E58CCA /* SVGPoint.h */, + 6639627916145D5300E58CCA /* SVGPoint.m */, + 6639627A16145D5300E58CCA /* SVGRect.h */, + 6639627B16145D5300E58CCA /* SVGSVGElement_Mutable.h */, + 6639627C16145D5300E58CCA /* SVGTransform.h */, + 6639627D16145D5300E58CCA /* SVGTransform.m */, + 6639627E16145D5300E58CCA /* SVGViewSpec.h */, + ); + path = "SVG-DOM"; + sourceTree = ""; + }; + 663962A116145D5300E58CCA /* Parsing */ = { + isa = PBXGroup; + children = ( + 663962A216145D5300E58CCA /* SVGKParseResult.h */, + 663962A316145D5300E58CCA /* SVGKParseResult.m */, + 663962A416145D5300E58CCA /* SVGKParserExtension.h */, + 663962A516145D5300E58CCA /* SVGKParserPatternsAndGradients.h */, + 663962A616145D5300E58CCA /* SVGKParserPatternsAndGradients.m */, + 663962A716145D5300E58CCA /* SVGKParserSVG.h */, + 663962A816145D5300E58CCA /* SVGKParserSVG.m */, + 663962A916145D5300E58CCA /* SVGKPointsAndPathsParser.h */, + 663962AA16145D5300E58CCA /* SVGKPointsAndPathsParser.m */, + ); + path = Parsing; + sourceTree = ""; + }; + 6639632C16145D6800E58CCA /* iOS */ = { + isa = PBXGroup; + children = ( + 6639632D16145D6800E58CCA /* CALayerWithChildHitTest.h */, + 6639632E16145D6800E58CCA /* CALayerWithChildHitTest.m */, + 6639632F16145D6800E58CCA /* CAShapeLayerWithHitTest.h */, + 6639633016145D6800E58CCA /* CAShapeLayerWithHitTest.m */, + 6639633116145D6800E58CCA /* SVGPathView.h */, + 6639633216145D6800E58CCA /* SVGPathView.m */, + ); + name = iOS; + path = ../../iOS; + sourceTree = ""; + }; + 6639633916145D7200E58CCA /* calayer-exporter */ = { + isa = PBXGroup; + children = ( + 6639633A16145D7200E58CCA /* CALayerExporter.h */, + 6639633B16145D7200E58CCA /* CALayerExporter.m */, + ); + name = "calayer-exporter"; + path = "../../calayer-exporter"; + sourceTree = ""; + }; + 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */ = { + isa = PBXGroup; + children = ( + 6639633916145D7200E58CCA /* calayer-exporter */, + 6639624716145D5300E58CCA /* Core */, + 6639632C16145D6800E58CCA /* iOS */, + ); + name = "EXTERNAL REFERENCES"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 6639624616145D3E00E58CCA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 663962BC16145D5300E58CCA /* CGPathAdditions.h in Headers */, + 663962BE16145D5300E58CCA /* AppleSucksDOMImplementation.h in Headers */, + 663962C016145D5300E58CCA /* Attr.h in Headers */, + 663962C216145D5300E58CCA /* CDATASection.h in Headers */, + 663962C416145D5300E58CCA /* CharacterData.h in Headers */, + 663962C616145D5300E58CCA /* Comment.h in Headers */, + 663962C816145D5300E58CCA /* Document+Mutable.h in Headers */, + 663962C916145D5300E58CCA /* Document.h in Headers */, + 663962CB16145D5300E58CCA /* DocumentFragment.h in Headers */, + 663962CD16145D5300E58CCA /* DocumentType.h in Headers */, + 663962CF16145D5300E58CCA /* Element.h in Headers */, + 663962D116145D5300E58CCA /* EntityReference.h in Headers */, + 663962D316145D5300E58CCA /* NamedNodeMap.h in Headers */, + 663962D516145D5300E58CCA /* Node+Mutable.h in Headers */, + 663962D616145D5300E58CCA /* Node.h in Headers */, + 663962D816145D5300E58CCA /* NodeList+Mutable.h in Headers */, + 663962D916145D5300E58CCA /* NodeList.h in Headers */, + 663962DB16145D5300E58CCA /* ProcessingInstruction.h in Headers */, + 663962DD16145D5300E58CCA /* Text.h in Headers */, + 663962DF16145D5300E58CCA /* SVGAngle.h in Headers */, + 663962E116145D5300E58CCA /* SVGDocument.h in Headers */, + 663962E316145D5300E58CCA /* SVGDocument_Mutable.h in Headers */, + 663962E416145D5300E58CCA /* SVGLength.h in Headers */, + 663962E616145D5300E58CCA /* SVGMatrix.h in Headers */, + 663962E816145D5300E58CCA /* SVGNumber.h in Headers */, + 663962E916145D5300E58CCA /* SVGPoint.h in Headers */, + 663962EB16145D5300E58CCA /* SVGRect.h in Headers */, + 663962EC16145D5300E58CCA /* SVGSVGElement_Mutable.h in Headers */, + 663962ED16145D5300E58CCA /* SVGTransform.h in Headers */, + 663962EF16145D5300E58CCA /* SVGViewSpec.h in Headers */, + 663962F016145D5300E58CCA /* SVGCircleElement.h in Headers */, + 663962F216145D5300E58CCA /* SVGDefsElement.h in Headers */, + 663962F416145D5300E58CCA /* SVGDescriptionElement.h in Headers */, + 663962F616145D5300E58CCA /* SVGElement.h in Headers */, + 663962F816145D5300E58CCA /* SVGElement_ForParser.h in Headers */, + 663962F916145D5300E58CCA /* SVGEllipseElement.h in Headers */, + 663962FB16145D5300E58CCA /* SVGGroupElement.h in Headers */, + 663962FD16145D5300E58CCA /* SVGImageElement.h in Headers */, + 663962FF16145D5300E58CCA /* SVGLayeredElement.h in Headers */, + 6639630016145D5300E58CCA /* SVGLineElement.h in Headers */, + 6639630216145D5300E58CCA /* SVGPathElement.h in Headers */, + 6639630416145D5300E58CCA /* SVGPolygonElement.h in Headers */, + 6639630616145D5300E58CCA /* SVGPolylineElement.h in Headers */, + 6639630816145D5300E58CCA /* SVGRectElement.h in Headers */, + 6639630A16145D5300E58CCA /* SVGShapeElement.h in Headers */, + 6639630C16145D5300E58CCA /* SVGSVGElement.h in Headers */, + 6639630E16145D5300E58CCA /* SVGTextElement.h in Headers */, + 6639631016145D5300E58CCA /* SVGTitleElement.h in Headers */, + 6639631216145D5300E58CCA /* SVGKParseResult.h in Headers */, + 6639631416145D5300E58CCA /* SVGKParserExtension.h in Headers */, + 6639631516145D5300E58CCA /* SVGKParserPatternsAndGradients.h in Headers */, + 6639631716145D5300E58CCA /* SVGKParserSVG.h in Headers */, + 6639631916145D5300E58CCA /* SVGKPointsAndPathsParser.h in Headers */, + 6639631B16145D5300E58CCA /* SVGKImage+SVGPathView.h in Headers */, + 6639631D16145D5300E58CCA /* SVGKImage.h in Headers */, + 6639631F16145D5300E58CCA /* SVGKImageView.h in Headers */, + 6639632116145D5300E58CCA /* SVGKit.h in Headers */, + 6639632216145D5300E58CCA /* SVGKParser.h in Headers */, + 6639632416145D5300E58CCA /* SVGKPattern.h in Headers */, + 6639632616145D5300E58CCA /* SVGKSource.h in Headers */, + 6639632816145D5300E58CCA /* SVGKView.h in Headers */, + 6639632A16145D5300E58CCA /* SVGUtils.h in Headers */, + 6639633316145D6800E58CCA /* CALayerWithChildHitTest.h in Headers */, + 6639633516145D6800E58CCA /* CAShapeLayerWithHitTest.h in Headers */, + 6639633716145D6800E58CCA /* SVGPathView.h in Headers */, + 6639633C16145D7200E58CCA /* CALayerExporter.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 6639618D16145D0400E58CCA /* SVGKit-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6639619C16145D0400E58CCA /* Build configuration list for PBXNativeTarget "SVGKit-iOS" */; + buildPhases = ( + 6639618A16145D0400E58CCA /* Sources */, + 6639618B16145D0400E58CCA /* Frameworks */, + 6639618C16145D0400E58CCA /* CopyFiles */, + 6639624616145D3E00E58CCA /* Headers */, + 663963481614968A00E58CCA /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SVGKit-iOS"; + productName = "SVGKit-iOS"; + productReference = 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6639618516145D0400E58CCA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0440; + ORGANIZATIONNAME = na; + }; + buildConfigurationList = 6639618816145D0400E58CCA /* Build configuration list for PBXProject "SVGKit-iOS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 6639618316145D0400E58CCA; + productRefGroup = 6639618F16145D0400E58CCA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6639618D16145D0400E58CCA /* SVGKit-iOS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + 663963481614968A00E58CCA /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Version 2.0 (updated for Xcode 4, with some fixes)\n# Changes:\n# - Works with xcode 4, even when running xcode 3 projects (Workarounds for apple bugs)\n# - Faster / better: only runs lipo once, instead of once per recursion\n# - Added some debugging statemetns that can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to \"true\"\n# - Fixed some typos\n#\n# Purpose:\n# Create a static library for iPhone from within XCode\n# Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI (Xcode 3.2.3 specifically states this in the Release notes!)\n# ...no, I don't understand why they did this!\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)\n#\n# More info: see this Stack Overflow question: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n\n#################[ Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"false\"\n\nif [ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use the following variables when debugging this script; note that they may change on recursions\"\necho \"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROOT = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR = $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n# (incidental: searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep -o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\" ]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho \"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[ end of part 1 ]##################\n\n#####################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif [ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation, so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\" -target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\"\nxcodebuild -configuration \"${CONFIGURATION}\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\"\n\nACTION=\"build\"\n\n#Merge all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple) built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho \"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\n\n# ... remove the products of previous runs of this script\n# NB: this directory is ONLY created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir \"${CREATING_UNIVERSAL_DIR}\"\n\n#\necho \"lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"\nlipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow suggestion to also copy \"include\" files\n# (untested, but should work OK)\n#\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\n# * needs to be outside the double quotes?\ncp \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include/\"* \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\nfi\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6639618A16145D0400E58CCA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 663962BD16145D5300E58CCA /* CGPathAdditions.m in Sources */, + 663962BF16145D5300E58CCA /* AppleSucksDOMImplementation.m in Sources */, + 663962C116145D5300E58CCA /* Attr.m in Sources */, + 663962C316145D5300E58CCA /* CDATASection.m in Sources */, + 663962C516145D5300E58CCA /* CharacterData.m in Sources */, + 663962C716145D5300E58CCA /* Comment.m in Sources */, + 663962CA16145D5300E58CCA /* Document.m in Sources */, + 663962CC16145D5300E58CCA /* DocumentFragment.m in Sources */, + 663962CE16145D5300E58CCA /* DocumentType.m in Sources */, + 663962D016145D5300E58CCA /* Element.m in Sources */, + 663962D216145D5300E58CCA /* EntityReference.m in Sources */, + 663962D416145D5300E58CCA /* NamedNodeMap.m in Sources */, + 663962D716145D5300E58CCA /* Node.m in Sources */, + 663962DA16145D5300E58CCA /* NodeList.m in Sources */, + 663962DC16145D5300E58CCA /* ProcessingInstruction.m in Sources */, + 663962DE16145D5300E58CCA /* Text.m in Sources */, + 663962E016145D5300E58CCA /* SVGAngle.m in Sources */, + 663962E216145D5300E58CCA /* SVGDocument.m in Sources */, + 663962E516145D5300E58CCA /* SVGLength.m in Sources */, + 663962E716145D5300E58CCA /* SVGMatrix.m in Sources */, + 663962EA16145D5300E58CCA /* SVGPoint.m in Sources */, + 663962EE16145D5300E58CCA /* SVGTransform.m in Sources */, + 663962F116145D5300E58CCA /* SVGCircleElement.m in Sources */, + 663962F316145D5300E58CCA /* SVGDefsElement.m in Sources */, + 663962F516145D5300E58CCA /* SVGDescriptionElement.m in Sources */, + 663962F716145D5300E58CCA /* SVGElement.m in Sources */, + 663962FA16145D5300E58CCA /* SVGEllipseElement.m in Sources */, + 663962FC16145D5300E58CCA /* SVGGroupElement.m in Sources */, + 663962FE16145D5300E58CCA /* SVGImageElement.m in Sources */, + 6639630116145D5300E58CCA /* SVGLineElement.m in Sources */, + 6639630316145D5300E58CCA /* SVGPathElement.m in Sources */, + 6639630516145D5300E58CCA /* SVGPolygonElement.m in Sources */, + 6639630716145D5300E58CCA /* SVGPolylineElement.m in Sources */, + 6639630916145D5300E58CCA /* SVGRectElement.m in Sources */, + 6639630B16145D5300E58CCA /* SVGShapeElement.m in Sources */, + 6639630D16145D5300E58CCA /* SVGSVGElement.m in Sources */, + 6639630F16145D5300E58CCA /* SVGTextElement.m in Sources */, + 6639631116145D5300E58CCA /* SVGTitleElement.m in Sources */, + 6639631316145D5300E58CCA /* SVGKParseResult.m in Sources */, + 6639631616145D5300E58CCA /* SVGKParserPatternsAndGradients.m in Sources */, + 6639631816145D5300E58CCA /* SVGKParserSVG.m in Sources */, + 6639631A16145D5300E58CCA /* SVGKPointsAndPathsParser.m in Sources */, + 6639631C16145D5300E58CCA /* SVGKImage+SVGPathView.m in Sources */, + 6639631E16145D5300E58CCA /* SVGKImage.m in Sources */, + 6639632016145D5300E58CCA /* SVGKImageView.m in Sources */, + 6639632316145D5300E58CCA /* SVGKParser.m in Sources */, + 6639632516145D5300E58CCA /* SVGKPattern.m in Sources */, + 6639632716145D5300E58CCA /* SVGKSource.m in Sources */, + 6639632916145D5300E58CCA /* SVGKView.m in Sources */, + 6639632B16145D5300E58CCA /* SVGUtils.m in Sources */, + 6639633416145D6800E58CCA /* CALayerWithChildHitTest.m in Sources */, + 6639633616145D6800E58CCA /* CAShapeLayerWithHitTest.m in Sources */, + 6639633816145D6800E58CCA /* SVGPathView.m in Sources */, + 6639633D16145D7200E58CCA /* CALayerExporter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 6639619A16145D0400E58CCA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 6639619B16145D0400E58CCA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6639619D16145D0400E58CCA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/SVGKit_iOS.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SVGKit-iOS/SVGKit-iOS-Prefix.pch"; + HEADER_SEARCH_PATHS = /usr/include/libxml2; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 6639619E16145D0400E58CCA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/SVGKit_iOS.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "SVGKit-iOS/SVGKit-iOS-Prefix.pch"; + HEADER_SEARCH_PATHS = /usr/include/libxml2; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6639618816145D0400E58CCA /* Build configuration list for PBXProject "SVGKit-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6639619A16145D0400E58CCA /* Debug */, + 6639619B16145D0400E58CCA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6639619C16145D0400E58CCA /* Build configuration list for PBXNativeTarget "SVGKit-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6639619D16145D0400E58CCA /* Debug */, + 6639619E16145D0400E58CCA /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6639618516145D0400E58CCA /* Project object */; +} diff --git a/XCodeProjects/SVGKit-iOS/SVGKit-iOS/SVGKit-iOS-Prefix.pch b/XCodeProjects/SVGKit-iOS/SVGKit-iOS/SVGKit-iOS-Prefix.pch new file mode 100644 index 000000000..fea0b09c5 --- /dev/null +++ b/XCodeProjects/SVGKit-iOS/SVGKit-iOS/SVGKit-iOS-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'SVGKit-iOS' target in the 'SVGKit-iOS' project +// + +#ifdef __OBJC__ + #import +#endif From 03a1d9bd7df4ef732e25d5f70db2a3bb8f15f369 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 27 Sep 2012 15:30:16 +0100 Subject: [PATCH 076/110] FIXED: some problems where compiler needed a class body - converted it to protocol as easy solution --- Core/SVGKParser.m | 2 +- Core/SVGKSource.h | 12 ++++++------ Core/SVGKSource.m | 6 +++--- .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Core/SVGKParser.m b/Core/SVGKParser.m index e771b204c..2711c9ab2 100644 --- a/Core/SVGKParser.m +++ b/Core/SVGKParser.m @@ -109,7 +109,7 @@ - (SVGKParseResult*) parseSynchronously */ NSError* error = nil; - SVGKSourceReader* reader = [source newReader:&error]; + NSObject* reader = [source newReader:&error]; if( error != nil ) { [currentParseRun addSourceError:error]; diff --git a/Core/SVGKSource.h b/Core/SVGKSource.h index df13e29b8..00997a50b 100644 --- a/Core/SVGKSource.h +++ b/Core/SVGKSource.h @@ -15,16 +15,16 @@ #import -@interface SVGKSourceReader : NSObject +@protocol SVGKSourceReader @end -@interface SVGKSourceFileReader : SVGKSourceReader +@interface SVGKSourceFileReader : NSObject { FILE *fileHandle; } @end -@interface SVGKSourceURLReader : SVGKSourceReader +@interface SVGKSourceURLReader : NSObject @property(nonatomic,retain) NSData* httpDataFullyDownloaded; @end @@ -38,8 +38,8 @@ +(SVGKSource*) sourceFromFilename:(NSString*) p; +(SVGKSource*) sourceFromURL:(NSURL*) u; --(SVGKSourceReader*) newReader:(NSError**) error; --(void) closeReader:(SVGKSourceReader*) reader; --(int) reader:(SVGKSourceReader*) reader readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ; +-(NSObject*) newReader:(NSError**) error; +-(void) closeReader:(NSObject*) reader; +-(int) reader:(NSObject*) reader readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ; @end diff --git a/Core/SVGKSource.m b/Core/SVGKSource.m index 950db838c..5f9ab2d23 100644 --- a/Core/SVGKSource.m +++ b/Core/SVGKSource.m @@ -44,7 +44,7 @@ +(SVGKSource*) sourceFromURL:(NSURL*) u return d; } --(SVGKSourceReader*) newReader:(NSError**) error +-(NSObject*) newReader:(NSError**) error { /** Is this file being loaded from disk? @@ -102,7 +102,7 @@ -(SVGKSourceReader*) newReader:(NSError**) error } --(void) closeReader:(SVGKSourceReader*) reader +-(void) closeReader:(NSObject*) reader { /** Is this file being loaded from disk? @@ -118,7 +118,7 @@ -(void) closeReader:(SVGKSourceReader*) reader } } --(int) reader:(SVGKSourceReader*) reader readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ +-(int) reader:(NSObject*) reader readNextChunk:(char *) chunk maxBytes:(int) READ_CHUNK_SZ { /** Is this file being loaded from disk? diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj index ec71cecd9..4b3af098f 100644 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj @@ -1122,6 +1122,7 @@ OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SKIP_INSTALL = YES; }; name = Debug; }; @@ -1141,6 +1142,7 @@ OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SKIP_INSTALL = YES; }; name = Release; }; From 26686db337d8dd9ae66699c0294822dfc4e1f978 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 27 Sep 2012 15:55:16 +0100 Subject: [PATCH 077/110] ADDED: major performance boost: images created with [SVGKImage imageNamed:] are - by default - globally cached and shared. Can be disabled by commented out the #define at top of SVGKImage.h --- Core/SVGKImage.h | 8 ++++++ Core/SVGKImage.m | 75 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index 8eca08614..b089f2d6f 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -47,10 +47,15 @@ #import "SVGKSource.h" #import "SVGKParseResult.h" +#define ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED // if ENABLED, then ALL instances created with imageNamed: are shared, and are NEVER RELEASED + @class SVGDefsElement; @interface SVGKImage : NSObject // doesn't extend UIImage because Apple made UIImage immutable { +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED + BOOL cameFromGlobalCache; +#endif } #if TARGET_OS_IPHONE @@ -65,6 +70,9 @@ @property (nonatomic, retain, readonly) SVGDocument* DOMDocument; @property (nonatomic, retain, readonly) SVGSVGElement* DOMTree; // needs renaming + (possibly) replacing by DOMDocument @property (nonatomic, retain, readonly) CALayer* CALayerTree; +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED +@property (nonatomic, retain, readonly) NSString* nameUsedToInstantiate; +#endif #pragma mark - methods to quick load an SVG as an image diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index 26c1d4e11..a66ced3c9 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -8,6 +8,17 @@ #import "SVGKParserSVG.h" +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED +@interface SVGKImageCacheLine : NSObject +@property(nonatomic) int numberOfInstances; +@property(nonatomic,retain) SVGKImage* mainInstance; +@end +@implementation SVGKImageCacheLine +@synthesize numberOfInstances; +@synthesize mainInstance; +@end +#endif + @interface SVGKImage () @property (nonatomic, readwrite) SVGLength* svgWidth; @@ -19,6 +30,10 @@ @interface SVGKImage () @property (nonatomic, retain, readwrite) SVGDocument* DOMDocument; @property (nonatomic, retain, readwrite) SVGSVGElement* DOMTree; // needs renaming + (possibly) replacing by DOMDocument @property (nonatomic, retain, readwrite) CALayer* CALayerTree; +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED +@property (nonatomic, retain, readwrite) NSString* nameUsedToInstantiate; +#endif + #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods //NOT DEFINED: what is the scale for a SVGKImage? @property(nonatomic,readwrite) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); @@ -35,8 +50,26 @@ @implementation SVGKImage @synthesize source; @synthesize parseErrorsAndWarnings; +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED +static NSMutableDictionary* globalSVGKImageCache; +#endif + + (SVGKImage *)imageNamed:(NSString *)name { NSParameterAssert(name != nil); + +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED + if( globalSVGKImageCache == nil ) + { + globalSVGKImageCache = [NSMutableDictionary new]; + } + + SVGKImageCacheLine* cacheLine = [globalSVGKImageCache valueForKey:name]; + if( cacheLine != nil ) + { + cacheLine.numberOfInstances ++; + return cacheLine.mainInstance; + } +#endif NSBundle *bundle = [NSBundle mainBundle]; @@ -57,7 +90,19 @@ + (SVGKImage *)imageNamed:(NSString *)name { return nil; } - return [self imageWithContentsOfFile:path]; + SVGKImage* result = [self imageWithContentsOfFile:path]; + +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED + result->cameFromGlobalCache = TRUE; + result.nameUsedToInstantiate = name; + + SVGKImageCacheLine* newCacheLine = [[[SVGKImageCacheLine alloc] init] autorelease]; + newCacheLine.mainInstance = result; + + [globalSVGKImageCache setValue:newCacheLine forKey:name]; +#endif + + return result; } + (SVGKImage*) imageWithContentsOfURL:(NSURL *)url { @@ -125,11 +170,33 @@ - (id)initWithContentsOfURL:(NSURL *)url { return [self initWithSource:[SVGKSource sourceFromURL:url]]; } -- (void)dealloc { +- (void)dealloc +{ +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED + if( self->cameFromGlobalCache ) + { + SVGKImageCacheLine* cacheLine = [globalSVGKImageCache valueForKey:self.nameUsedToInstantiate]; + cacheLine.numberOfInstances --; + + if( cacheLine.numberOfInstances < 1 ) + { + [globalSVGKImageCache removeObjectForKey:self.nameUsedToInstantiate]; + } + } +#endif + + self.svgWidth = nil; + self.svgHeight = nil; + self.source = nil; + self.parseErrorsAndWarnings = nil; + + self.DOMDocument = nil; self.DOMTree = nil; self.CALayerTree = nil; - self.source = nil; - self.parseErrorsAndWarnings = nil; +#ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED + self.nameUsedToInstantiate = nil; +#endif + [super dealloc]; } From f3a5b7b6551c2587ee097d94fae4fde30b9c3ccf Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 27 Sep 2012 18:04:21 +0100 Subject: [PATCH 078/110] ADDED: SVGKImageView now automatically re-displays itself whenever the image, bounds, or scale are changed --- Core/SVGKImageView.m | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/Core/SVGKImageView.m b/Core/SVGKImageView.m index faf653541..8daf9d783 100755 --- a/Core/SVGKImageView.m +++ b/Core/SVGKImageView.m @@ -2,9 +2,9 @@ @implementation SVGKImageView -@synthesize image; -@synthesize scaleMultiplier; -@synthesize tileContents; +@synthesize image = _image; +@synthesize scaleMultiplier = _scaleMultiplier; +@synthesize tileContents = _tileContents; - (id)init { @@ -26,6 +26,35 @@ - (id)initWithSVGKImage:(SVGKImage*) im return self; } +/** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) + Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ +-(void)setImage:(SVGKImage *)newImage +{ + [_image release]; + _image = newImage; + [_image retain]; + + [self setNeedsDisplay]; +} + +/** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) + Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ +-(void)setScaleMultiplier:(CGSize)newScaleMultiplier +{ + _scaleMultiplier = newScaleMultiplier; + + [self setNeedsDisplay]; +} + +/** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) + Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ +-(void)setTileContents:(BOOL)newTileContents +{ + _tileContents = newTileContents; + + [self setNeedsDisplay]; +} + -(void)drawRect:(CGRect)rect { CGRect imageFrameAtZero = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); From 720c7cc2f8060bb2367ed93d30b5b0df119ca562 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 29 Sep 2012 13:42:49 +0100 Subject: [PATCH 079/110] FIXED: several objects being incorrectly NOT RETAINED as properties WARNINGS: zero. All static analysis fixed too! --- Core/DOM classes/Core DOM/Document.h | 4 ++-- Core/DOM classes/Core DOM/Document.m | 4 ++-- .../SVG-DOM/SVGSVGElement_Mutable.h | 16 ++++++++-------- Core/DOM classes/SVGImageElement.h | 2 +- Core/DOM classes/SVGImageElement.m | 2 +- Core/DOM classes/SVGSVGElement.h | 18 +++++++++--------- Core/DOM classes/SVGSVGElement.m | 2 +- Core/SVGKImage.h | 4 ++-- Core/SVGKImage.m | 4 ++-- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Core/DOM classes/Core DOM/Document.h b/Core/DOM classes/Core DOM/Document.h index dcd433a74..c974fa87f 100644 --- a/Core/DOM classes/Core DOM/Document.h +++ b/Core/DOM classes/Core DOM/Document.h @@ -82,7 +82,7 @@ @property(nonatomic,retain,readonly) Element* documentElement; --(Element*) createElement:(NSString*) tagName; +-(Element*) createElement:(NSString*) tagName __attribute__((ns_returns_retained)); -(DocumentFragment*) createDocumentFragment; -(Text*) createTextNode:(NSString*) data; -(Comment*) createComment:(NSString*) data; @@ -96,7 +96,7 @@ -(Node*) importNode:(Node*) importedNode deep:(BOOL) deep; // Introduced in DOM Level 2: --(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName; +-(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName __attribute__((ns_returns_retained)); // Introduced in DOM Level 2: -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qualifiedName; diff --git a/Core/DOM classes/Core DOM/Document.m b/Core/DOM classes/Core DOM/Document.m index b362888d0..177c4d3e4 100644 --- a/Core/DOM classes/Core DOM/Document.m +++ b/Core/DOM classes/Core DOM/Document.m @@ -21,7 +21,7 @@ -(Element*) createElement:(NSString*) tagName NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); - return newElement; /** NOTE: clang says this is a leak - it is NOT, it is a REQUIRED RETAIN COUNT, as per SVG Spec */ + return newElement; } -(DocumentFragment*) createDocumentFragment @@ -82,7 +82,7 @@ -(Element*) createElementNS:(NSString*) namespaceURI qualifiedName:(NSString*) q NSLog( @"[%@] WARNING: SVG Spec, missing feature: if there are known attributes with default values, Attr nodes representing them SHOULD BE automatically created and attached to the element.", [self class] ); - return newElement; /** NOTE: clang says this is a leak - it is NOT, it is a REQUIRED RETAIN COUNT, as per SVG Spec */ + return newElement; } // Introduced in DOM Level 2: diff --git a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h index d048c097a..17b1e9ac5 100644 --- a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h +++ b/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h @@ -2,20 +2,20 @@ @interface SVGSVGElement () -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; -@property (nonatomic, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; -@property (nonatomic, readwrite) NSString* contentScriptType; -@property (nonatomic, readwrite) NSString* contentStyleType; +@property (nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; +@property (nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; +@property (nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; +@property (nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; +@property (nonatomic, retain, readwrite) NSString* contentScriptType; +@property (nonatomic, retain, readwrite) NSString* contentStyleType; @property (nonatomic, readwrite) SVGRect viewport; @property (nonatomic, readwrite) float pixelUnitToMillimeterX; @property (nonatomic, readwrite) float pixelUnitToMillimeterY; @property (nonatomic, readwrite) float screenPixelToMillimeterX; @property (nonatomic, readwrite) float screenPixelToMillimeterY; @property (nonatomic, readwrite) BOOL useCurrentView; -@property (nonatomic, readwrite) SVGViewSpec* currentView; +@property (nonatomic, retain, readwrite) SVGViewSpec* currentView; @property (nonatomic, readwrite) float currentScale; -@property (nonatomic, readwrite) SVGPoint* currentTranslate; +@property (nonatomic, retain, readwrite) SVGPoint* currentTranslate; @end diff --git a/Core/DOM classes/SVGImageElement.h b/Core/DOM classes/SVGImageElement.h index f98d0c1e3..07186795a 100644 --- a/Core/DOM classes/SVGImageElement.h +++ b/Core/DOM classes/SVGImageElement.h @@ -19,6 +19,6 @@ @property (nonatomic, readonly) CGFloat width; @property (nonatomic, readonly) CGFloat height; -@property (nonatomic, readonly) NSString *href; +@property (nonatomic, retain, readonly) NSString *href; @end diff --git a/Core/DOM classes/SVGImageElement.m b/Core/DOM classes/SVGImageElement.m index 5c4585d2f..d18899a43 100644 --- a/Core/DOM classes/SVGImageElement.m +++ b/Core/DOM classes/SVGImageElement.m @@ -34,7 +34,7 @@ CGImageRef SVGImageCGImage(SVGImageRef img) } @interface SVGImageElement() -@property (nonatomic, readwrite) NSString *href; +@property (nonatomic, retain, readwrite) NSString *href; @end @implementation SVGImageElement diff --git a/Core/DOM classes/SVGSVGElement.h b/Core/DOM classes/SVGSVGElement.h index b25c92319..4edd2d7b9 100644 --- a/Core/DOM classes/SVGSVGElement.h +++ b/Core/DOM classes/SVGSVGElement.h @@ -67,21 +67,21 @@ -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; -@property (nonatomic, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; -@property (nonatomic, readonly) NSString* contentScriptType; -@property (nonatomic, readonly) NSString* contentStyleType; +@property (nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; +@property (nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; +@property (nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; +@property (nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; +@property (nonatomic, retain, readonly) NSString* contentScriptType; +@property (nonatomic, retain, readonly) NSString* contentStyleType; @property (nonatomic, readonly) SVGRect viewport; @property (nonatomic, readonly) float pixelUnitToMillimeterX; @property (nonatomic, readonly) float pixelUnitToMillimeterY; @property (nonatomic, readonly) float screenPixelToMillimeterX; @property (nonatomic, readonly) float screenPixelToMillimeterY; @property (nonatomic, readonly) BOOL useCurrentView; -@property (nonatomic, readonly) SVGViewSpec* currentView; +@property (nonatomic, retain, readonly) SVGViewSpec* currentView; @property (nonatomic, readonly) float currentScale; -@property (nonatomic, readonly) SVGPoint* currentTranslate; +@property (nonatomic, retain, readonly) SVGPoint* currentTranslate; -(long) suspendRedraw:(long) maxWaitMilliseconds; -(void) unsuspendRedraw:(long) suspendHandleID; @@ -98,7 +98,7 @@ -(BOOL) checkEnclosure:(SVGElement*) element rect:(SVGRect) rect; -(void) deselectAll; -(SVGNumber) createSVGNumber; --(SVGLength*) createSVGLength; +-(SVGLength*) createSVGLength __attribute__((ns_returns_retained)); -(SVGAngle*) createSVGAngle; -(SVGPoint*) createSVGPoint; -(SVGMatrix*) createSVGMatrix; diff --git a/Core/DOM classes/SVGSVGElement.m b/Core/DOM classes/SVGSVGElement.m index 3e7e786f2..f5c91c4f1 100644 --- a/Core/DOM classes/SVGSVGElement.m +++ b/Core/DOM classes/SVGSVGElement.m @@ -64,7 +64,7 @@ -(SVGNumber) createSVGNumber } -(SVGLength*) createSVGLength { - return [SVGLength new]; /** NOTE: clang says this is a leak - it is NOT, it is a REQUIRED RETAIN COUNT, as per SVG Spec */ + return [SVGLength new]; } -(SVGAngle*) createSVGAngle { NSAssert( FALSE, @"Not implemented yet" ); return nil; } -(SVGPoint*) createSVGPoint { NSAssert( FALSE, @"Not implemented yet" ); return nil; } diff --git a/Core/SVGKImage.h b/Core/SVGKImage.h index b089f2d6f..d5ea73455 100644 --- a/Core/SVGKImage.h +++ b/Core/SVGKImage.h @@ -62,8 +62,8 @@ @property (nonatomic, readonly) UIImage* UIImage; /** generates an image on the fly */ #endif -@property (nonatomic, readonly) SVGLength* svgWidth; -@property (nonatomic, readonly) SVGLength* svgHeight; +@property (nonatomic, retain, readonly) SVGLength* svgWidth; +@property (nonatomic, retain, readonly) SVGLength* svgHeight; @property (nonatomic, retain, readonly) SVGKSource* source; @property (nonatomic, retain, readonly) SVGKParseResult* parseErrorsAndWarnings; diff --git a/Core/SVGKImage.m b/Core/SVGKImage.m index a66ced3c9..16788d204 100644 --- a/Core/SVGKImage.m +++ b/Core/SVGKImage.m @@ -21,8 +21,8 @@ @implementation SVGKImageCacheLine @interface SVGKImage () -@property (nonatomic, readwrite) SVGLength* svgWidth; -@property (nonatomic, readwrite) SVGLength* svgHeight; +@property (nonatomic, retain, readwrite) SVGLength* svgWidth; +@property (nonatomic, retain, readwrite) SVGLength* svgHeight; @property (nonatomic, retain, readwrite) SVGKParseResult* parseErrorsAndWarnings; @property (nonatomic, retain, readwrite) SVGKSource* source; From 507bfa6be34d64351743701e1295ff2aff337440 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 29 Sep 2012 21:47:34 +0100 Subject: [PATCH 080/110] DELETED: OS X framework DELETED: all old XCodeProject files - replaced with new, cleaner, leaner projects MOVED: all source code to a "Source" sub folder (makes it easier to make new Xcode Projects - Xcode is weak!) FIXED/ADDED: the project "iOSDemo" (which contains the old SVGPadDemo, but also an iPhone version) now shows you how to make SVG's auto re-render when you zoom a UIScrollView NOTE: SVG's in an SVGKImageView auto re-render anyway, you just need to change their bounds. HOWEVER there are major bugs in Apple's UIScrollView that require a specific workarond that CANNOT be included in SVGKit - you MUST do this change in your own code! --- SVGKit-iOS.xcodeproj/project.pbxproj | 883 +++++ .../Bitmap}/Monkey.png | Bin {RenderedSamples => Samples/Bitmap}/Note.png | Bin Samples/{ => SVG}/Blank_Map-Africa.svg | 0 Samples/{ => SVG}/CurvedDiamond.svg | 0 Samples/{ => SVG}/Europe_states_reduced.svg | 0 Samples/{ => SVG}/Lion.svg | 0 .../Location_European_nation_states.svg | 0 Samples/{ => SVG}/Map.svg | 0 Samples/{ => SVG}/Monkey.svg | 0 Samples/{ => SVG}/Note.svg | 0 .../{ => SVG}/Reinel_compass_rose-ADAM.svg | 0 Samples/{ => SVG}/Text.svg | 0 Samples/{ => SVG}/australia_states_blank.svg | 0 Samples/{ => SVG}/breaking-1.svg | 0 Samples/{ => SVG}/test-wave-1.svg | 0 Samples/{ => SVG}/uk-only.svg | 0 {Core => Source/Core}/CGPathAdditions.h | 0 {Core => Source/Core}/CGPathAdditions.m | 0 .../Core DOM/AppleSucksDOMImplementation.h | 0 .../Core DOM/AppleSucksDOMImplementation.m | 0 .../Core}/DOM classes/Core DOM/Attr.h | 0 .../Core}/DOM classes/Core DOM/Attr.m | 0 .../Core}/DOM classes/Core DOM/CDATASection.h | 0 .../Core}/DOM classes/Core DOM/CDATASection.m | 0 .../DOM classes/Core DOM/CharacterData.h | 0 .../DOM classes/Core DOM/CharacterData.m | 0 .../Core}/DOM classes/Core DOM/Comment.h | 0 .../Core}/DOM classes/Core DOM/Comment.m | 0 .../DOM classes/Core DOM/Document+Mutable.h | 0 .../Core}/DOM classes/Core DOM/Document.h | 0 .../Core}/DOM classes/Core DOM/Document.m | 0 .../DOM classes/Core DOM/DocumentFragment.h | 0 .../DOM classes/Core DOM/DocumentFragment.m | 0 .../Core}/DOM classes/Core DOM/DocumentType.h | 0 .../Core}/DOM classes/Core DOM/DocumentType.m | 0 .../Core}/DOM classes/Core DOM/Element.h | 0 .../Core}/DOM classes/Core DOM/Element.m | 0 .../DOM classes/Core DOM/EntityReference.h | 0 .../DOM classes/Core DOM/EntityReference.m | 0 .../Core}/DOM classes/Core DOM/NamedNodeMap.h | 0 .../Core}/DOM classes/Core DOM/NamedNodeMap.m | 0 .../Core}/DOM classes/Core DOM/Node+Mutable.h | 0 .../Core}/DOM classes/Core DOM/Node.h | 0 .../Core}/DOM classes/Core DOM/Node.m | 0 .../DOM classes/Core DOM/NodeList+Mutable.h | 0 .../Core}/DOM classes/Core DOM/NodeList.h | 0 .../Core}/DOM classes/Core DOM/NodeList.m | 0 .../Core DOM/ProcessingInstruction.h | 0 .../Core DOM/ProcessingInstruction.m | 0 .../Core}/DOM classes/Core DOM/Text.h | 0 .../Core}/DOM classes/Core DOM/Text.m | 0 .../Core}/DOM classes/SVG-DOM/SVGAngle.h | 0 .../Core}/DOM classes/SVG-DOM/SVGAngle.m | 0 .../Core}/DOM classes/SVG-DOM/SVGDocument.h | 0 .../Core}/DOM classes/SVG-DOM/SVGDocument.m | 0 .../DOM classes/SVG-DOM/SVGDocument_Mutable.h | 0 .../Core}/DOM classes/SVG-DOM/SVGLength.h | 0 .../Core}/DOM classes/SVG-DOM/SVGLength.m | 0 .../Core}/DOM classes/SVG-DOM/SVGMatrix.h | 0 .../Core}/DOM classes/SVG-DOM/SVGMatrix.m | 0 .../Core}/DOM classes/SVG-DOM/SVGNumber.h | 0 .../Core}/DOM classes/SVG-DOM/SVGPoint.h | 0 .../Core}/DOM classes/SVG-DOM/SVGPoint.m | 0 .../Core}/DOM classes/SVG-DOM/SVGRect.h | 0 .../SVG-DOM/SVGSVGElement_Mutable.h | 0 .../Core}/DOM classes/SVG-DOM/SVGTransform.h | 0 .../Core}/DOM classes/SVG-DOM/SVGTransform.m | 0 .../Core}/DOM classes/SVG-DOM/SVGViewSpec.h | 0 .../Core}/DOM classes/SVGCircleElement.h | 0 .../Core}/DOM classes/SVGCircleElement.m | 0 .../Core}/DOM classes/SVGDefsElement.h | 0 .../Core}/DOM classes/SVGDefsElement.m | 0 .../Core}/DOM classes/SVGDescriptionElement.h | 0 .../Core}/DOM classes/SVGDescriptionElement.m | 0 .../Core}/DOM classes/SVGElement.h | 0 .../Core}/DOM classes/SVGElement.m | 0 .../Core}/DOM classes/SVGElement_ForParser.h | 0 .../Core}/DOM classes/SVGEllipseElement.h | 0 .../Core}/DOM classes/SVGEllipseElement.m | 0 .../Core}/DOM classes/SVGGroupElement.h | 0 .../Core}/DOM classes/SVGGroupElement.m | 0 .../Core}/DOM classes/SVGImageElement.h | 0 .../Core}/DOM classes/SVGImageElement.m | 0 .../Core}/DOM classes/SVGLayeredElement.h | 0 .../Core}/DOM classes/SVGLineElement.h | 0 .../Core}/DOM classes/SVGLineElement.m | 0 .../Core}/DOM classes/SVGPathElement.h | 0 .../Core}/DOM classes/SVGPathElement.m | 0 .../Core}/DOM classes/SVGPolygonElement.h | 0 .../Core}/DOM classes/SVGPolygonElement.m | 0 .../Core}/DOM classes/SVGPolylineElement.h | 0 .../Core}/DOM classes/SVGPolylineElement.m | 0 .../Core}/DOM classes/SVGRectElement.h | 0 .../Core}/DOM classes/SVGRectElement.m | 0 .../Core}/DOM classes/SVGSVGElement.h | 0 .../Core}/DOM classes/SVGSVGElement.m | 0 .../Core}/DOM classes/SVGShapeElement.h | 0 .../Core}/DOM classes/SVGShapeElement.m | 0 .../Core}/DOM classes/SVGTextElement.h | 0 .../Core}/DOM classes/SVGTextElement.m | 0 .../Core}/DOM classes/SVGTitleElement.h | 0 .../Core}/DOM classes/SVGTitleElement.m | 0 .../Core}/Parsing/SVGKParseResult.h | 0 .../Core}/Parsing/SVGKParseResult.m | 0 .../Core}/Parsing/SVGKParserExtension.h | 0 .../Parsing/SVGKParserPatternsAndGradients.h | 0 .../Parsing/SVGKParserPatternsAndGradients.m | 0 {Core => Source/Core}/Parsing/SVGKParserSVG.h | 0 {Core => Source/Core}/Parsing/SVGKParserSVG.m | 0 .../Core}/Parsing/SVGKPointsAndPathsParser.h | 0 .../Core}/Parsing/SVGKPointsAndPathsParser.m | 0 {Core => Source/Core}/SVGKImage+SVGPathView.h | 0 {Core => Source/Core}/SVGKImage+SVGPathView.m | 0 {Core => Source/Core}/SVGKImage.h | 0 {Core => Source/Core}/SVGKImage.m | 6 +- {Core => Source/Core}/SVGKImageView.h | 0 {Core => Source/Core}/SVGKImageView.m | 19 +- {Core => Source/Core}/SVGKParser.h | 0 {Core => Source/Core}/SVGKParser.m | 0 {Core => Source/Core}/SVGKPattern.h | 0 {Core => Source/Core}/SVGKPattern.m | 0 {Core => Source/Core}/SVGKSource.h | 0 {Core => Source/Core}/SVGKSource.m | 0 {Core => Source/Core}/SVGKView.h | 0 {Core => Source/Core}/SVGKView.m | 0 {Core => Source/Core}/SVGKit.h | 3 +- {Core => Source/Core}/SVGUtils.h | 0 {Core => Source/Core}/SVGUtils.m | 0 {iOS => Source/iOS}/CALayerWithChildHitTest.h | 0 {iOS => Source/iOS}/CALayerWithChildHitTest.m | 0 {iOS => Source/iOS}/CAShapeLayerWithHitTest.h | 0 {iOS => Source/iOS}/CAShapeLayerWithHitTest.m | 0 {iOS => Source/iOS}/SVGPathView.h | 0 {iOS => Source/iOS}/SVGPathView.m | 0 .../SVGKit-iOS/SVGKit-iOS-Prefix.pch | 0 XCodeProjectData/iOSDemo/AppDelegate.h | 19 + XCodeProjectData/iOSDemo/AppDelegate.m | 88 + .../iOSDemo/DetailViewController.h | 32 + .../iOSDemo}/DetailViewController.m | 84 +- .../iOSDemo/MasterViewController.h | 7 +- .../iOSDemo/MasterViewController.m | 93 + .../iOSDemo/en.lproj/InfoPlist.strings | 2 + .../en.lproj/MasterViewController_iPad.xib | 152 + .../en.lproj/MasterViewController_iPhone.xib | 147 + .../en.lproj/iPadDetailViewController.xib | 734 ++++ .../en.lproj/iPhoneDetailViewController.xib | 704 ++++ .../iOSDemo/iOSDemo-Info.plist | 21 +- XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch | 14 + XCodeProjectData/iOSDemo/main.m | 18 + .../SVGKit-iOS.xcodeproj/project.pbxproj | 822 ---- XCodeProjects/SVGKit/Info.plist | 28 - .../SVGKit/SVGKit.xcodeproj/project.pbxproj | 1182 ------ .../SVGKitLibrary/SVGKitLibrary-Prefix.pch | 7 - XCodeProjects/SVGKit/SVGKit_Prefix.pch | 7 - .../SVGPadDemo/Classes/DetailViewController.h | 28 - .../SVGPadDemo/Classes/RootViewController.m | 65 - .../SVGPadDemo/Classes/SVGPadAppDelegate.h | 21 - .../SVGPadDemo/Classes/SVGPadAppDelegate.m | 33 - XCodeProjects/SVGPadDemo/DetailView.xib | 410 -- XCodeProjects/SVGPadDemo/MainWindow.xib | 626 ---- .../SVGPad.xcodeproj/project.pbxproj | 754 ---- XCodeProjects/SVGPadDemo/SVGPad_Prefix.pch | 17 - XCodeProjects/SVGPadDemo/main.m | 15 - .../SVGTesterDemo/Classes/ComparisonView.h | 16 - .../SVGTesterDemo/Classes/ComparisonView.m | 70 - .../Classes/MainWindowController.h | 21 - .../Classes/MainWindowController.m | 74 - .../Classes/SVGTesterAppDelegate.h | 15 - .../Classes/SVGTesterAppDelegate.m | 22 - .../SVGTesterDemo/SVGTester-Info.plist | 32 - .../SVGTesterDemo/SVGTester-Prefix.pch | 7 - .../SVGTester.xcodeproj/project.pbxproj | 429 --- .../SVGTesterDemo/en.lproj/MainMenu.xib | 3292 ----------------- .../SVGTesterDemo/en.lproj/MainWindow.xib | 291 -- XCodeProjects/SVGTesterDemo/main.m | 10 - iOSDemo.xcodeproj/project.pbxproj | 505 +++ 177 files changed, 3500 insertions(+), 8325 deletions(-) create mode 100644 SVGKit-iOS.xcodeproj/project.pbxproj rename {RenderedSamples => Samples/Bitmap}/Monkey.png (100%) rename {RenderedSamples => Samples/Bitmap}/Note.png (100%) rename Samples/{ => SVG}/Blank_Map-Africa.svg (100%) rename Samples/{ => SVG}/CurvedDiamond.svg (100%) rename Samples/{ => SVG}/Europe_states_reduced.svg (100%) rename Samples/{ => SVG}/Lion.svg (100%) rename Samples/{ => SVG}/Location_European_nation_states.svg (100%) rename Samples/{ => SVG}/Map.svg (100%) rename Samples/{ => SVG}/Monkey.svg (100%) rename Samples/{ => SVG}/Note.svg (100%) rename Samples/{ => SVG}/Reinel_compass_rose-ADAM.svg (100%) rename Samples/{ => SVG}/Text.svg (100%) rename Samples/{ => SVG}/australia_states_blank.svg (100%) rename Samples/{ => SVG}/breaking-1.svg (100%) rename Samples/{ => SVG}/test-wave-1.svg (100%) rename Samples/{ => SVG}/uk-only.svg (100%) rename {Core => Source/Core}/CGPathAdditions.h (100%) rename {Core => Source/Core}/CGPathAdditions.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/AppleSucksDOMImplementation.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/AppleSucksDOMImplementation.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Attr.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Attr.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/CDATASection.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/CDATASection.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/CharacterData.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/CharacterData.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Comment.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Comment.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Document+Mutable.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Document.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Document.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/DocumentFragment.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/DocumentFragment.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/DocumentType.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/DocumentType.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Element.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Element.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/EntityReference.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/EntityReference.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/NamedNodeMap.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/NamedNodeMap.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Node+Mutable.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Node.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Node.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/NodeList+Mutable.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/NodeList.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/NodeList.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/ProcessingInstruction.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/ProcessingInstruction.m (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Text.h (100%) rename {Core => Source/Core}/DOM classes/Core DOM/Text.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGAngle.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGAngle.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGDocument.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGDocument.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGDocument_Mutable.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGLength.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGLength.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGMatrix.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGMatrix.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGNumber.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGPoint.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGPoint.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGRect.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGTransform.h (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGTransform.m (100%) rename {Core => Source/Core}/DOM classes/SVG-DOM/SVGViewSpec.h (100%) rename {Core => Source/Core}/DOM classes/SVGCircleElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGCircleElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGDefsElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGDefsElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGDescriptionElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGDescriptionElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGElement_ForParser.h (100%) rename {Core => Source/Core}/DOM classes/SVGEllipseElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGEllipseElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGGroupElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGGroupElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGImageElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGImageElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGLayeredElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGLineElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGLineElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGPathElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGPathElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGPolygonElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGPolygonElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGPolylineElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGPolylineElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGRectElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGRectElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGSVGElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGSVGElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGShapeElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGShapeElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGTextElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGTextElement.m (100%) rename {Core => Source/Core}/DOM classes/SVGTitleElement.h (100%) rename {Core => Source/Core}/DOM classes/SVGTitleElement.m (100%) rename {Core => Source/Core}/Parsing/SVGKParseResult.h (100%) rename {Core => Source/Core}/Parsing/SVGKParseResult.m (100%) rename {Core => Source/Core}/Parsing/SVGKParserExtension.h (100%) rename {Core => Source/Core}/Parsing/SVGKParserPatternsAndGradients.h (100%) rename {Core => Source/Core}/Parsing/SVGKParserPatternsAndGradients.m (100%) rename {Core => Source/Core}/Parsing/SVGKParserSVG.h (100%) rename {Core => Source/Core}/Parsing/SVGKParserSVG.m (100%) rename {Core => Source/Core}/Parsing/SVGKPointsAndPathsParser.h (100%) rename {Core => Source/Core}/Parsing/SVGKPointsAndPathsParser.m (100%) rename {Core => Source/Core}/SVGKImage+SVGPathView.h (100%) rename {Core => Source/Core}/SVGKImage+SVGPathView.m (100%) rename {Core => Source/Core}/SVGKImage.h (100%) rename {Core => Source/Core}/SVGKImage.m (97%) rename {Core => Source/Core}/SVGKImageView.h (100%) rename {Core => Source/Core}/SVGKImageView.m (71%) rename {Core => Source/Core}/SVGKParser.h (100%) rename {Core => Source/Core}/SVGKParser.m (100%) rename {Core => Source/Core}/SVGKPattern.h (100%) rename {Core => Source/Core}/SVGKPattern.m (100%) rename {Core => Source/Core}/SVGKSource.h (100%) rename {Core => Source/Core}/SVGKSource.m (100%) rename {Core => Source/Core}/SVGKView.h (100%) rename {Core => Source/Core}/SVGKView.m (100%) rename {Core => Source/Core}/SVGKit.h (97%) rename {Core => Source/Core}/SVGUtils.h (100%) rename {Core => Source/Core}/SVGUtils.m (100%) rename {iOS => Source/iOS}/CALayerWithChildHitTest.h (100%) rename {iOS => Source/iOS}/CALayerWithChildHitTest.m (100%) rename {iOS => Source/iOS}/CAShapeLayerWithHitTest.h (100%) rename {iOS => Source/iOS}/CAShapeLayerWithHitTest.m (100%) rename {iOS => Source/iOS}/SVGPathView.h (100%) rename {iOS => Source/iOS}/SVGPathView.m (100%) rename {XCodeProjects/SVGKit-iOS => XCodeProjectData}/SVGKit-iOS/SVGKit-iOS-Prefix.pch (100%) create mode 100644 XCodeProjectData/iOSDemo/AppDelegate.h create mode 100644 XCodeProjectData/iOSDemo/AppDelegate.m create mode 100644 XCodeProjectData/iOSDemo/DetailViewController.h rename {XCodeProjects/SVGPadDemo/Classes => XCodeProjectData/iOSDemo}/DetailViewController.m (61%) rename XCodeProjects/SVGPadDemo/Classes/RootViewController.h => XCodeProjectData/iOSDemo/MasterViewController.h (65%) create mode 100644 XCodeProjectData/iOSDemo/MasterViewController.m create mode 100644 XCodeProjectData/iOSDemo/en.lproj/InfoPlist.strings create mode 100644 XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib create mode 100644 XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib create mode 100644 XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib create mode 100644 XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib rename XCodeProjects/SVGPadDemo/SVGPad-Info.plist => XCodeProjectData/iOSDemo/iOSDemo-Info.plist (66%) create mode 100644 XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch create mode 100644 XCodeProjectData/iOSDemo/main.m delete mode 100644 XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj delete mode 100644 XCodeProjects/SVGKit/Info.plist delete mode 100644 XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj delete mode 100644 XCodeProjects/SVGKit/SVGKitLibrary/SVGKitLibrary-Prefix.pch delete mode 100644 XCodeProjects/SVGKit/SVGKit_Prefix.pch delete mode 100644 XCodeProjects/SVGPadDemo/Classes/DetailViewController.h delete mode 100644 XCodeProjects/SVGPadDemo/Classes/RootViewController.m delete mode 100644 XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h delete mode 100644 XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.m delete mode 100644 XCodeProjects/SVGPadDemo/DetailView.xib delete mode 100644 XCodeProjects/SVGPadDemo/MainWindow.xib delete mode 100755 XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj delete mode 100644 XCodeProjects/SVGPadDemo/SVGPad_Prefix.pch delete mode 100644 XCodeProjects/SVGPadDemo/main.m delete mode 100644 XCodeProjects/SVGTesterDemo/Classes/ComparisonView.h delete mode 100644 XCodeProjects/SVGTesterDemo/Classes/ComparisonView.m delete mode 100644 XCodeProjects/SVGTesterDemo/Classes/MainWindowController.h delete mode 100644 XCodeProjects/SVGTesterDemo/Classes/MainWindowController.m delete mode 100644 XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.h delete mode 100644 XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.m delete mode 100644 XCodeProjects/SVGTesterDemo/SVGTester-Info.plist delete mode 100644 XCodeProjects/SVGTesterDemo/SVGTester-Prefix.pch delete mode 100644 XCodeProjects/SVGTesterDemo/SVGTester.xcodeproj/project.pbxproj delete mode 100644 XCodeProjects/SVGTesterDemo/en.lproj/MainMenu.xib delete mode 100644 XCodeProjects/SVGTesterDemo/en.lproj/MainWindow.xib delete mode 100644 XCodeProjects/SVGTesterDemo/main.m create mode 100644 iOSDemo.xcodeproj/project.pbxproj diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj new file mode 100644 index 000000000..521f3ae57 --- /dev/null +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -0,0 +1,883 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639619116145D0400E58CCA /* Foundation.framework */; }; + 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639633F16145DDC00E58CCA /* libxml2.dylib */; }; + 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634116148CDF00E58CCA /* QuartzCore.framework */; }; + 6639634716148DEC00E58CCA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634616148DEC00E58CCA /* CoreGraphics.framework */; }; + 6649DFE816172CCC00AFE92A /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF6D16172CCC00AFE92A /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFE916172CCC00AFE92A /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF6E16172CCC00AFE92A /* CGPathAdditions.m */; }; + 6649DFEA16172CCC00AFE92A /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7116172CCC00AFE92A /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFEB16172CCC00AFE92A /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7216172CCC00AFE92A /* AppleSucksDOMImplementation.m */; }; + 6649DFEC16172CCC00AFE92A /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7316172CCC00AFE92A /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFED16172CCC00AFE92A /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7416172CCC00AFE92A /* Attr.m */; }; + 6649DFEE16172CCC00AFE92A /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7516172CCC00AFE92A /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFEF16172CCC00AFE92A /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7616172CCC00AFE92A /* CDATASection.m */; }; + 6649DFF016172CCC00AFE92A /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7716172CCC00AFE92A /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFF116172CCC00AFE92A /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7816172CCC00AFE92A /* CharacterData.m */; }; + 6649DFF216172CCC00AFE92A /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7916172CCC00AFE92A /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFF316172CCC00AFE92A /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7A16172CCC00AFE92A /* Comment.m */; }; + 6649DFF416172CCC00AFE92A /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7B16172CCC00AFE92A /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFF516172CCC00AFE92A /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7C16172CCC00AFE92A /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFF616172CCC00AFE92A /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7D16172CCC00AFE92A /* Document.m */; }; + 6649DFF716172CCC00AFE92A /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF7E16172CCC00AFE92A /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFF816172CCC00AFE92A /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF7F16172CCC00AFE92A /* DocumentFragment.m */; }; + 6649DFF916172CCC00AFE92A /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8016172CCC00AFE92A /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFFA16172CCC00AFE92A /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8116172CCC00AFE92A /* DocumentType.m */; }; + 6649DFFB16172CCC00AFE92A /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8216172CCC00AFE92A /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFFC16172CCC00AFE92A /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8316172CCC00AFE92A /* Element.m */; }; + 6649DFFD16172CCC00AFE92A /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8416172CCC00AFE92A /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649DFFE16172CCC00AFE92A /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8516172CCC00AFE92A /* EntityReference.m */; }; + 6649DFFF16172CCC00AFE92A /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8616172CCC00AFE92A /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00016172CCC00AFE92A /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8716172CCC00AFE92A /* NamedNodeMap.m */; }; + 6649E00116172CCC00AFE92A /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8816172CCC00AFE92A /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00216172CCC00AFE92A /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8916172CCC00AFE92A /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00316172CCC00AFE92A /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8A16172CCC00AFE92A /* Node.m */; }; + 6649E00416172CCC00AFE92A /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8B16172CCC00AFE92A /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00516172CCC00AFE92A /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8C16172CCC00AFE92A /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00616172CCC00AFE92A /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8D16172CCC00AFE92A /* NodeList.m */; }; + 6649E00716172CCC00AFE92A /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF8E16172CCC00AFE92A /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00816172CCC00AFE92A /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF8F16172CCC00AFE92A /* ProcessingInstruction.m */; }; + 6649E00916172CCC00AFE92A /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9016172CCC00AFE92A /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00A16172CCC00AFE92A /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF9116172CCC00AFE92A /* Text.m */; }; + 6649E00B16172CCC00AFE92A /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9316172CCC00AFE92A /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00C16172CCC00AFE92A /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF9416172CCC00AFE92A /* SVGAngle.m */; }; + 6649E00D16172CCC00AFE92A /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9516172CCC00AFE92A /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E00E16172CCC00AFE92A /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF9616172CCC00AFE92A /* SVGDocument.m */; }; + 6649E00F16172CCC00AFE92A /* SVGDocument_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9716172CCC00AFE92A /* SVGDocument_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01016172CCC00AFE92A /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9816172CCC00AFE92A /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01116172CCC00AFE92A /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF9916172CCC00AFE92A /* SVGLength.m */; }; + 6649E01216172CCC00AFE92A /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9A16172CCC00AFE92A /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01316172CCC00AFE92A /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF9B16172CCC00AFE92A /* SVGMatrix.m */; }; + 6649E01416172CCC00AFE92A /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9C16172CCC00AFE92A /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01516172CCC00AFE92A /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9D16172CCC00AFE92A /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01616172CCC00AFE92A /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DF9E16172CCC00AFE92A /* SVGPoint.m */; }; + 6649E01716172CCC00AFE92A /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DF9F16172CCC00AFE92A /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01816172CCC00AFE92A /* SVGSVGElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA016172CCC00AFE92A /* SVGSVGElement_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01916172CCC00AFE92A /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA116172CCC00AFE92A /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01A16172CCC00AFE92A /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA216172CCC00AFE92A /* SVGTransform.m */; }; + 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA316172CCC00AFE92A /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA416172CCC00AFE92A /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01D16172CCC00AFE92A /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA516172CCC00AFE92A /* SVGCircleElement.m */; }; + 6649E01E16172CCC00AFE92A /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA616172CCC00AFE92A /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E01F16172CCC00AFE92A /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA716172CCC00AFE92A /* SVGDefsElement.m */; }; + 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA816172CCC00AFE92A /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02116172CCC00AFE92A /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA916172CCC00AFE92A /* SVGDescriptionElement.m */; }; + 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFAA16172CCC00AFE92A /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02316172CCC00AFE92A /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFAB16172CCC00AFE92A /* SVGElement.m */; }; + 6649E02416172CCC00AFE92A /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFAC16172CCC00AFE92A /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02516172CCC00AFE92A /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFAD16172CCC00AFE92A /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02616172CCC00AFE92A /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFAE16172CCC00AFE92A /* SVGEllipseElement.m */; }; + 6649E02716172CCC00AFE92A /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFAF16172CCC00AFE92A /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02816172CCC00AFE92A /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFB016172CCC00AFE92A /* SVGGroupElement.m */; }; + 6649E02916172CCC00AFE92A /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFB116172CCC00AFE92A /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02A16172CCC00AFE92A /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFB216172CCC00AFE92A /* SVGImageElement.m */; }; + 6649E02B16172CCC00AFE92A /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFB316172CCC00AFE92A /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02C16172CCC00AFE92A /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFB416172CCC00AFE92A /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02D16172CCC00AFE92A /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFB516172CCC00AFE92A /* SVGLineElement.m */; }; + 6649E02E16172CCC00AFE92A /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFB616172CCC00AFE92A /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E02F16172CCC00AFE92A /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFB716172CCC00AFE92A /* SVGPathElement.m */; }; + 6649E03016172CCC00AFE92A /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFB816172CCC00AFE92A /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03116172CCC00AFE92A /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFB916172CCC00AFE92A /* SVGPolygonElement.m */; }; + 6649E03216172CCC00AFE92A /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFBA16172CCC00AFE92A /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03316172CCC00AFE92A /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFBB16172CCC00AFE92A /* SVGPolylineElement.m */; }; + 6649E03416172CCC00AFE92A /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFBC16172CCC00AFE92A /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03516172CCC00AFE92A /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFBD16172CCC00AFE92A /* SVGRectElement.m */; }; + 6649E03616172CCC00AFE92A /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFBE16172CCC00AFE92A /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03716172CCC00AFE92A /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFBF16172CCC00AFE92A /* SVGShapeElement.m */; }; + 6649E03816172CCC00AFE92A /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFC016172CCC00AFE92A /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03916172CCC00AFE92A /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFC116172CCC00AFE92A /* SVGSVGElement.m */; }; + 6649E03A16172CCC00AFE92A /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFC216172CCC00AFE92A /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03B16172CCC00AFE92A /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFC316172CCC00AFE92A /* SVGTextElement.m */; }; + 6649E03C16172CCC00AFE92A /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFC416172CCC00AFE92A /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03D16172CCC00AFE92A /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFC516172CCC00AFE92A /* SVGTitleElement.m */; }; + 6649E03E16172CCC00AFE92A /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFC716172CCC00AFE92A /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E03F16172CCC00AFE92A /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFC816172CCC00AFE92A /* SVGKParseResult.m */; }; + 6649E04016172CCC00AFE92A /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFC916172CCC00AFE92A /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04116172CCC00AFE92A /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFCA16172CCC00AFE92A /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04216172CCC00AFE92A /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFCB16172CCC00AFE92A /* SVGKParserPatternsAndGradients.m */; }; + 6649E04316172CCC00AFE92A /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFCC16172CCC00AFE92A /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04416172CCC00AFE92A /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFCD16172CCC00AFE92A /* SVGKParserSVG.m */; }; + 6649E04516172CCC00AFE92A /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFCE16172CCC00AFE92A /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04616172CCC00AFE92A /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFCF16172CCC00AFE92A /* SVGKPointsAndPathsParser.m */; }; + 6649E04716172CCC00AFE92A /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFD016172CCC00AFE92A /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04816172CCC00AFE92A /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFD116172CCC00AFE92A /* SVGKImage+SVGPathView.m */; }; + 6649E04916172CCC00AFE92A /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFD216172CCC00AFE92A /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04A16172CCC00AFE92A /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFD316172CCC00AFE92A /* SVGKImage.m */; }; + 6649E04B16172CCC00AFE92A /* SVGKImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFD416172CCC00AFE92A /* SVGKImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04C16172CCC00AFE92A /* SVGKImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFD516172CCC00AFE92A /* SVGKImageView.m */; }; + 6649E04D16172CCC00AFE92A /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFD616172CCC00AFE92A /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04E16172CCC00AFE92A /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFD716172CCC00AFE92A /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E04F16172CCC00AFE92A /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFD816172CCC00AFE92A /* SVGKParser.m */; }; + 6649E05016172CCC00AFE92A /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFD916172CCC00AFE92A /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05116172CCC00AFE92A /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFDA16172CCC00AFE92A /* SVGKPattern.m */; }; + 6649E05216172CCC00AFE92A /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFDB16172CCC00AFE92A /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05316172CCC00AFE92A /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFDC16172CCC00AFE92A /* SVGKSource.m */; }; + 6649E05416172CCC00AFE92A /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFDD16172CCC00AFE92A /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05516172CCC00AFE92A /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFDE16172CCC00AFE92A /* SVGKView.m */; }; + 6649E05616172CCC00AFE92A /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFDF16172CCC00AFE92A /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05716172CCC00AFE92A /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE016172CCC00AFE92A /* SVGUtils.m */; }; + 6649E05816172CCC00AFE92A /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE216172CCC00AFE92A /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05916172CCC00AFE92A /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */; }; + 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */; }; + 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE616172CCC00AFE92A /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE716172CCC00AFE92A /* SVGPathView.m */; }; + 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */; }; + 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649E0921617432700AFE92A /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0931617432700AFE92A /* CALayerExporter.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 6639618C16145D0400E58CCA /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/${PRODUCT_NAME}"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSVGKit-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6639619116145D0400E58CCA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6639633F16145DDC00E58CCA /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; + 6639634116148CDF00E58CCA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 6639634616148DEC00E58CCA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 6649DF5916172CCC00AFE92A /* Monkey.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Monkey.png; sourceTree = ""; }; + 6649DF5A16172CCC00AFE92A /* Note.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Note.png; sourceTree = ""; }; + 6649DF5B16172CCC00AFE92A /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; + 6649DF5D16172CCC00AFE92A /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; + 6649DF5E16172CCC00AFE92A /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; + 6649DF5F16172CCC00AFE92A /* breaking-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "breaking-1.svg"; sourceTree = ""; }; + 6649DF6016172CCC00AFE92A /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; + 6649DF6116172CCC00AFE92A /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; + 6649DF6216172CCC00AFE92A /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; + 6649DF6316172CCC00AFE92A /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; + 6649DF6416172CCC00AFE92A /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; + 6649DF6516172CCC00AFE92A /* Monkey.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Monkey.svg; sourceTree = ""; }; + 6649DF6616172CCC00AFE92A /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; + 6649DF6716172CCC00AFE92A /* Reinel_compass_rose-ADAM.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Reinel_compass_rose-ADAM.svg"; sourceTree = ""; }; + 6649DF6816172CCC00AFE92A /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; + 6649DF6916172CCC00AFE92A /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; + 6649DF6A16172CCC00AFE92A /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; + 6649DF6D16172CCC00AFE92A /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; + 6649DF6E16172CCC00AFE92A /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; + 6649DF7116172CCC00AFE92A /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; + 6649DF7216172CCC00AFE92A /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; + 6649DF7316172CCC00AFE92A /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; + 6649DF7416172CCC00AFE92A /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; + 6649DF7516172CCC00AFE92A /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; + 6649DF7616172CCC00AFE92A /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; + 6649DF7716172CCC00AFE92A /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; + 6649DF7816172CCC00AFE92A /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; + 6649DF7916172CCC00AFE92A /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; + 6649DF7A16172CCC00AFE92A /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; + 6649DF7B16172CCC00AFE92A /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; + 6649DF7C16172CCC00AFE92A /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; + 6649DF7D16172CCC00AFE92A /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; + 6649DF7E16172CCC00AFE92A /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; + 6649DF7F16172CCC00AFE92A /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; + 6649DF8016172CCC00AFE92A /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; + 6649DF8116172CCC00AFE92A /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; + 6649DF8216172CCC00AFE92A /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; + 6649DF8316172CCC00AFE92A /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; + 6649DF8416172CCC00AFE92A /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; + 6649DF8516172CCC00AFE92A /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; + 6649DF8616172CCC00AFE92A /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; + 6649DF8716172CCC00AFE92A /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; + 6649DF8816172CCC00AFE92A /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; + 6649DF8916172CCC00AFE92A /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; + 6649DF8A16172CCC00AFE92A /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; + 6649DF8B16172CCC00AFE92A /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; + 6649DF8C16172CCC00AFE92A /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; + 6649DF8D16172CCC00AFE92A /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; + 6649DF8E16172CCC00AFE92A /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; + 6649DF8F16172CCC00AFE92A /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; + 6649DF9016172CCC00AFE92A /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; + 6649DF9116172CCC00AFE92A /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; + 6649DF9316172CCC00AFE92A /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; + 6649DF9416172CCC00AFE92A /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; + 6649DF9516172CCC00AFE92A /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; + 6649DF9616172CCC00AFE92A /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; + 6649DF9716172CCC00AFE92A /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; + 6649DF9816172CCC00AFE92A /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; + 6649DF9916172CCC00AFE92A /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; + 6649DF9A16172CCC00AFE92A /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; + 6649DF9B16172CCC00AFE92A /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; + 6649DF9C16172CCC00AFE92A /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; + 6649DF9D16172CCC00AFE92A /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; + 6649DF9E16172CCC00AFE92A /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; + 6649DF9F16172CCC00AFE92A /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; + 6649DFA016172CCC00AFE92A /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; + 6649DFA116172CCC00AFE92A /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; + 6649DFA216172CCC00AFE92A /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; + 6649DFA316172CCC00AFE92A /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; + 6649DFA416172CCC00AFE92A /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; + 6649DFA516172CCC00AFE92A /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; + 6649DFA616172CCC00AFE92A /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 6649DFA716172CCC00AFE92A /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 6649DFA816172CCC00AFE92A /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; + 6649DFA916172CCC00AFE92A /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; + 6649DFAA16172CCC00AFE92A /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; + 6649DFAB16172CCC00AFE92A /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; + 6649DFAC16172CCC00AFE92A /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; + 6649DFAD16172CCC00AFE92A /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; + 6649DFAE16172CCC00AFE92A /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; + 6649DFAF16172CCC00AFE92A /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; + 6649DFB016172CCC00AFE92A /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; + 6649DFB116172CCC00AFE92A /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; + 6649DFB216172CCC00AFE92A /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; + 6649DFB316172CCC00AFE92A /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; + 6649DFB416172CCC00AFE92A /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; + 6649DFB516172CCC00AFE92A /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; + 6649DFB616172CCC00AFE92A /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; + 6649DFB716172CCC00AFE92A /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; + 6649DFB816172CCC00AFE92A /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; + 6649DFB916172CCC00AFE92A /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; + 6649DFBA16172CCC00AFE92A /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; + 6649DFBB16172CCC00AFE92A /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; + 6649DFBC16172CCC00AFE92A /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; + 6649DFBD16172CCC00AFE92A /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; + 6649DFBE16172CCC00AFE92A /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; + 6649DFBF16172CCC00AFE92A /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; + 6649DFC016172CCC00AFE92A /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; + 6649DFC116172CCC00AFE92A /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; + 6649DFC216172CCC00AFE92A /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; + 6649DFC316172CCC00AFE92A /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; + 6649DFC416172CCC00AFE92A /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; + 6649DFC516172CCC00AFE92A /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; + 6649DFC716172CCC00AFE92A /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; + 6649DFC816172CCC00AFE92A /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; + 6649DFC916172CCC00AFE92A /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; + 6649DFCA16172CCC00AFE92A /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; + 6649DFCB16172CCC00AFE92A /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; + 6649DFCC16172CCC00AFE92A /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; + 6649DFCD16172CCC00AFE92A /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; + 6649DFCE16172CCC00AFE92A /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; + 6649DFCF16172CCC00AFE92A /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; + 6649DFD016172CCC00AFE92A /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+SVGPathView.h"; sourceTree = ""; }; + 6649DFD116172CCC00AFE92A /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+SVGPathView.m"; sourceTree = ""; }; + 6649DFD216172CCC00AFE92A /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; + 6649DFD316172CCC00AFE92A /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; + 6649DFD416172CCC00AFE92A /* SVGKImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImageView.h; sourceTree = ""; }; + 6649DFD516172CCC00AFE92A /* SVGKImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImageView.m; sourceTree = ""; }; + 6649DFD616172CCC00AFE92A /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; + 6649DFD716172CCC00AFE92A /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; + 6649DFD816172CCC00AFE92A /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; + 6649DFD916172CCC00AFE92A /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; + 6649DFDA16172CCC00AFE92A /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; + 6649DFDB16172CCC00AFE92A /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; + 6649DFDC16172CCC00AFE92A /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; + 6649DFDD16172CCC00AFE92A /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; + 6649DFDE16172CCC00AFE92A /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; + 6649DFDF16172CCC00AFE92A /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; + 6649DFE016172CCC00AFE92A /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; + 6649DFE216172CCC00AFE92A /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; + 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; + 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; + 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; + 6649DFE616172CCC00AFE92A /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; + 6649DFE716172CCC00AFE92A /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; + 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; + 6649E0921617432700AFE92A /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CALayerExporter.h; path = "calayer-exporter/CALayerExporter.h"; sourceTree = SOURCE_ROOT; }; + 6649E0931617432700AFE92A /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6639618B16145D0400E58CCA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6639634716148DEC00E58CCA /* CoreGraphics.framework in Frameworks */, + 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */, + 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */, + 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6639618316145D0400E58CCA = { + isa = PBXGroup; + children = ( + 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */, + 6649E05E16172CE200AFE92A /* SVGKit-iOS */, + 6639619016145D0400E58CCA /* Frameworks */, + 6639618F16145D0400E58CCA /* Products */, + ); + sourceTree = ""; + }; + 6639618F16145D0400E58CCA /* Products */ = { + isa = PBXGroup; + children = ( + 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 6639619016145D0400E58CCA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6639633F16145DDC00E58CCA /* libxml2.dylib */, + 6639634616148DEC00E58CCA /* CoreGraphics.framework */, + 6639634116148CDF00E58CCA /* QuartzCore.framework */, + 6639619116145D0400E58CCA /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */ = { + isa = PBXGroup; + children = ( + 6649E0911617432700AFE92A /* calayer-exporter */, + 6649DF5716172CCC00AFE92A /* Samples */, + 6649DF6B16172CCC00AFE92A /* Source */, + ); + name = "EXTERNAL REFERENCES"; + sourceTree = ""; + }; + 6649DF5716172CCC00AFE92A /* Samples */ = { + isa = PBXGroup; + children = ( + 6649DF5816172CCC00AFE92A /* Bitmap */, + 6649DF5B16172CCC00AFE92A /* Sample Licenses.txt */, + 6649DF5C16172CCC00AFE92A /* SVG */, + ); + path = Samples; + sourceTree = ""; + }; + 6649DF5816172CCC00AFE92A /* Bitmap */ = { + isa = PBXGroup; + children = ( + 6649DF5916172CCC00AFE92A /* Monkey.png */, + 6649DF5A16172CCC00AFE92A /* Note.png */, + ); + path = Bitmap; + sourceTree = ""; + }; + 6649DF5C16172CCC00AFE92A /* SVG */ = { + isa = PBXGroup; + children = ( + 6649DF5D16172CCC00AFE92A /* australia_states_blank.svg */, + 6649DF5E16172CCC00AFE92A /* Blank_Map-Africa.svg */, + 6649DF5F16172CCC00AFE92A /* breaking-1.svg */, + 6649DF6016172CCC00AFE92A /* CurvedDiamond.svg */, + 6649DF6116172CCC00AFE92A /* Europe_states_reduced.svg */, + 6649DF6216172CCC00AFE92A /* Lion.svg */, + 6649DF6316172CCC00AFE92A /* Location_European_nation_states.svg */, + 6649DF6416172CCC00AFE92A /* Map.svg */, + 6649DF6516172CCC00AFE92A /* Monkey.svg */, + 6649DF6616172CCC00AFE92A /* Note.svg */, + 6649DF6716172CCC00AFE92A /* Reinel_compass_rose-ADAM.svg */, + 6649DF6816172CCC00AFE92A /* test-wave-1.svg */, + 6649DF6916172CCC00AFE92A /* Text.svg */, + 6649DF6A16172CCC00AFE92A /* uk-only.svg */, + ); + path = SVG; + sourceTree = ""; + }; + 6649DF6B16172CCC00AFE92A /* Source */ = { + isa = PBXGroup; + children = ( + 6649DF6C16172CCC00AFE92A /* Core */, + 6649DFE116172CCC00AFE92A /* iOS */, + ); + path = Source; + sourceTree = ""; + }; + 6649DF6C16172CCC00AFE92A /* Core */ = { + isa = PBXGroup; + children = ( + 6649DF6D16172CCC00AFE92A /* CGPathAdditions.h */, + 6649DF6E16172CCC00AFE92A /* CGPathAdditions.m */, + 6649DF6F16172CCC00AFE92A /* DOM classes */, + 6649DFC616172CCC00AFE92A /* Parsing */, + 6649DFD016172CCC00AFE92A /* SVGKImage+SVGPathView.h */, + 6649DFD116172CCC00AFE92A /* SVGKImage+SVGPathView.m */, + 6649DFD216172CCC00AFE92A /* SVGKImage.h */, + 6649DFD316172CCC00AFE92A /* SVGKImage.m */, + 6649DFD416172CCC00AFE92A /* SVGKImageView.h */, + 6649DFD516172CCC00AFE92A /* SVGKImageView.m */, + 6649DFD616172CCC00AFE92A /* SVGKit.h */, + 6649DFD716172CCC00AFE92A /* SVGKParser.h */, + 6649DFD816172CCC00AFE92A /* SVGKParser.m */, + 6649DFD916172CCC00AFE92A /* SVGKPattern.h */, + 6649DFDA16172CCC00AFE92A /* SVGKPattern.m */, + 6649DFDB16172CCC00AFE92A /* SVGKSource.h */, + 6649DFDC16172CCC00AFE92A /* SVGKSource.m */, + 6649DFDD16172CCC00AFE92A /* SVGKView.h */, + 6649DFDE16172CCC00AFE92A /* SVGKView.m */, + 6649DFDF16172CCC00AFE92A /* SVGUtils.h */, + 6649DFE016172CCC00AFE92A /* SVGUtils.m */, + ); + path = Core; + sourceTree = ""; + }; + 6649DF6F16172CCC00AFE92A /* DOM classes */ = { + isa = PBXGroup; + children = ( + 6649DF7016172CCC00AFE92A /* Core DOM */, + 6649DF9216172CCC00AFE92A /* SVG-DOM */, + 6649DFA416172CCC00AFE92A /* SVGCircleElement.h */, + 6649DFA516172CCC00AFE92A /* SVGCircleElement.m */, + 6649DFA616172CCC00AFE92A /* SVGDefsElement.h */, + 6649DFA716172CCC00AFE92A /* SVGDefsElement.m */, + 6649DFA816172CCC00AFE92A /* SVGDescriptionElement.h */, + 6649DFA916172CCC00AFE92A /* SVGDescriptionElement.m */, + 6649DFAA16172CCC00AFE92A /* SVGElement.h */, + 6649DFAB16172CCC00AFE92A /* SVGElement.m */, + 6649DFAC16172CCC00AFE92A /* SVGElement_ForParser.h */, + 6649DFAD16172CCC00AFE92A /* SVGEllipseElement.h */, + 6649DFAE16172CCC00AFE92A /* SVGEllipseElement.m */, + 6649DFAF16172CCC00AFE92A /* SVGGroupElement.h */, + 6649DFB016172CCC00AFE92A /* SVGGroupElement.m */, + 6649DFB116172CCC00AFE92A /* SVGImageElement.h */, + 6649DFB216172CCC00AFE92A /* SVGImageElement.m */, + 6649DFB316172CCC00AFE92A /* SVGLayeredElement.h */, + 6649DFB416172CCC00AFE92A /* SVGLineElement.h */, + 6649DFB516172CCC00AFE92A /* SVGLineElement.m */, + 6649DFB616172CCC00AFE92A /* SVGPathElement.h */, + 6649DFB716172CCC00AFE92A /* SVGPathElement.m */, + 6649DFB816172CCC00AFE92A /* SVGPolygonElement.h */, + 6649DFB916172CCC00AFE92A /* SVGPolygonElement.m */, + 6649DFBA16172CCC00AFE92A /* SVGPolylineElement.h */, + 6649DFBB16172CCC00AFE92A /* SVGPolylineElement.m */, + 6649DFBC16172CCC00AFE92A /* SVGRectElement.h */, + 6649DFBD16172CCC00AFE92A /* SVGRectElement.m */, + 6649DFBE16172CCC00AFE92A /* SVGShapeElement.h */, + 6649DFBF16172CCC00AFE92A /* SVGShapeElement.m */, + 6649DFC016172CCC00AFE92A /* SVGSVGElement.h */, + 6649DFC116172CCC00AFE92A /* SVGSVGElement.m */, + 6649DFC216172CCC00AFE92A /* SVGTextElement.h */, + 6649DFC316172CCC00AFE92A /* SVGTextElement.m */, + 6649DFC416172CCC00AFE92A /* SVGTitleElement.h */, + 6649DFC516172CCC00AFE92A /* SVGTitleElement.m */, + ); + path = "DOM classes"; + sourceTree = ""; + }; + 6649DF7016172CCC00AFE92A /* Core DOM */ = { + isa = PBXGroup; + children = ( + 6649DF7116172CCC00AFE92A /* AppleSucksDOMImplementation.h */, + 6649DF7216172CCC00AFE92A /* AppleSucksDOMImplementation.m */, + 6649DF7316172CCC00AFE92A /* Attr.h */, + 6649DF7416172CCC00AFE92A /* Attr.m */, + 6649DF7516172CCC00AFE92A /* CDATASection.h */, + 6649DF7616172CCC00AFE92A /* CDATASection.m */, + 6649DF7716172CCC00AFE92A /* CharacterData.h */, + 6649DF7816172CCC00AFE92A /* CharacterData.m */, + 6649DF7916172CCC00AFE92A /* Comment.h */, + 6649DF7A16172CCC00AFE92A /* Comment.m */, + 6649DF7B16172CCC00AFE92A /* Document+Mutable.h */, + 6649DF7C16172CCC00AFE92A /* Document.h */, + 6649DF7D16172CCC00AFE92A /* Document.m */, + 6649DF7E16172CCC00AFE92A /* DocumentFragment.h */, + 6649DF7F16172CCC00AFE92A /* DocumentFragment.m */, + 6649DF8016172CCC00AFE92A /* DocumentType.h */, + 6649DF8116172CCC00AFE92A /* DocumentType.m */, + 6649DF8216172CCC00AFE92A /* Element.h */, + 6649DF8316172CCC00AFE92A /* Element.m */, + 6649DF8416172CCC00AFE92A /* EntityReference.h */, + 6649DF8516172CCC00AFE92A /* EntityReference.m */, + 6649DF8616172CCC00AFE92A /* NamedNodeMap.h */, + 6649DF8716172CCC00AFE92A /* NamedNodeMap.m */, + 6649DF8816172CCC00AFE92A /* Node+Mutable.h */, + 6649DF8916172CCC00AFE92A /* Node.h */, + 6649DF8A16172CCC00AFE92A /* Node.m */, + 6649DF8B16172CCC00AFE92A /* NodeList+Mutable.h */, + 6649DF8C16172CCC00AFE92A /* NodeList.h */, + 6649DF8D16172CCC00AFE92A /* NodeList.m */, + 6649DF8E16172CCC00AFE92A /* ProcessingInstruction.h */, + 6649DF8F16172CCC00AFE92A /* ProcessingInstruction.m */, + 6649DF9016172CCC00AFE92A /* Text.h */, + 6649DF9116172CCC00AFE92A /* Text.m */, + ); + path = "Core DOM"; + sourceTree = ""; + }; + 6649DF9216172CCC00AFE92A /* SVG-DOM */ = { + isa = PBXGroup; + children = ( + 6649DF9316172CCC00AFE92A /* SVGAngle.h */, + 6649DF9416172CCC00AFE92A /* SVGAngle.m */, + 6649DF9516172CCC00AFE92A /* SVGDocument.h */, + 6649DF9616172CCC00AFE92A /* SVGDocument.m */, + 6649DF9716172CCC00AFE92A /* SVGDocument_Mutable.h */, + 6649DF9816172CCC00AFE92A /* SVGLength.h */, + 6649DF9916172CCC00AFE92A /* SVGLength.m */, + 6649DF9A16172CCC00AFE92A /* SVGMatrix.h */, + 6649DF9B16172CCC00AFE92A /* SVGMatrix.m */, + 6649DF9C16172CCC00AFE92A /* SVGNumber.h */, + 6649DF9D16172CCC00AFE92A /* SVGPoint.h */, + 6649DF9E16172CCC00AFE92A /* SVGPoint.m */, + 6649DF9F16172CCC00AFE92A /* SVGRect.h */, + 6649DFA016172CCC00AFE92A /* SVGSVGElement_Mutable.h */, + 6649DFA116172CCC00AFE92A /* SVGTransform.h */, + 6649DFA216172CCC00AFE92A /* SVGTransform.m */, + 6649DFA316172CCC00AFE92A /* SVGViewSpec.h */, + ); + path = "SVG-DOM"; + sourceTree = ""; + }; + 6649DFC616172CCC00AFE92A /* Parsing */ = { + isa = PBXGroup; + children = ( + 6649DFC716172CCC00AFE92A /* SVGKParseResult.h */, + 6649DFC816172CCC00AFE92A /* SVGKParseResult.m */, + 6649DFC916172CCC00AFE92A /* SVGKParserExtension.h */, + 6649DFCA16172CCC00AFE92A /* SVGKParserPatternsAndGradients.h */, + 6649DFCB16172CCC00AFE92A /* SVGKParserPatternsAndGradients.m */, + 6649DFCC16172CCC00AFE92A /* SVGKParserSVG.h */, + 6649DFCD16172CCC00AFE92A /* SVGKParserSVG.m */, + 6649DFCE16172CCC00AFE92A /* SVGKPointsAndPathsParser.h */, + 6649DFCF16172CCC00AFE92A /* SVGKPointsAndPathsParser.m */, + ); + path = Parsing; + sourceTree = ""; + }; + 6649DFE116172CCC00AFE92A /* iOS */ = { + isa = PBXGroup; + children = ( + 6649DFE216172CCC00AFE92A /* CALayerWithChildHitTest.h */, + 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */, + 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */, + 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */, + 6649DFE616172CCC00AFE92A /* SVGPathView.h */, + 6649DFE716172CCC00AFE92A /* SVGPathView.m */, + ); + path = iOS; + sourceTree = ""; + }; + 6649E05E16172CE200AFE92A /* SVGKit-iOS */ = { + isa = PBXGroup; + children = ( + 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */, + ); + name = "SVGKit-iOS"; + path = "XCodeProjectData/SVGKit-iOS"; + sourceTree = ""; + }; + 6649E0911617432700AFE92A /* calayer-exporter */ = { + isa = PBXGroup; + children = ( + 6649E0921617432700AFE92A /* CALayerExporter.h */, + 6649E0931617432700AFE92A /* CALayerExporter.m */, + ); + path = "calayer-exporter"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 6639624616145D3E00E58CCA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 6649DFE816172CCC00AFE92A /* CGPathAdditions.h in Headers */, + 6649DFEA16172CCC00AFE92A /* AppleSucksDOMImplementation.h in Headers */, + 6649DFEC16172CCC00AFE92A /* Attr.h in Headers */, + 6649DFEE16172CCC00AFE92A /* CDATASection.h in Headers */, + 6649DFF016172CCC00AFE92A /* CharacterData.h in Headers */, + 6649DFF216172CCC00AFE92A /* Comment.h in Headers */, + 6649DFF416172CCC00AFE92A /* Document+Mutable.h in Headers */, + 6649DFF516172CCC00AFE92A /* Document.h in Headers */, + 6649DFF716172CCC00AFE92A /* DocumentFragment.h in Headers */, + 6649DFF916172CCC00AFE92A /* DocumentType.h in Headers */, + 6649DFFB16172CCC00AFE92A /* Element.h in Headers */, + 6649DFFD16172CCC00AFE92A /* EntityReference.h in Headers */, + 6649DFFF16172CCC00AFE92A /* NamedNodeMap.h in Headers */, + 6649E00116172CCC00AFE92A /* Node+Mutable.h in Headers */, + 6649E00216172CCC00AFE92A /* Node.h in Headers */, + 6649E00416172CCC00AFE92A /* NodeList+Mutable.h in Headers */, + 6649E00516172CCC00AFE92A /* NodeList.h in Headers */, + 6649E00716172CCC00AFE92A /* ProcessingInstruction.h in Headers */, + 6649E00916172CCC00AFE92A /* Text.h in Headers */, + 6649E00B16172CCC00AFE92A /* SVGAngle.h in Headers */, + 6649E00D16172CCC00AFE92A /* SVGDocument.h in Headers */, + 6649E00F16172CCC00AFE92A /* SVGDocument_Mutable.h in Headers */, + 6649E01016172CCC00AFE92A /* SVGLength.h in Headers */, + 6649E01216172CCC00AFE92A /* SVGMatrix.h in Headers */, + 6649E01416172CCC00AFE92A /* SVGNumber.h in Headers */, + 6649E01516172CCC00AFE92A /* SVGPoint.h in Headers */, + 6649E01716172CCC00AFE92A /* SVGRect.h in Headers */, + 6649E01816172CCC00AFE92A /* SVGSVGElement_Mutable.h in Headers */, + 6649E01916172CCC00AFE92A /* SVGTransform.h in Headers */, + 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */, + 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */, + 6649E01E16172CCC00AFE92A /* SVGDefsElement.h in Headers */, + 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */, + 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */, + 6649E02416172CCC00AFE92A /* SVGElement_ForParser.h in Headers */, + 6649E02516172CCC00AFE92A /* SVGEllipseElement.h in Headers */, + 6649E02716172CCC00AFE92A /* SVGGroupElement.h in Headers */, + 6649E02916172CCC00AFE92A /* SVGImageElement.h in Headers */, + 6649E02B16172CCC00AFE92A /* SVGLayeredElement.h in Headers */, + 6649E02C16172CCC00AFE92A /* SVGLineElement.h in Headers */, + 6649E02E16172CCC00AFE92A /* SVGPathElement.h in Headers */, + 6649E03016172CCC00AFE92A /* SVGPolygonElement.h in Headers */, + 6649E03216172CCC00AFE92A /* SVGPolylineElement.h in Headers */, + 6649E03416172CCC00AFE92A /* SVGRectElement.h in Headers */, + 6649E03616172CCC00AFE92A /* SVGShapeElement.h in Headers */, + 6649E03816172CCC00AFE92A /* SVGSVGElement.h in Headers */, + 6649E03A16172CCC00AFE92A /* SVGTextElement.h in Headers */, + 6649E03C16172CCC00AFE92A /* SVGTitleElement.h in Headers */, + 6649E03E16172CCC00AFE92A /* SVGKParseResult.h in Headers */, + 6649E04016172CCC00AFE92A /* SVGKParserExtension.h in Headers */, + 6649E04116172CCC00AFE92A /* SVGKParserPatternsAndGradients.h in Headers */, + 6649E04316172CCC00AFE92A /* SVGKParserSVG.h in Headers */, + 6649E04516172CCC00AFE92A /* SVGKPointsAndPathsParser.h in Headers */, + 6649E04716172CCC00AFE92A /* SVGKImage+SVGPathView.h in Headers */, + 6649E04916172CCC00AFE92A /* SVGKImage.h in Headers */, + 6649E04B16172CCC00AFE92A /* SVGKImageView.h in Headers */, + 6649E04D16172CCC00AFE92A /* SVGKit.h in Headers */, + 6649E04E16172CCC00AFE92A /* SVGKParser.h in Headers */, + 6649E05016172CCC00AFE92A /* SVGKPattern.h in Headers */, + 6649E05216172CCC00AFE92A /* SVGKSource.h in Headers */, + 6649E05416172CCC00AFE92A /* SVGKView.h in Headers */, + 6649E05616172CCC00AFE92A /* SVGUtils.h in Headers */, + 6649E05816172CCC00AFE92A /* CALayerWithChildHitTest.h in Headers */, + 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */, + 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */, + 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */, + 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 6639618D16145D0400E58CCA /* SVGKit-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6639619C16145D0400E58CCA /* Build configuration list for PBXNativeTarget "SVGKit-iOS" */; + buildPhases = ( + 6639618A16145D0400E58CCA /* Sources */, + 6639618B16145D0400E58CCA /* Frameworks */, + 6639618C16145D0400E58CCA /* CopyFiles */, + 6639624616145D3E00E58CCA /* Headers */, + 663963481614968A00E58CCA /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SVGKit-iOS"; + productName = "SVGKit-iOS"; + productReference = 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6639618516145D0400E58CCA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0440; + ORGANIZATIONNAME = na; + }; + buildConfigurationList = 6639618816145D0400E58CCA /* Build configuration list for PBXProject "SVGKit-iOS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 6639618316145D0400E58CCA; + productRefGroup = 6639618F16145D0400E58CCA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6639618D16145D0400E58CCA /* SVGKit-iOS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + 663963481614968A00E58CCA /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#\n# c.f. StackOverflow question/answer here: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n#\n# Version 2.3\n#\n# Latest Change:\n# - Apple's handling of \"project files\" is broken; added a workaround for Xcode 4.5\n# - Added automatic FAIL BUILD if any of the internal commands fail\n# \n# Purpose:\n# Create a static library for iPhone from within XCode\n# Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI (Xcode 3.2.3 specifically states this in the Release notes!)\n# ...no, I don't understand why they did this!\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)\n#\n\nset -e\nset -o pipefail\n\n#################[ Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"true\"\n\nif [ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use the following variables when debugging this script; note that they may change on recursions\"\necho \"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROOT = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR = $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n# (incidental: searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep -o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\" ]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho \"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[ end of part 1 ]##################\n\n#####################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif [ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation, so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\" -project \\\"${PROJECT_NAME}.xcodeproj\\\" -target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\" BUILD_DIR=\\\"${BUILD_DIR}\\\" BUILD_ROOT=\\\"${BUILD_ROOT}\\\"\n\nxcodebuild -configuration \"${CONFIGURATION}\" -project \"${PROJECT_NAME}.xcodeproj\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\"\n\nACTION=\"build\"\n\n#Merge all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple) built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho \"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\n\n# ... remove the products of previous runs of this script\n# NB: this directory is ONLY created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir \"${CREATING_UNIVERSAL_DIR}\"\n\n#\necho \"Abou to call: lipo -create -output \\\"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\\\" \\\"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\\\" \\\"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\\\"\"\n\nlipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow suggestion to also copy \"include\" files\n# (untested, but should work OK)\n#\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\n# * needs to be outside the double quotes?\ncp -r \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include/\"* \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\nfi\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6639618A16145D0400E58CCA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6649DFE916172CCC00AFE92A /* CGPathAdditions.m in Sources */, + 6649DFEB16172CCC00AFE92A /* AppleSucksDOMImplementation.m in Sources */, + 6649DFED16172CCC00AFE92A /* Attr.m in Sources */, + 6649DFEF16172CCC00AFE92A /* CDATASection.m in Sources */, + 6649DFF116172CCC00AFE92A /* CharacterData.m in Sources */, + 6649DFF316172CCC00AFE92A /* Comment.m in Sources */, + 6649DFF616172CCC00AFE92A /* Document.m in Sources */, + 6649DFF816172CCC00AFE92A /* DocumentFragment.m in Sources */, + 6649DFFA16172CCC00AFE92A /* DocumentType.m in Sources */, + 6649DFFC16172CCC00AFE92A /* Element.m in Sources */, + 6649DFFE16172CCC00AFE92A /* EntityReference.m in Sources */, + 6649E00016172CCC00AFE92A /* NamedNodeMap.m in Sources */, + 6649E00316172CCC00AFE92A /* Node.m in Sources */, + 6649E00616172CCC00AFE92A /* NodeList.m in Sources */, + 6649E00816172CCC00AFE92A /* ProcessingInstruction.m in Sources */, + 6649E00A16172CCC00AFE92A /* Text.m in Sources */, + 6649E00C16172CCC00AFE92A /* SVGAngle.m in Sources */, + 6649E00E16172CCC00AFE92A /* SVGDocument.m in Sources */, + 6649E01116172CCC00AFE92A /* SVGLength.m in Sources */, + 6649E01316172CCC00AFE92A /* SVGMatrix.m in Sources */, + 6649E01616172CCC00AFE92A /* SVGPoint.m in Sources */, + 6649E01A16172CCC00AFE92A /* SVGTransform.m in Sources */, + 6649E01D16172CCC00AFE92A /* SVGCircleElement.m in Sources */, + 6649E01F16172CCC00AFE92A /* SVGDefsElement.m in Sources */, + 6649E02116172CCC00AFE92A /* SVGDescriptionElement.m in Sources */, + 6649E02316172CCC00AFE92A /* SVGElement.m in Sources */, + 6649E02616172CCC00AFE92A /* SVGEllipseElement.m in Sources */, + 6649E02816172CCC00AFE92A /* SVGGroupElement.m in Sources */, + 6649E02A16172CCC00AFE92A /* SVGImageElement.m in Sources */, + 6649E02D16172CCC00AFE92A /* SVGLineElement.m in Sources */, + 6649E02F16172CCC00AFE92A /* SVGPathElement.m in Sources */, + 6649E03116172CCC00AFE92A /* SVGPolygonElement.m in Sources */, + 6649E03316172CCC00AFE92A /* SVGPolylineElement.m in Sources */, + 6649E03516172CCC00AFE92A /* SVGRectElement.m in Sources */, + 6649E03716172CCC00AFE92A /* SVGShapeElement.m in Sources */, + 6649E03916172CCC00AFE92A /* SVGSVGElement.m in Sources */, + 6649E03B16172CCC00AFE92A /* SVGTextElement.m in Sources */, + 6649E03D16172CCC00AFE92A /* SVGTitleElement.m in Sources */, + 6649E03F16172CCC00AFE92A /* SVGKParseResult.m in Sources */, + 6649E04216172CCC00AFE92A /* SVGKParserPatternsAndGradients.m in Sources */, + 6649E04416172CCC00AFE92A /* SVGKParserSVG.m in Sources */, + 6649E04616172CCC00AFE92A /* SVGKPointsAndPathsParser.m in Sources */, + 6649E04816172CCC00AFE92A /* SVGKImage+SVGPathView.m in Sources */, + 6649E04A16172CCC00AFE92A /* SVGKImage.m in Sources */, + 6649E04C16172CCC00AFE92A /* SVGKImageView.m in Sources */, + 6649E04F16172CCC00AFE92A /* SVGKParser.m in Sources */, + 6649E05116172CCC00AFE92A /* SVGKPattern.m in Sources */, + 6649E05316172CCC00AFE92A /* SVGKSource.m in Sources */, + 6649E05516172CCC00AFE92A /* SVGKView.m in Sources */, + 6649E05716172CCC00AFE92A /* SVGUtils.m in Sources */, + 6649E05916172CCC00AFE92A /* CALayerWithChildHitTest.m in Sources */, + 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */, + 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */, + 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 6639619A16145D0400E58CCA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 6639619B16145D0400E58CCA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6639619D16145D0400E58CCA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/SVGKit_iOS.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "XCodeProjectData/SVGKit-iOS/SVGKit-iOS-Prefix.pch"; + HEADER_SEARCH_PATHS = /usr/include/libxml2; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 6639619E16145D0400E58CCA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/SVGKit_iOS.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "XCodeProjectData/SVGKit-iOS/SVGKit-iOS-Prefix.pch"; + HEADER_SEARCH_PATHS = /usr/include/libxml2; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6639618816145D0400E58CCA /* Build configuration list for PBXProject "SVGKit-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6639619A16145D0400E58CCA /* Debug */, + 6639619B16145D0400E58CCA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6639619C16145D0400E58CCA /* Build configuration list for PBXNativeTarget "SVGKit-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6639619D16145D0400E58CCA /* Debug */, + 6639619E16145D0400E58CCA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6639618516145D0400E58CCA /* Project object */; +} diff --git a/RenderedSamples/Monkey.png b/Samples/Bitmap/Monkey.png similarity index 100% rename from RenderedSamples/Monkey.png rename to Samples/Bitmap/Monkey.png diff --git a/RenderedSamples/Note.png b/Samples/Bitmap/Note.png similarity index 100% rename from RenderedSamples/Note.png rename to Samples/Bitmap/Note.png diff --git a/Samples/Blank_Map-Africa.svg b/Samples/SVG/Blank_Map-Africa.svg similarity index 100% rename from Samples/Blank_Map-Africa.svg rename to Samples/SVG/Blank_Map-Africa.svg diff --git a/Samples/CurvedDiamond.svg b/Samples/SVG/CurvedDiamond.svg similarity index 100% rename from Samples/CurvedDiamond.svg rename to Samples/SVG/CurvedDiamond.svg diff --git a/Samples/Europe_states_reduced.svg b/Samples/SVG/Europe_states_reduced.svg similarity index 100% rename from Samples/Europe_states_reduced.svg rename to Samples/SVG/Europe_states_reduced.svg diff --git a/Samples/Lion.svg b/Samples/SVG/Lion.svg similarity index 100% rename from Samples/Lion.svg rename to Samples/SVG/Lion.svg diff --git a/Samples/Location_European_nation_states.svg b/Samples/SVG/Location_European_nation_states.svg similarity index 100% rename from Samples/Location_European_nation_states.svg rename to Samples/SVG/Location_European_nation_states.svg diff --git a/Samples/Map.svg b/Samples/SVG/Map.svg similarity index 100% rename from Samples/Map.svg rename to Samples/SVG/Map.svg diff --git a/Samples/Monkey.svg b/Samples/SVG/Monkey.svg similarity index 100% rename from Samples/Monkey.svg rename to Samples/SVG/Monkey.svg diff --git a/Samples/Note.svg b/Samples/SVG/Note.svg similarity index 100% rename from Samples/Note.svg rename to Samples/SVG/Note.svg diff --git a/Samples/Reinel_compass_rose-ADAM.svg b/Samples/SVG/Reinel_compass_rose-ADAM.svg similarity index 100% rename from Samples/Reinel_compass_rose-ADAM.svg rename to Samples/SVG/Reinel_compass_rose-ADAM.svg diff --git a/Samples/Text.svg b/Samples/SVG/Text.svg similarity index 100% rename from Samples/Text.svg rename to Samples/SVG/Text.svg diff --git a/Samples/australia_states_blank.svg b/Samples/SVG/australia_states_blank.svg similarity index 100% rename from Samples/australia_states_blank.svg rename to Samples/SVG/australia_states_blank.svg diff --git a/Samples/breaking-1.svg b/Samples/SVG/breaking-1.svg similarity index 100% rename from Samples/breaking-1.svg rename to Samples/SVG/breaking-1.svg diff --git a/Samples/test-wave-1.svg b/Samples/SVG/test-wave-1.svg similarity index 100% rename from Samples/test-wave-1.svg rename to Samples/SVG/test-wave-1.svg diff --git a/Samples/uk-only.svg b/Samples/SVG/uk-only.svg similarity index 100% rename from Samples/uk-only.svg rename to Samples/SVG/uk-only.svg diff --git a/Core/CGPathAdditions.h b/Source/Core/CGPathAdditions.h similarity index 100% rename from Core/CGPathAdditions.h rename to Source/Core/CGPathAdditions.h diff --git a/Core/CGPathAdditions.m b/Source/Core/CGPathAdditions.m similarity index 100% rename from Core/CGPathAdditions.m rename to Source/Core/CGPathAdditions.m diff --git a/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h b/Source/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h similarity index 100% rename from Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h rename to Source/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.h diff --git a/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m b/Source/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m similarity index 100% rename from Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m rename to Source/Core/DOM classes/Core DOM/AppleSucksDOMImplementation.m diff --git a/Core/DOM classes/Core DOM/Attr.h b/Source/Core/DOM classes/Core DOM/Attr.h similarity index 100% rename from Core/DOM classes/Core DOM/Attr.h rename to Source/Core/DOM classes/Core DOM/Attr.h diff --git a/Core/DOM classes/Core DOM/Attr.m b/Source/Core/DOM classes/Core DOM/Attr.m similarity index 100% rename from Core/DOM classes/Core DOM/Attr.m rename to Source/Core/DOM classes/Core DOM/Attr.m diff --git a/Core/DOM classes/Core DOM/CDATASection.h b/Source/Core/DOM classes/Core DOM/CDATASection.h similarity index 100% rename from Core/DOM classes/Core DOM/CDATASection.h rename to Source/Core/DOM classes/Core DOM/CDATASection.h diff --git a/Core/DOM classes/Core DOM/CDATASection.m b/Source/Core/DOM classes/Core DOM/CDATASection.m similarity index 100% rename from Core/DOM classes/Core DOM/CDATASection.m rename to Source/Core/DOM classes/Core DOM/CDATASection.m diff --git a/Core/DOM classes/Core DOM/CharacterData.h b/Source/Core/DOM classes/Core DOM/CharacterData.h similarity index 100% rename from Core/DOM classes/Core DOM/CharacterData.h rename to Source/Core/DOM classes/Core DOM/CharacterData.h diff --git a/Core/DOM classes/Core DOM/CharacterData.m b/Source/Core/DOM classes/Core DOM/CharacterData.m similarity index 100% rename from Core/DOM classes/Core DOM/CharacterData.m rename to Source/Core/DOM classes/Core DOM/CharacterData.m diff --git a/Core/DOM classes/Core DOM/Comment.h b/Source/Core/DOM classes/Core DOM/Comment.h similarity index 100% rename from Core/DOM classes/Core DOM/Comment.h rename to Source/Core/DOM classes/Core DOM/Comment.h diff --git a/Core/DOM classes/Core DOM/Comment.m b/Source/Core/DOM classes/Core DOM/Comment.m similarity index 100% rename from Core/DOM classes/Core DOM/Comment.m rename to Source/Core/DOM classes/Core DOM/Comment.m diff --git a/Core/DOM classes/Core DOM/Document+Mutable.h b/Source/Core/DOM classes/Core DOM/Document+Mutable.h similarity index 100% rename from Core/DOM classes/Core DOM/Document+Mutable.h rename to Source/Core/DOM classes/Core DOM/Document+Mutable.h diff --git a/Core/DOM classes/Core DOM/Document.h b/Source/Core/DOM classes/Core DOM/Document.h similarity index 100% rename from Core/DOM classes/Core DOM/Document.h rename to Source/Core/DOM classes/Core DOM/Document.h diff --git a/Core/DOM classes/Core DOM/Document.m b/Source/Core/DOM classes/Core DOM/Document.m similarity index 100% rename from Core/DOM classes/Core DOM/Document.m rename to Source/Core/DOM classes/Core DOM/Document.m diff --git a/Core/DOM classes/Core DOM/DocumentFragment.h b/Source/Core/DOM classes/Core DOM/DocumentFragment.h similarity index 100% rename from Core/DOM classes/Core DOM/DocumentFragment.h rename to Source/Core/DOM classes/Core DOM/DocumentFragment.h diff --git a/Core/DOM classes/Core DOM/DocumentFragment.m b/Source/Core/DOM classes/Core DOM/DocumentFragment.m similarity index 100% rename from Core/DOM classes/Core DOM/DocumentFragment.m rename to Source/Core/DOM classes/Core DOM/DocumentFragment.m diff --git a/Core/DOM classes/Core DOM/DocumentType.h b/Source/Core/DOM classes/Core DOM/DocumentType.h similarity index 100% rename from Core/DOM classes/Core DOM/DocumentType.h rename to Source/Core/DOM classes/Core DOM/DocumentType.h diff --git a/Core/DOM classes/Core DOM/DocumentType.m b/Source/Core/DOM classes/Core DOM/DocumentType.m similarity index 100% rename from Core/DOM classes/Core DOM/DocumentType.m rename to Source/Core/DOM classes/Core DOM/DocumentType.m diff --git a/Core/DOM classes/Core DOM/Element.h b/Source/Core/DOM classes/Core DOM/Element.h similarity index 100% rename from Core/DOM classes/Core DOM/Element.h rename to Source/Core/DOM classes/Core DOM/Element.h diff --git a/Core/DOM classes/Core DOM/Element.m b/Source/Core/DOM classes/Core DOM/Element.m similarity index 100% rename from Core/DOM classes/Core DOM/Element.m rename to Source/Core/DOM classes/Core DOM/Element.m diff --git a/Core/DOM classes/Core DOM/EntityReference.h b/Source/Core/DOM classes/Core DOM/EntityReference.h similarity index 100% rename from Core/DOM classes/Core DOM/EntityReference.h rename to Source/Core/DOM classes/Core DOM/EntityReference.h diff --git a/Core/DOM classes/Core DOM/EntityReference.m b/Source/Core/DOM classes/Core DOM/EntityReference.m similarity index 100% rename from Core/DOM classes/Core DOM/EntityReference.m rename to Source/Core/DOM classes/Core DOM/EntityReference.m diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.h b/Source/Core/DOM classes/Core DOM/NamedNodeMap.h similarity index 100% rename from Core/DOM classes/Core DOM/NamedNodeMap.h rename to Source/Core/DOM classes/Core DOM/NamedNodeMap.h diff --git a/Core/DOM classes/Core DOM/NamedNodeMap.m b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m similarity index 100% rename from Core/DOM classes/Core DOM/NamedNodeMap.m rename to Source/Core/DOM classes/Core DOM/NamedNodeMap.m diff --git a/Core/DOM classes/Core DOM/Node+Mutable.h b/Source/Core/DOM classes/Core DOM/Node+Mutable.h similarity index 100% rename from Core/DOM classes/Core DOM/Node+Mutable.h rename to Source/Core/DOM classes/Core DOM/Node+Mutable.h diff --git a/Core/DOM classes/Core DOM/Node.h b/Source/Core/DOM classes/Core DOM/Node.h similarity index 100% rename from Core/DOM classes/Core DOM/Node.h rename to Source/Core/DOM classes/Core DOM/Node.h diff --git a/Core/DOM classes/Core DOM/Node.m b/Source/Core/DOM classes/Core DOM/Node.m similarity index 100% rename from Core/DOM classes/Core DOM/Node.m rename to Source/Core/DOM classes/Core DOM/Node.m diff --git a/Core/DOM classes/Core DOM/NodeList+Mutable.h b/Source/Core/DOM classes/Core DOM/NodeList+Mutable.h similarity index 100% rename from Core/DOM classes/Core DOM/NodeList+Mutable.h rename to Source/Core/DOM classes/Core DOM/NodeList+Mutable.h diff --git a/Core/DOM classes/Core DOM/NodeList.h b/Source/Core/DOM classes/Core DOM/NodeList.h similarity index 100% rename from Core/DOM classes/Core DOM/NodeList.h rename to Source/Core/DOM classes/Core DOM/NodeList.h diff --git a/Core/DOM classes/Core DOM/NodeList.m b/Source/Core/DOM classes/Core DOM/NodeList.m similarity index 100% rename from Core/DOM classes/Core DOM/NodeList.m rename to Source/Core/DOM classes/Core DOM/NodeList.m diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.h b/Source/Core/DOM classes/Core DOM/ProcessingInstruction.h similarity index 100% rename from Core/DOM classes/Core DOM/ProcessingInstruction.h rename to Source/Core/DOM classes/Core DOM/ProcessingInstruction.h diff --git a/Core/DOM classes/Core DOM/ProcessingInstruction.m b/Source/Core/DOM classes/Core DOM/ProcessingInstruction.m similarity index 100% rename from Core/DOM classes/Core DOM/ProcessingInstruction.m rename to Source/Core/DOM classes/Core DOM/ProcessingInstruction.m diff --git a/Core/DOM classes/Core DOM/Text.h b/Source/Core/DOM classes/Core DOM/Text.h similarity index 100% rename from Core/DOM classes/Core DOM/Text.h rename to Source/Core/DOM classes/Core DOM/Text.h diff --git a/Core/DOM classes/Core DOM/Text.m b/Source/Core/DOM classes/Core DOM/Text.m similarity index 100% rename from Core/DOM classes/Core DOM/Text.m rename to Source/Core/DOM classes/Core DOM/Text.m diff --git a/Core/DOM classes/SVG-DOM/SVGAngle.h b/Source/Core/DOM classes/SVG-DOM/SVGAngle.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGAngle.h rename to Source/Core/DOM classes/SVG-DOM/SVGAngle.h diff --git a/Core/DOM classes/SVG-DOM/SVGAngle.m b/Source/Core/DOM classes/SVG-DOM/SVGAngle.m similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGAngle.m rename to Source/Core/DOM classes/SVG-DOM/SVGAngle.m diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.h b/Source/Core/DOM classes/SVG-DOM/SVGDocument.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGDocument.h rename to Source/Core/DOM classes/SVG-DOM/SVGDocument.h diff --git a/Core/DOM classes/SVG-DOM/SVGDocument.m b/Source/Core/DOM classes/SVG-DOM/SVGDocument.m similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGDocument.m rename to Source/Core/DOM classes/SVG-DOM/SVGDocument.m diff --git a/Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h b/Source/Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h rename to Source/Core/DOM classes/SVG-DOM/SVGDocument_Mutable.h diff --git a/Core/DOM classes/SVG-DOM/SVGLength.h b/Source/Core/DOM classes/SVG-DOM/SVGLength.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGLength.h rename to Source/Core/DOM classes/SVG-DOM/SVGLength.h diff --git a/Core/DOM classes/SVG-DOM/SVGLength.m b/Source/Core/DOM classes/SVG-DOM/SVGLength.m similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGLength.m rename to Source/Core/DOM classes/SVG-DOM/SVGLength.m diff --git a/Core/DOM classes/SVG-DOM/SVGMatrix.h b/Source/Core/DOM classes/SVG-DOM/SVGMatrix.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGMatrix.h rename to Source/Core/DOM classes/SVG-DOM/SVGMatrix.h diff --git a/Core/DOM classes/SVG-DOM/SVGMatrix.m b/Source/Core/DOM classes/SVG-DOM/SVGMatrix.m similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGMatrix.m rename to Source/Core/DOM classes/SVG-DOM/SVGMatrix.m diff --git a/Core/DOM classes/SVG-DOM/SVGNumber.h b/Source/Core/DOM classes/SVG-DOM/SVGNumber.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGNumber.h rename to Source/Core/DOM classes/SVG-DOM/SVGNumber.h diff --git a/Core/DOM classes/SVG-DOM/SVGPoint.h b/Source/Core/DOM classes/SVG-DOM/SVGPoint.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGPoint.h rename to Source/Core/DOM classes/SVG-DOM/SVGPoint.h diff --git a/Core/DOM classes/SVG-DOM/SVGPoint.m b/Source/Core/DOM classes/SVG-DOM/SVGPoint.m similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGPoint.m rename to Source/Core/DOM classes/SVG-DOM/SVGPoint.m diff --git a/Core/DOM classes/SVG-DOM/SVGRect.h b/Source/Core/DOM classes/SVG-DOM/SVGRect.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGRect.h rename to Source/Core/DOM classes/SVG-DOM/SVGRect.h diff --git a/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h b/Source/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h rename to Source/Core/DOM classes/SVG-DOM/SVGSVGElement_Mutable.h diff --git a/Core/DOM classes/SVG-DOM/SVGTransform.h b/Source/Core/DOM classes/SVG-DOM/SVGTransform.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGTransform.h rename to Source/Core/DOM classes/SVG-DOM/SVGTransform.h diff --git a/Core/DOM classes/SVG-DOM/SVGTransform.m b/Source/Core/DOM classes/SVG-DOM/SVGTransform.m similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGTransform.m rename to Source/Core/DOM classes/SVG-DOM/SVGTransform.m diff --git a/Core/DOM classes/SVG-DOM/SVGViewSpec.h b/Source/Core/DOM classes/SVG-DOM/SVGViewSpec.h similarity index 100% rename from Core/DOM classes/SVG-DOM/SVGViewSpec.h rename to Source/Core/DOM classes/SVG-DOM/SVGViewSpec.h diff --git a/Core/DOM classes/SVGCircleElement.h b/Source/Core/DOM classes/SVGCircleElement.h similarity index 100% rename from Core/DOM classes/SVGCircleElement.h rename to Source/Core/DOM classes/SVGCircleElement.h diff --git a/Core/DOM classes/SVGCircleElement.m b/Source/Core/DOM classes/SVGCircleElement.m similarity index 100% rename from Core/DOM classes/SVGCircleElement.m rename to Source/Core/DOM classes/SVGCircleElement.m diff --git a/Core/DOM classes/SVGDefsElement.h b/Source/Core/DOM classes/SVGDefsElement.h similarity index 100% rename from Core/DOM classes/SVGDefsElement.h rename to Source/Core/DOM classes/SVGDefsElement.h diff --git a/Core/DOM classes/SVGDefsElement.m b/Source/Core/DOM classes/SVGDefsElement.m similarity index 100% rename from Core/DOM classes/SVGDefsElement.m rename to Source/Core/DOM classes/SVGDefsElement.m diff --git a/Core/DOM classes/SVGDescriptionElement.h b/Source/Core/DOM classes/SVGDescriptionElement.h similarity index 100% rename from Core/DOM classes/SVGDescriptionElement.h rename to Source/Core/DOM classes/SVGDescriptionElement.h diff --git a/Core/DOM classes/SVGDescriptionElement.m b/Source/Core/DOM classes/SVGDescriptionElement.m similarity index 100% rename from Core/DOM classes/SVGDescriptionElement.m rename to Source/Core/DOM classes/SVGDescriptionElement.m diff --git a/Core/DOM classes/SVGElement.h b/Source/Core/DOM classes/SVGElement.h similarity index 100% rename from Core/DOM classes/SVGElement.h rename to Source/Core/DOM classes/SVGElement.h diff --git a/Core/DOM classes/SVGElement.m b/Source/Core/DOM classes/SVGElement.m similarity index 100% rename from Core/DOM classes/SVGElement.m rename to Source/Core/DOM classes/SVGElement.m diff --git a/Core/DOM classes/SVGElement_ForParser.h b/Source/Core/DOM classes/SVGElement_ForParser.h similarity index 100% rename from Core/DOM classes/SVGElement_ForParser.h rename to Source/Core/DOM classes/SVGElement_ForParser.h diff --git a/Core/DOM classes/SVGEllipseElement.h b/Source/Core/DOM classes/SVGEllipseElement.h similarity index 100% rename from Core/DOM classes/SVGEllipseElement.h rename to Source/Core/DOM classes/SVGEllipseElement.h diff --git a/Core/DOM classes/SVGEllipseElement.m b/Source/Core/DOM classes/SVGEllipseElement.m similarity index 100% rename from Core/DOM classes/SVGEllipseElement.m rename to Source/Core/DOM classes/SVGEllipseElement.m diff --git a/Core/DOM classes/SVGGroupElement.h b/Source/Core/DOM classes/SVGGroupElement.h similarity index 100% rename from Core/DOM classes/SVGGroupElement.h rename to Source/Core/DOM classes/SVGGroupElement.h diff --git a/Core/DOM classes/SVGGroupElement.m b/Source/Core/DOM classes/SVGGroupElement.m similarity index 100% rename from Core/DOM classes/SVGGroupElement.m rename to Source/Core/DOM classes/SVGGroupElement.m diff --git a/Core/DOM classes/SVGImageElement.h b/Source/Core/DOM classes/SVGImageElement.h similarity index 100% rename from Core/DOM classes/SVGImageElement.h rename to Source/Core/DOM classes/SVGImageElement.h diff --git a/Core/DOM classes/SVGImageElement.m b/Source/Core/DOM classes/SVGImageElement.m similarity index 100% rename from Core/DOM classes/SVGImageElement.m rename to Source/Core/DOM classes/SVGImageElement.m diff --git a/Core/DOM classes/SVGLayeredElement.h b/Source/Core/DOM classes/SVGLayeredElement.h similarity index 100% rename from Core/DOM classes/SVGLayeredElement.h rename to Source/Core/DOM classes/SVGLayeredElement.h diff --git a/Core/DOM classes/SVGLineElement.h b/Source/Core/DOM classes/SVGLineElement.h similarity index 100% rename from Core/DOM classes/SVGLineElement.h rename to Source/Core/DOM classes/SVGLineElement.h diff --git a/Core/DOM classes/SVGLineElement.m b/Source/Core/DOM classes/SVGLineElement.m similarity index 100% rename from Core/DOM classes/SVGLineElement.m rename to Source/Core/DOM classes/SVGLineElement.m diff --git a/Core/DOM classes/SVGPathElement.h b/Source/Core/DOM classes/SVGPathElement.h similarity index 100% rename from Core/DOM classes/SVGPathElement.h rename to Source/Core/DOM classes/SVGPathElement.h diff --git a/Core/DOM classes/SVGPathElement.m b/Source/Core/DOM classes/SVGPathElement.m similarity index 100% rename from Core/DOM classes/SVGPathElement.m rename to Source/Core/DOM classes/SVGPathElement.m diff --git a/Core/DOM classes/SVGPolygonElement.h b/Source/Core/DOM classes/SVGPolygonElement.h similarity index 100% rename from Core/DOM classes/SVGPolygonElement.h rename to Source/Core/DOM classes/SVGPolygonElement.h diff --git a/Core/DOM classes/SVGPolygonElement.m b/Source/Core/DOM classes/SVGPolygonElement.m similarity index 100% rename from Core/DOM classes/SVGPolygonElement.m rename to Source/Core/DOM classes/SVGPolygonElement.m diff --git a/Core/DOM classes/SVGPolylineElement.h b/Source/Core/DOM classes/SVGPolylineElement.h similarity index 100% rename from Core/DOM classes/SVGPolylineElement.h rename to Source/Core/DOM classes/SVGPolylineElement.h diff --git a/Core/DOM classes/SVGPolylineElement.m b/Source/Core/DOM classes/SVGPolylineElement.m similarity index 100% rename from Core/DOM classes/SVGPolylineElement.m rename to Source/Core/DOM classes/SVGPolylineElement.m diff --git a/Core/DOM classes/SVGRectElement.h b/Source/Core/DOM classes/SVGRectElement.h similarity index 100% rename from Core/DOM classes/SVGRectElement.h rename to Source/Core/DOM classes/SVGRectElement.h diff --git a/Core/DOM classes/SVGRectElement.m b/Source/Core/DOM classes/SVGRectElement.m similarity index 100% rename from Core/DOM classes/SVGRectElement.m rename to Source/Core/DOM classes/SVGRectElement.m diff --git a/Core/DOM classes/SVGSVGElement.h b/Source/Core/DOM classes/SVGSVGElement.h similarity index 100% rename from Core/DOM classes/SVGSVGElement.h rename to Source/Core/DOM classes/SVGSVGElement.h diff --git a/Core/DOM classes/SVGSVGElement.m b/Source/Core/DOM classes/SVGSVGElement.m similarity index 100% rename from Core/DOM classes/SVGSVGElement.m rename to Source/Core/DOM classes/SVGSVGElement.m diff --git a/Core/DOM classes/SVGShapeElement.h b/Source/Core/DOM classes/SVGShapeElement.h similarity index 100% rename from Core/DOM classes/SVGShapeElement.h rename to Source/Core/DOM classes/SVGShapeElement.h diff --git a/Core/DOM classes/SVGShapeElement.m b/Source/Core/DOM classes/SVGShapeElement.m similarity index 100% rename from Core/DOM classes/SVGShapeElement.m rename to Source/Core/DOM classes/SVGShapeElement.m diff --git a/Core/DOM classes/SVGTextElement.h b/Source/Core/DOM classes/SVGTextElement.h similarity index 100% rename from Core/DOM classes/SVGTextElement.h rename to Source/Core/DOM classes/SVGTextElement.h diff --git a/Core/DOM classes/SVGTextElement.m b/Source/Core/DOM classes/SVGTextElement.m similarity index 100% rename from Core/DOM classes/SVGTextElement.m rename to Source/Core/DOM classes/SVGTextElement.m diff --git a/Core/DOM classes/SVGTitleElement.h b/Source/Core/DOM classes/SVGTitleElement.h similarity index 100% rename from Core/DOM classes/SVGTitleElement.h rename to Source/Core/DOM classes/SVGTitleElement.h diff --git a/Core/DOM classes/SVGTitleElement.m b/Source/Core/DOM classes/SVGTitleElement.m similarity index 100% rename from Core/DOM classes/SVGTitleElement.m rename to Source/Core/DOM classes/SVGTitleElement.m diff --git a/Core/Parsing/SVGKParseResult.h b/Source/Core/Parsing/SVGKParseResult.h similarity index 100% rename from Core/Parsing/SVGKParseResult.h rename to Source/Core/Parsing/SVGKParseResult.h diff --git a/Core/Parsing/SVGKParseResult.m b/Source/Core/Parsing/SVGKParseResult.m similarity index 100% rename from Core/Parsing/SVGKParseResult.m rename to Source/Core/Parsing/SVGKParseResult.m diff --git a/Core/Parsing/SVGKParserExtension.h b/Source/Core/Parsing/SVGKParserExtension.h similarity index 100% rename from Core/Parsing/SVGKParserExtension.h rename to Source/Core/Parsing/SVGKParserExtension.h diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.h b/Source/Core/Parsing/SVGKParserPatternsAndGradients.h similarity index 100% rename from Core/Parsing/SVGKParserPatternsAndGradients.h rename to Source/Core/Parsing/SVGKParserPatternsAndGradients.h diff --git a/Core/Parsing/SVGKParserPatternsAndGradients.m b/Source/Core/Parsing/SVGKParserPatternsAndGradients.m similarity index 100% rename from Core/Parsing/SVGKParserPatternsAndGradients.m rename to Source/Core/Parsing/SVGKParserPatternsAndGradients.m diff --git a/Core/Parsing/SVGKParserSVG.h b/Source/Core/Parsing/SVGKParserSVG.h similarity index 100% rename from Core/Parsing/SVGKParserSVG.h rename to Source/Core/Parsing/SVGKParserSVG.h diff --git a/Core/Parsing/SVGKParserSVG.m b/Source/Core/Parsing/SVGKParserSVG.m similarity index 100% rename from Core/Parsing/SVGKParserSVG.m rename to Source/Core/Parsing/SVGKParserSVG.m diff --git a/Core/Parsing/SVGKPointsAndPathsParser.h b/Source/Core/Parsing/SVGKPointsAndPathsParser.h similarity index 100% rename from Core/Parsing/SVGKPointsAndPathsParser.h rename to Source/Core/Parsing/SVGKPointsAndPathsParser.h diff --git a/Core/Parsing/SVGKPointsAndPathsParser.m b/Source/Core/Parsing/SVGKPointsAndPathsParser.m similarity index 100% rename from Core/Parsing/SVGKPointsAndPathsParser.m rename to Source/Core/Parsing/SVGKPointsAndPathsParser.m diff --git a/Core/SVGKImage+SVGPathView.h b/Source/Core/SVGKImage+SVGPathView.h similarity index 100% rename from Core/SVGKImage+SVGPathView.h rename to Source/Core/SVGKImage+SVGPathView.h diff --git a/Core/SVGKImage+SVGPathView.m b/Source/Core/SVGKImage+SVGPathView.m similarity index 100% rename from Core/SVGKImage+SVGPathView.m rename to Source/Core/SVGKImage+SVGPathView.m diff --git a/Core/SVGKImage.h b/Source/Core/SVGKImage.h similarity index 100% rename from Core/SVGKImage.h rename to Source/Core/SVGKImage.h diff --git a/Core/SVGKImage.m b/Source/Core/SVGKImage.m similarity index 97% rename from Core/SVGKImage.m rename to Source/Core/SVGKImage.m index 16788d204..e69788e0a 100644 --- a/Core/SVGKImage.m +++ b/Source/Core/SVGKImage.m @@ -265,17 +265,17 @@ - (void)drawAsPatternInRect:(CGRect)rect // draws the image as a CGPattern } #if TARGET_OS_IPHONE -+ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // read sequnce of files with suffix starting at 0 or 1 ++ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration // read sequnce of files with suffix starting at 0 or 1 { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) // squence of files ++ (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration // squence of files { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; } -+ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) ++ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration { NSAssert( FALSE, @"Method unsupported / not yet implemented by SVGKit" ); return nil; diff --git a/Core/SVGKImageView.h b/Source/Core/SVGKImageView.h similarity index 100% rename from Core/SVGKImageView.h rename to Source/Core/SVGKImageView.h diff --git a/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m similarity index 71% rename from Core/SVGKImageView.m rename to Source/Core/SVGKImageView.m index 8daf9d783..725bd38e8 100755 --- a/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -22,10 +22,20 @@ - (id)initWithSVGKImage:(SVGKImage*) im self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image self.scaleMultiplier = CGSizeMake(1.0, 1.0); self.backgroundColor = [UIColor clearColor]; + + [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:nil]; + [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:nil]; + } return self; } +/** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ +-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + //[self setNeedsDisplay]; +} + /** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ -(void)setImage:(SVGKImage *)newImage @@ -58,7 +68,12 @@ -(void)setTileContents:(BOOL)newTileContents -(void)drawRect:(CGRect)rect { CGRect imageFrameAtZero = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); - CGRect scaledImageFrame = CGRectApplyAffineTransform( imageFrameAtZero, CGAffineTransformMakeScale( self.scaleMultiplier.width, self.scaleMultiplier.height)); + + CGSize multiplierFromImageToView = CGSizeMake( self.frame.size.width / imageFrameAtZero.size.width, self.frame.size.height / imageFrameAtZero.size.height ); + CGSize finalScaleMultiplier = CGSizeMake( multiplierFromImageToView.width * self.scaleMultiplier.width, multiplierFromImageToView.height * self.scaleMultiplier.height ); + + + CGRect scaledImageFrame = CGRectApplyAffineTransform( imageFrameAtZero, CGAffineTransformMakeScale( finalScaleMultiplier.width, finalScaleMultiplier.height)); int cols = 1 + self.bounds.size.width / scaledImageFrame.size.width; int rows = 1 + self.bounds.size.height / scaledImageFrame.size.height; @@ -74,7 +89,7 @@ -(void)drawRect:(CGRect)rect CGContextSaveGState(context); CGContextTranslateCTM(context, i * scaledImageFrame.size.width, k * scaledImageFrame.size.height ); - CGContextScaleCTM( context, self.scaleMultiplier.width, self.scaleMultiplier.height ); + CGContextScaleCTM( context, finalScaleMultiplier.width, finalScaleMultiplier.height ); [self.image.CALayerTree renderInContext:context]; diff --git a/Core/SVGKParser.h b/Source/Core/SVGKParser.h similarity index 100% rename from Core/SVGKParser.h rename to Source/Core/SVGKParser.h diff --git a/Core/SVGKParser.m b/Source/Core/SVGKParser.m similarity index 100% rename from Core/SVGKParser.m rename to Source/Core/SVGKParser.m diff --git a/Core/SVGKPattern.h b/Source/Core/SVGKPattern.h similarity index 100% rename from Core/SVGKPattern.h rename to Source/Core/SVGKPattern.h diff --git a/Core/SVGKPattern.m b/Source/Core/SVGKPattern.m similarity index 100% rename from Core/SVGKPattern.m rename to Source/Core/SVGKPattern.m diff --git a/Core/SVGKSource.h b/Source/Core/SVGKSource.h similarity index 100% rename from Core/SVGKSource.h rename to Source/Core/SVGKSource.h diff --git a/Core/SVGKSource.m b/Source/Core/SVGKSource.m similarity index 100% rename from Core/SVGKSource.m rename to Source/Core/SVGKSource.m diff --git a/Core/SVGKView.h b/Source/Core/SVGKView.h similarity index 100% rename from Core/SVGKView.h rename to Source/Core/SVGKView.h diff --git a/Core/SVGKView.m b/Source/Core/SVGKView.m similarity index 100% rename from Core/SVGKView.m rename to Source/Core/SVGKView.m diff --git a/Core/SVGKit.h b/Source/Core/SVGKit.h similarity index 97% rename from Core/SVGKit.h rename to Source/Core/SVGKit.h index c5eedab40..231a590eb 100644 --- a/Core/SVGKit.h +++ b/Source/Core/SVGKit.h @@ -37,12 +37,13 @@ #import "SVGPolylineElement.h" #import "SVGRectElement.h" #import "SVGShapeElement.h" -#import "SVGKSource.h" + #import "SVGKSource.h" #import "SVGTitleElement.h" #import "SVGUtils.h" #import "SVGKView.h" #import "SVGPathView.h" #import "SVGKPattern.h" + #import "SVGKImageView.h" #else #import #import diff --git a/Core/SVGUtils.h b/Source/Core/SVGUtils.h similarity index 100% rename from Core/SVGUtils.h rename to Source/Core/SVGUtils.h diff --git a/Core/SVGUtils.m b/Source/Core/SVGUtils.m similarity index 100% rename from Core/SVGUtils.m rename to Source/Core/SVGUtils.m diff --git a/iOS/CALayerWithChildHitTest.h b/Source/iOS/CALayerWithChildHitTest.h similarity index 100% rename from iOS/CALayerWithChildHitTest.h rename to Source/iOS/CALayerWithChildHitTest.h diff --git a/iOS/CALayerWithChildHitTest.m b/Source/iOS/CALayerWithChildHitTest.m similarity index 100% rename from iOS/CALayerWithChildHitTest.m rename to Source/iOS/CALayerWithChildHitTest.m diff --git a/iOS/CAShapeLayerWithHitTest.h b/Source/iOS/CAShapeLayerWithHitTest.h similarity index 100% rename from iOS/CAShapeLayerWithHitTest.h rename to Source/iOS/CAShapeLayerWithHitTest.h diff --git a/iOS/CAShapeLayerWithHitTest.m b/Source/iOS/CAShapeLayerWithHitTest.m similarity index 100% rename from iOS/CAShapeLayerWithHitTest.m rename to Source/iOS/CAShapeLayerWithHitTest.m diff --git a/iOS/SVGPathView.h b/Source/iOS/SVGPathView.h similarity index 100% rename from iOS/SVGPathView.h rename to Source/iOS/SVGPathView.h diff --git a/iOS/SVGPathView.m b/Source/iOS/SVGPathView.m similarity index 100% rename from iOS/SVGPathView.m rename to Source/iOS/SVGPathView.m diff --git a/XCodeProjects/SVGKit-iOS/SVGKit-iOS/SVGKit-iOS-Prefix.pch b/XCodeProjectData/SVGKit-iOS/SVGKit-iOS-Prefix.pch similarity index 100% rename from XCodeProjects/SVGKit-iOS/SVGKit-iOS/SVGKit-iOS-Prefix.pch rename to XCodeProjectData/SVGKit-iOS/SVGKit-iOS-Prefix.pch diff --git a/XCodeProjectData/iOSDemo/AppDelegate.h b/XCodeProjectData/iOSDemo/AppDelegate.h new file mode 100644 index 000000000..c3e84be58 --- /dev/null +++ b/XCodeProjectData/iOSDemo/AppDelegate.h @@ -0,0 +1,19 @@ +// +// AppDelegate.h +// iOSDemo +// +// Created by adam on 29/09/2012. +// Copyright (c) 2012 na. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@property (strong, nonatomic) UINavigationController *navigationController; + +@property (strong, nonatomic) UISplitViewController *splitViewController; + +@end diff --git a/XCodeProjectData/iOSDemo/AppDelegate.m b/XCodeProjectData/iOSDemo/AppDelegate.m new file mode 100644 index 000000000..7ed9e507b --- /dev/null +++ b/XCodeProjectData/iOSDemo/AppDelegate.m @@ -0,0 +1,88 @@ +// +// AppDelegate.m +// iOSDemo +// +// Created by adam on 29/09/2012. +// Copyright (c) 2012 na. All rights reserved. +// + +#import "AppDelegate.h" + +#import "MasterViewController.h" + +#import "DetailViewController.h" + +@implementation AppDelegate + +- (void)dealloc +{ + [_window release]; + [_navigationController release]; + [_splitViewController release]; + [super dealloc]; +} + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; + // Override point for customization after application launch. + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { + MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController_iPhone" bundle:nil] autorelease]; + self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease]; + self.window.rootViewController = self.navigationController; + } else { + MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController_iPad" bundle:nil] autorelease]; + UINavigationController *masterNavigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease]; + + /** + ADAM: NB: I had to rename the XIB file. + + Apple is so bad at testing, Xcode 4.5 apparently re-introduces several regression bugs + that are 2-3 years old, where it overwrites new files with the contents of + old files at build time, and it is impossible to get it to use the real file. + + Even restarting didn't fix Xcode, but renaming the file does. + */ + DetailViewController *detailViewController = [[[DetailViewController alloc] initWithNibName:@"iPadDetailViewController" bundle:nil] autorelease]; + UINavigationController *detailNavigationController = [[[UINavigationController alloc] initWithRootViewController:detailViewController] autorelease]; + + masterViewController.detailViewController = detailViewController; + + self.splitViewController = [[[UISplitViewController alloc] init] autorelease]; + self.splitViewController.delegate = detailViewController; + self.splitViewController.viewControllers = @[masterNavigationController, detailNavigationController]; + + self.window.rootViewController = self.splitViewController; + } + [self.window makeKeyAndVisible]; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/XCodeProjectData/iOSDemo/DetailViewController.h b/XCodeProjectData/iOSDemo/DetailViewController.h new file mode 100644 index 000000000..ec61aba1b --- /dev/null +++ b/XCodeProjectData/iOSDemo/DetailViewController.h @@ -0,0 +1,32 @@ +// +// DetailViewController.h +// iOSDemo +// +// Created by adam on 29/09/2012. +// Copyright (c) 2012 na. All rights reserved. +// + +#import + +#import "SVGKit.h" +#import "CALayerExporter.h" +#import "SVGKImage.h" + +@interface DetailViewController : UIViewController < UIPopoverControllerDelegate, UISplitViewControllerDelegate , CALayerExporterDelegate, UIScrollViewDelegate> + +@property (nonatomic, retain) NSString *name; +@property (nonatomic, retain) UITextView* exportText; +@property (nonatomic, retain) NSMutableString* exportLog; +@property (nonatomic, retain) CALayerExporter* layerExporter; + +@property (nonatomic, retain) IBOutlet UIToolbar *toolbar; +@property (nonatomic, retain) IBOutlet UIScrollView *scrollViewForSVG; +@property (nonatomic, retain) IBOutlet SVGKImageView *contentView; +@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *viewActivityIndicator; + +@property (nonatomic, retain) id detailItem; + +- (IBAction)animate:(id)sender; +- (IBAction)exportLayers:(id)sender; + +@end diff --git a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m similarity index 61% rename from XCodeProjects/SVGPadDemo/Classes/DetailViewController.m rename to XCodeProjectData/iOSDemo/DetailViewController.m index 269cdd511..38672ed1a 100644 --- a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -1,13 +1,13 @@ // // DetailViewController.m -// SVGPad +// iOSDemo // -// Copyright Matt Rajca 2010-2011. All rights reserved. +// Created by adam on 29/09/2012. +// Copyright (c) 2012 na. All rights reserved. // - #import "DetailViewController.h" -#import "RootViewController.h" +#import "MasterViewController.h" #import "NodeList+Mutable.h" @@ -22,13 +22,17 @@ - (void)shakeHead; @implementation DetailViewController -@synthesize scrollView; +@synthesize scrollViewForSVG; @synthesize toolbar, popoverController, contentView, detailItem; +@synthesize viewActivityIndicator; -- (void)viewDidLoad +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - [super viewDidLoad]; + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + } + return self; } - (void)dealloc { @@ -36,15 +40,50 @@ - (void)dealloc { self.toolbar = nil; self.detailItem = nil; - [scrollView release]; [super dealloc]; } +#pragma mark - CRITICAL: this method makes Apple render SVGs in sharp focus + +-(void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale +{ + /** + + Apple's implementation of zooming is EXTREMELY poorly designed; it's a hack onto a class + that was only designed to do panning (hence the name: uiSCROLLview) + + So ... "zooming" via a UIScrollView is NOT integrated with UIView + rendering - in a UIView subclass, you CANNOT KNOW whether you have been "zoomed" + (i.e.: had your view contents ruined horribly by Apple's class) + + The three lines that follow are - allegedly - Apple's preferred way of handling + the situation. Note that we DO NOT SET view.frame! According to official docs, + view.frame is UNDEFINED (this is very worrying, breaks a huge amount of UIKit-related code, + but that's how Apple has documented / implemented it!) + */ + view.transform = CGAffineTransformIdentity; // this alters view.frame! But *not* view.bounds + view.bounds = CGRectApplyAffineTransform( view.bounds, CGAffineTransformMakeScale(scale, scale)); + [view setNeedsDisplay]; + + /** + Workaround for another bug in Apple's hacks for UIScrollView: + + - when you reset the transform, as advised by Apple, you "break" Apple's memory of the scroll factor. + ... because they "forgot" to store it anywhere (they read your view.transform as if it were a private + variable inside UIScrollView! This causes MANY bugs in applications :( ) + */ + self.scrollViewForSVG.minimumZoomScale /= scale; + self.scrollViewForSVG.maximumZoomScale /= scale; +} + +#pragma mark - rest of class + - (void)setDetailItem:(id)newDetailItem { if (detailItem != newDetailItem) { [detailItem release]; detailItem = [newDetailItem retain]; + self.view; // REQUIRED: this class is badly designed, it relies upon the view being visible before .detailedItem is set :( [self loadResource:newDetailItem]; } @@ -55,15 +94,24 @@ - (void)setDetailItem:(id)newDetailItem { - (void)loadResource:(NSString *)name { + [self.viewActivityIndicator startAnimating]; + [[NSRunLoop mainRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]]; // makes the animation appear + [self.contentView removeFromSuperview]; SVGKImage *document = [SVGKImage imageNamed:[name stringByAppendingPathExtension:@"svg"]]; + if( document == nil ) + { + [[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:@"Total failure. See console log" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + } + else + { if( document.parseErrorsAndWarnings.rootOfSVGTree != nil ) { NSLog(@"[%@] Freshly loaded document (name = %@) has size = %@", [self class], name, NSStringFromCGSize(document.size) ); - self.contentView = [[[SVGKView alloc] initWithImage:document] autorelease]; + self.contentView = [[[SVGKImageView alloc] initWithSVGKImage:document] autorelease]; if (_name) { [_name release]; @@ -72,10 +120,14 @@ - (void)loadResource:(NSString *)name _name = [name copy]; - [self.scrollView addSubview:self.contentView]; - [self.scrollView setContentSize: document.size]; - [self.scrollView zoomToRect:CGRectMake(0, 0, document.size.width, document.size.height) animated:YES]; + [self.scrollViewForSVG addSubview:self.contentView]; + [self.scrollViewForSVG setContentSize: self.contentView.frame.size]; + + float screenToDocumentSizeRatio = self.scrollViewForSVG.frame.size.width / self.contentView.frame.size.width; + self.scrollViewForSVG.minimumZoomScale = MIN( 1, screenToDocumentSizeRatio ); + self.scrollViewForSVG.maximumZoomScale = MAX( 1, screenToDocumentSizeRatio ); + NodeList* elementsUsingTagG = [document.DOMDocument getElementsByTagName:@"g"]; NSLog( @"[%@] checking for SVG standard set of elements with XML tag/node of : %@", [self class], elementsUsingTagG.internalArray ); } @@ -83,6 +135,9 @@ - (void)loadResource:(NSString *)name { [[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:[NSString stringWithFormat:@"%i fatal errors, %i warnings. First fatal = %@",[document.parseErrorsAndWarnings.errorsFatal count],[document.parseErrorsAndWarnings.errorsRecoverable count]+[document.parseErrorsAndWarnings.warnings count], ((NSError*)[document.parseErrorsAndWarnings.errorsFatal objectAtIndex:0]).localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; } + } + + [self.viewActivityIndicator stopAnimating]; } - (IBAction)animate:(id)sender { @@ -159,8 +214,8 @@ - (IBAction)exportLayers:(id)sender { UIPopoverController* exportPopover = [[UIPopoverController alloc] initWithContentViewController:textViewController]; [exportPopover setDelegate:self]; [exportPopover presentPopoverFromBarButtonItem:sender - permittedArrowDirections:UIPopoverArrowDirectionAny - animated:YES]; + permittedArrowDirections:UIPopoverArrowDirectionAny + animated:YES]; _exportText = textView; _exportText.text = @"exporting..."; @@ -194,7 +249,6 @@ - (void)popoverControllerDidDismissPopover:(UIPopoverController *)pc - (void)viewDidUnload { - [self setScrollView:nil]; [super viewDidUnload]; } diff --git a/XCodeProjects/SVGPadDemo/Classes/RootViewController.h b/XCodeProjectData/iOSDemo/MasterViewController.h similarity index 65% rename from XCodeProjects/SVGPadDemo/Classes/RootViewController.h rename to XCodeProjectData/iOSDemo/MasterViewController.h index 6cd774e53..a1b67b467 100644 --- a/XCodeProjects/SVGPadDemo/Classes/RootViewController.h +++ b/XCodeProjectData/iOSDemo/MasterViewController.h @@ -7,10 +7,9 @@ @class DetailViewController; -@interface RootViewController : UITableViewController { - @private - NSArray *_sampleNames; -} +@interface MasterViewController : UITableViewController + +@property(nonatomic,retain) NSMutableArray *sampleNames; @property (nonatomic, retain) IBOutlet DetailViewController *detailViewController; diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m new file mode 100644 index 000000000..c4fe44170 --- /dev/null +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -0,0 +1,93 @@ +// +// RootViewController.m +// SVGPad +// +// Copyright Matt Rajca 2010-2011. All rights reserved. +// + +#import "MasterViewController.h" + +#import "DetailViewController.h" + +@implementation MasterViewController + +@synthesize sampleNames = _sampleNames; +@synthesize detailViewController = _detailViewController; + +- (id)init +{ + if (self) { + self.sampleNames = [NSMutableArray arrayWithObjects: @"australia_states_blank", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", nil]; + } + + /** Apple really sucks. They keep randomly changing which init methods they call, BREAKING ALL EXISTING CODE */ + return nil; +} + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + [self init]; + } + return self; +} +- (id)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + [self init]; + } + return self; +} + +- (void)dealloc { + [_detailViewController release]; + [_sampleNames release]; + + [super dealloc]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.clearsSelectionOnViewWillAppear = NO; + self.contentSizeForViewInPopover = CGSizeMake(320.0f, 600.0f); +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return YES; +} + +- (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section { + return [_sampleNames count]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + + if (!cell) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:CellIdentifier] autorelease]; + } + + cell.textLabel.text = [_sampleNames objectAtIndex:indexPath.row]; + + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { + if (!self.detailViewController) { + self.detailViewController = [[[DetailViewController alloc] initWithNibName:@"iPhoneDetailViewController" bundle:nil] autorelease]; + } + [self.navigationController pushViewController:self.detailViewController animated:YES]; + self.detailViewController.detailItem = [_sampleNames objectAtIndex:indexPath.row]; + } else { + self.detailViewController.detailItem = [_sampleNames objectAtIndex:indexPath.row]; + } +} + +@end diff --git a/XCodeProjectData/iOSDemo/en.lproj/InfoPlist.strings b/XCodeProjectData/iOSDemo/en.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/XCodeProjectData/iOSDemo/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib new file mode 100644 index 000000000..6f143d684 --- /dev/null +++ b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib @@ -0,0 +1,152 @@ + + + + 1536 + 12A206j + 2519 + 1172.1 + 613.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1856 + + + IBProxyObject + IBUITableView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 274 + {{0, 20}, {320, 832}} + + + + 3 + MQA + + YES + + 2 + + + IBUISplitViewMasterSimulatedSizeMetrics + + YES + + + + + + {320, 852} + {320, 768} + + + IBIPadFramework + Master + IBUISplitViewController + + IBUISplitViewControllerContentSizeLocation + IBUISplitViewControllerContentSizeLocationMaster + + + IBIPadFramework + YES + 1 + 0 + YES + 44 + 22 + 22 + + + + + + + view + + + + 3 + + + + dataSource + + + + 4 + + + + delegate + + + + 5 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + MasterViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 5 + + + 0 + IBIPadFramework + YES + 3 + YES + 1856 + + diff --git a/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib new file mode 100644 index 000000000..04c74ca2e --- /dev/null +++ b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib @@ -0,0 +1,147 @@ + + + + 1536 + 12A269 + 2835 + 1187 + 624.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1919 + + + IBProxyObject + IBUITableView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {{0, 20}, {320, 548}} + + + + + 3 + MQA + + YES + + + IBUIScreenMetrics + + YES + + + + + + {320, 568} + {568, 320} + + + IBCocoaTouchFramework + Retina 4 Full Screen + 2 + + IBCocoaTouchFramework + YES + 1 + 0 + YES + 44 + 22 + 22 + + + + + + + view + + + + 3 + + + + dataSource + + + + 4 + + + + delegate + + + + 5 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + + + + + MasterViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 5 + + + 0 + IBCocoaTouchFramework + YES + 3 + YES + 1919 + + diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib new file mode 100644 index 000000000..97cc11ea9 --- /dev/null +++ b/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib @@ -0,0 +1,734 @@ + + + + 1536 + 12C54 + 2840 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1926 + + + IBNSLayoutConstraint + IBProxyObject + IBUIActivityIndicatorView + IBUILabel + IBUIScrollView + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 274 + + + + 274 + + + + 274 + + + + 292 + {{337, 294}, {320, 21}} + + + + _NS:9 + NO + YES + 7 + NO + IBIPadFramework + Select a sample file from the list on the left + + 1 + MCAwIDAAA + darkTextColor + + + 0 + + 1 + 17 + + + Helvetica + 17 + 16 + + NO + + + + 292 + {{289, 361}, {349, 21}} + + + + _NS:9 + NO + YES + 7 + NO + IBIPadFramework + (rotate iPad to landscape if you cant see a list) + + + 0 + + + NO + + + {768, 1004} + + + + _NS:9 + + 3 + MC42NjY2NjY2NjY3AA + + IBIPadFramework + + + {768, 1004} + + + + _NS:9 + YES + YES + IBIPadFramework + NO + + + + 292 + {{365, 484}, {37, 37}} + + + + _NS:9 + NO + IBIPadFramework + YES + 0 + + 1 + MC4wMDYxMzA2NzIwMTYgMC4zMDE0NjA1OTc4IDAAA + + + + {{0, 20}, {768, 1004}} + + + + + 3 + MQA + + NO + + 2 + + IBIPadFramework + + + + + + + view + + + + 12 + + + + scrollViewForSVG + + + + 123 + + + + contentView + + + + 125 + + + + viewActivityIndicator + + + + 147 + + + + delegate + + + + 124 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 365 + + 1000 + + 3 + 9 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + + + + + 99 + + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + + + + 104 + + + + + 105 + + + + + 106 + + + + + 107 + + + + + 108 + + + + + + 5 + 0 + + 5 + 1 + + 289 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 361 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 337 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 294 + + 1000 + + 3 + 9 + 3 + + + + + + + 115 + + + + + 116 + + + + + 117 + + + + + 118 + + + + + 119 + + + + + 120 + + + + + 126 + + + + + 127 + + + + + 128 + + + + + 129 + + + + + 130 + + + + + 132 + + + + + 141 + + + + + 144 + + + + + 146 + + + + + + + DetailViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + SVGKImageView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + + + + + + + + + + 147 + + + + + DetailViewController + UIViewController + + id + id + + + + animate: + id + + + exportLayers: + id + + + + SVGKImageView + UIScrollView + UIToolbar + UIActivityIndicatorView + + + + contentView + SVGKImageView + + + scrollViewForSVG + UIScrollView + + + toolbar + UIToolbar + + + viewActivityIndicator + UIActivityIndicatorView + + + + IBProjectSource + ./Classes/DetailViewController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + SVGKImageView + UIView + + IBProjectSource + ./Classes/SVGKImageView.h + + + + + 0 + IBIPadFramework + YES + 3 + YES + 1926 + + diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib new file mode 100644 index 000000000..6fa6ab6d0 --- /dev/null +++ b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib @@ -0,0 +1,704 @@ + + + + 1536 + 12C54 + 2840 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1926 + + + IBNSLayoutConstraint + IBProxyObject + IBUIActivityIndicatorView + IBUILabel + IBUIScrollView + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + + + 274 + + + + 274 + + + + 292 + {{71, 200}, {179, 21}} + + + + _NS:9 + NO + YES + 7 + NO + IBCocoaTouchFramework + Loading, please wait + + 1 + MCAwIDAAA + darkTextColor + + + 0 + + 1 + 17 + + + Helvetica + 17 + 16 + + NO + + + {320, 568} + + + + _NS:9 + + 3 + MC42NjY2NjY2NjY3AA + + IBCocoaTouchFramework + + + {{0, -10}, {320, 568}} + + + + _NS:9 + YES + YES + + IBUIScreenMetrics + + YES + + + + + + {320, 568} + {568, 320} + + + IBCocoaTouchFramework + Retina 4 Full Screen + 2 + + IBCocoaTouchFramework + NO + + + + 292 + {{141, 256}, {37, 37}} + + + + _NS:9 + NO + IBCocoaTouchFramework + YES + 0 + + 1 + MC4wMDYxMzA2NzIwMTYgMC4zMDE0NjA1OTc4IDAAA + + + + {{0, 20}, {320, 548}} + + + + + 3 + MQA + + 2 + + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + contentView + + + + 43 + + + + scrollViewForSVG + + + + 44 + + + + viewActivityIndicator + + + + 48 + + + + delegate + + + + 65 + + + + + + 0 + + + + + + 1 + + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 141 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + -10 + + 1000 + + 3 + 9 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 25 + + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 8 + 29 + 3 + + + + + + + 32 + + + + + 31 + + + + + 30 + + + + + 29 + + + + + 28 + + + + + 27 + + + + + 26 + + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 3 + 0 + + 3 + 1 + + 200 + + 1000 + + 3 + 9 + 3 + + + + + + + 38 + + + + + 7 + 0 + + 0 + 1 + + 179 + + 1000 + + 3 + 9 + 1 + + + + + + 39 + + + + + 40 + + + + + 41 + + + + + 42 + + + + + 45 + + + + + 46 + + + + + 47 + + + + + 62 + + + + + 63 + + + + + 64 + + + + + + + DetailViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + + + + + SVGKImageView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 65 + + + + + DetailViewController + UIViewController + + id + id + + + + animate: + id + + + exportLayers: + id + + + + SVGKImageView + UIScrollView + UIToolbar + UIActivityIndicatorView + + + + contentView + SVGKImageView + + + scrollViewForSVG + UIScrollView + + + toolbar + UIToolbar + + + viewActivityIndicator + UIActivityIndicatorView + + + + IBProjectSource + ./Classes/DetailViewController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + SVGKImageView + UIView + + IBProjectSource + ./Classes/SVGKImageView.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + YES + 1926 + + diff --git a/XCodeProjects/SVGPadDemo/SVGPad-Info.plist b/XCodeProjectData/iOSDemo/iOSDemo-Info.plist similarity index 66% rename from XCodeProjects/SVGPadDemo/SVGPad-Info.plist rename to XCodeProjectData/iOSDemo/iOSDemo-Info.plist index c7357da71..af4296405 100644 --- a/XCodeProjects/SVGPadDemo/SVGPad-Info.plist +++ b/XCodeProjectData/iOSDemo/iOSDemo-Info.plist @@ -3,30 +3,39 @@ CFBundleDevelopmentRegion - English + en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleIconFile - CFBundleIdentifier - com.MattRajca.${PRODUCT_NAME:rfc1034identifier} + na.${PRODUCT_NAME:rfc1034identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL + CFBundleShortVersionString + 1.0 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS - NSMainNibFile - MainWindow + UIRequiredDeviceCapabilities + + armv7 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown diff --git a/XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch b/XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch new file mode 100644 index 000000000..e01e0f8f9 --- /dev/null +++ b/XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header for all source files of the 'iOSDemo' target in the 'iOSDemo' project +// + +#import + +#ifndef __IPHONE_4_0 +#warning "This project uses features only available in iOS SDK 4.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/XCodeProjectData/iOSDemo/main.m b/XCodeProjectData/iOSDemo/main.m new file mode 100644 index 000000000..140a8f314 --- /dev/null +++ b/XCodeProjectData/iOSDemo/main.m @@ -0,0 +1,18 @@ +// +// main.m +// iOSDemo +// +// Created by adam on 29/09/2012. +// Copyright (c) 2012 na. All rights reserved. +// + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj deleted file mode 100644 index fbafd23cb..000000000 --- a/XCodeProjects/SVGKit-iOS/SVGKit-iOS.xcodeproj/project.pbxproj +++ /dev/null @@ -1,822 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639619116145D0400E58CCA /* Foundation.framework */; }; - 663962BC16145D5300E58CCA /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639624816145D5300E58CCA /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962BD16145D5300E58CCA /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639624916145D5300E58CCA /* CGPathAdditions.m */; }; - 663962BE16145D5300E58CCA /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639624C16145D5300E58CCA /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962BF16145D5300E58CCA /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639624D16145D5300E58CCA /* AppleSucksDOMImplementation.m */; }; - 663962C016145D5300E58CCA /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639624E16145D5300E58CCA /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962C116145D5300E58CCA /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639624F16145D5300E58CCA /* Attr.m */; }; - 663962C216145D5300E58CCA /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625016145D5300E58CCA /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962C316145D5300E58CCA /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625116145D5300E58CCA /* CDATASection.m */; }; - 663962C416145D5300E58CCA /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625216145D5300E58CCA /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962C516145D5300E58CCA /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625316145D5300E58CCA /* CharacterData.m */; }; - 663962C616145D5300E58CCA /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625416145D5300E58CCA /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962C716145D5300E58CCA /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625516145D5300E58CCA /* Comment.m */; }; - 663962C816145D5300E58CCA /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625616145D5300E58CCA /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962C916145D5300E58CCA /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625716145D5300E58CCA /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962CA16145D5300E58CCA /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625816145D5300E58CCA /* Document.m */; }; - 663962CB16145D5300E58CCA /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625916145D5300E58CCA /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962CC16145D5300E58CCA /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625A16145D5300E58CCA /* DocumentFragment.m */; }; - 663962CD16145D5300E58CCA /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625B16145D5300E58CCA /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962CE16145D5300E58CCA /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625C16145D5300E58CCA /* DocumentType.m */; }; - 663962CF16145D5300E58CCA /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625D16145D5300E58CCA /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962D016145D5300E58CCA /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639625E16145D5300E58CCA /* Element.m */; }; - 663962D116145D5300E58CCA /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639625F16145D5300E58CCA /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962D216145D5300E58CCA /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626016145D5300E58CCA /* EntityReference.m */; }; - 663962D316145D5300E58CCA /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626116145D5300E58CCA /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962D416145D5300E58CCA /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626216145D5300E58CCA /* NamedNodeMap.m */; }; - 663962D516145D5300E58CCA /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626316145D5300E58CCA /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962D616145D5300E58CCA /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626416145D5300E58CCA /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962D716145D5300E58CCA /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626516145D5300E58CCA /* Node.m */; }; - 663962D816145D5300E58CCA /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626616145D5300E58CCA /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962D916145D5300E58CCA /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626716145D5300E58CCA /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962DA16145D5300E58CCA /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626816145D5300E58CCA /* NodeList.m */; }; - 663962DB16145D5300E58CCA /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626916145D5300E58CCA /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962DC16145D5300E58CCA /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626A16145D5300E58CCA /* ProcessingInstruction.m */; }; - 663962DD16145D5300E58CCA /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626B16145D5300E58CCA /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962DE16145D5300E58CCA /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626C16145D5300E58CCA /* Text.m */; }; - 663962DF16145D5300E58CCA /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639626E16145D5300E58CCA /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962E016145D5300E58CCA /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639626F16145D5300E58CCA /* SVGAngle.m */; }; - 663962E116145D5300E58CCA /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627016145D5300E58CCA /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962E216145D5300E58CCA /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627116145D5300E58CCA /* SVGDocument.m */; }; - 663962E316145D5300E58CCA /* SVGDocument_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627216145D5300E58CCA /* SVGDocument_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962E416145D5300E58CCA /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627316145D5300E58CCA /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962E516145D5300E58CCA /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627416145D5300E58CCA /* SVGLength.m */; }; - 663962E616145D5300E58CCA /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627516145D5300E58CCA /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962E716145D5300E58CCA /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627616145D5300E58CCA /* SVGMatrix.m */; }; - 663962E816145D5300E58CCA /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627716145D5300E58CCA /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962E916145D5300E58CCA /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627816145D5300E58CCA /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962EA16145D5300E58CCA /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627916145D5300E58CCA /* SVGPoint.m */; }; - 663962EB16145D5300E58CCA /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627A16145D5300E58CCA /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962EC16145D5300E58CCA /* SVGSVGElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627B16145D5300E58CCA /* SVGSVGElement_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962ED16145D5300E58CCA /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627C16145D5300E58CCA /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962EE16145D5300E58CCA /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639627D16145D5300E58CCA /* SVGTransform.m */; }; - 663962EF16145D5300E58CCA /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627E16145D5300E58CCA /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962F016145D5300E58CCA /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639627F16145D5300E58CCA /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962F116145D5300E58CCA /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628016145D5300E58CCA /* SVGCircleElement.m */; }; - 663962F216145D5300E58CCA /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628116145D5300E58CCA /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962F316145D5300E58CCA /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628216145D5300E58CCA /* SVGDefsElement.m */; }; - 663962F416145D5300E58CCA /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628316145D5300E58CCA /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962F516145D5300E58CCA /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628416145D5300E58CCA /* SVGDescriptionElement.m */; }; - 663962F616145D5300E58CCA /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628516145D5300E58CCA /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962F716145D5300E58CCA /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628616145D5300E58CCA /* SVGElement.m */; }; - 663962F816145D5300E58CCA /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628716145D5300E58CCA /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962F916145D5300E58CCA /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628816145D5300E58CCA /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962FA16145D5300E58CCA /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628916145D5300E58CCA /* SVGEllipseElement.m */; }; - 663962FB16145D5300E58CCA /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628A16145D5300E58CCA /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962FC16145D5300E58CCA /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628B16145D5300E58CCA /* SVGGroupElement.m */; }; - 663962FD16145D5300E58CCA /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628C16145D5300E58CCA /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663962FE16145D5300E58CCA /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639628D16145D5300E58CCA /* SVGImageElement.m */; }; - 663962FF16145D5300E58CCA /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628E16145D5300E58CCA /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630016145D5300E58CCA /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639628F16145D5300E58CCA /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630116145D5300E58CCA /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629016145D5300E58CCA /* SVGLineElement.m */; }; - 6639630216145D5300E58CCA /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629116145D5300E58CCA /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630316145D5300E58CCA /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629216145D5300E58CCA /* SVGPathElement.m */; }; - 6639630416145D5300E58CCA /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629316145D5300E58CCA /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630516145D5300E58CCA /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629416145D5300E58CCA /* SVGPolygonElement.m */; }; - 6639630616145D5300E58CCA /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629516145D5300E58CCA /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630716145D5300E58CCA /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629616145D5300E58CCA /* SVGPolylineElement.m */; }; - 6639630816145D5300E58CCA /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629716145D5300E58CCA /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630916145D5300E58CCA /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629816145D5300E58CCA /* SVGRectElement.m */; }; - 6639630A16145D5300E58CCA /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629916145D5300E58CCA /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630B16145D5300E58CCA /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629A16145D5300E58CCA /* SVGShapeElement.m */; }; - 6639630C16145D5300E58CCA /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629B16145D5300E58CCA /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630D16145D5300E58CCA /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629C16145D5300E58CCA /* SVGSVGElement.m */; }; - 6639630E16145D5300E58CCA /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629D16145D5300E58CCA /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639630F16145D5300E58CCA /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639629E16145D5300E58CCA /* SVGTextElement.m */; }; - 6639631016145D5300E58CCA /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639629F16145D5300E58CCA /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631116145D5300E58CCA /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A016145D5300E58CCA /* SVGTitleElement.m */; }; - 6639631216145D5300E58CCA /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A216145D5300E58CCA /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631316145D5300E58CCA /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A316145D5300E58CCA /* SVGKParseResult.m */; }; - 6639631416145D5300E58CCA /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A416145D5300E58CCA /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631516145D5300E58CCA /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A516145D5300E58CCA /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631616145D5300E58CCA /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A616145D5300E58CCA /* SVGKParserPatternsAndGradients.m */; }; - 6639631716145D5300E58CCA /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A716145D5300E58CCA /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631816145D5300E58CCA /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962A816145D5300E58CCA /* SVGKParserSVG.m */; }; - 6639631916145D5300E58CCA /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962A916145D5300E58CCA /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631A16145D5300E58CCA /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962AA16145D5300E58CCA /* SVGKPointsAndPathsParser.m */; }; - 6639631B16145D5300E58CCA /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962AB16145D5300E58CCA /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631C16145D5300E58CCA /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962AC16145D5300E58CCA /* SVGKImage+SVGPathView.m */; }; - 6639631D16145D5300E58CCA /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962AD16145D5300E58CCA /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639631E16145D5300E58CCA /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962AE16145D5300E58CCA /* SVGKImage.m */; }; - 6639631F16145D5300E58CCA /* SVGKImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962AF16145D5300E58CCA /* SVGKImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632016145D5300E58CCA /* SVGKImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B016145D5300E58CCA /* SVGKImageView.m */; }; - 6639632116145D5300E58CCA /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B116145D5300E58CCA /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632216145D5300E58CCA /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B216145D5300E58CCA /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632316145D5300E58CCA /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B316145D5300E58CCA /* SVGKParser.m */; }; - 6639632416145D5300E58CCA /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B416145D5300E58CCA /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632516145D5300E58CCA /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B516145D5300E58CCA /* SVGKPattern.m */; }; - 6639632616145D5300E58CCA /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B616145D5300E58CCA /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632716145D5300E58CCA /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B716145D5300E58CCA /* SVGKSource.m */; }; - 6639632816145D5300E58CCA /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962B816145D5300E58CCA /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632916145D5300E58CCA /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962B916145D5300E58CCA /* SVGKView.m */; }; - 6639632A16145D5300E58CCA /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 663962BA16145D5300E58CCA /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639632B16145D5300E58CCA /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 663962BB16145D5300E58CCA /* SVGUtils.m */; }; - 6639633316145D6800E58CCA /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639632D16145D6800E58CCA /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639633416145D6800E58CCA /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639632E16145D6800E58CCA /* CALayerWithChildHitTest.m */; }; - 6639633516145D6800E58CCA /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639632F16145D6800E58CCA /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639633616145D6800E58CCA /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639633016145D6800E58CCA /* CAShapeLayerWithHitTest.m */; }; - 6639633716145D6800E58CCA /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639633116145D6800E58CCA /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639633816145D6800E58CCA /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639633216145D6800E58CCA /* SVGPathView.m */; }; - 6639633C16145D7200E58CCA /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6639633A16145D7200E58CCA /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6639633D16145D7200E58CCA /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6639633B16145D7200E58CCA /* CALayerExporter.m */; }; - 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639633F16145DDC00E58CCA /* libxml2.dylib */; }; - 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634116148CDF00E58CCA /* QuartzCore.framework */; }; - 6639634716148DEC00E58CCA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634616148DEC00E58CCA /* CoreGraphics.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 6639618C16145D0400E58CCA /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/${PRODUCT_NAME}"; - dstSubfolderSpec = 16; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSVGKit-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6639619116145D0400E58CCA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 6639619516145D0400E58CCA /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; - 6639624816145D5300E58CCA /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; - 6639624916145D5300E58CCA /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 6639624C16145D5300E58CCA /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; - 6639624D16145D5300E58CCA /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; - 6639624E16145D5300E58CCA /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; - 6639624F16145D5300E58CCA /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; - 6639625016145D5300E58CCA /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; - 6639625116145D5300E58CCA /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; - 6639625216145D5300E58CCA /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; - 6639625316145D5300E58CCA /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; - 6639625416145D5300E58CCA /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; - 6639625516145D5300E58CCA /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; - 6639625616145D5300E58CCA /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; - 6639625716145D5300E58CCA /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; - 6639625816145D5300E58CCA /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; - 6639625916145D5300E58CCA /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; - 6639625A16145D5300E58CCA /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; - 6639625B16145D5300E58CCA /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; - 6639625C16145D5300E58CCA /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; - 6639625D16145D5300E58CCA /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; - 6639625E16145D5300E58CCA /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; - 6639625F16145D5300E58CCA /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; - 6639626016145D5300E58CCA /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; - 6639626116145D5300E58CCA /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; - 6639626216145D5300E58CCA /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; - 6639626316145D5300E58CCA /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; - 6639626416145D5300E58CCA /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; - 6639626516145D5300E58CCA /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; - 6639626616145D5300E58CCA /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; - 6639626716145D5300E58CCA /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; - 6639626816145D5300E58CCA /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; - 6639626916145D5300E58CCA /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; - 6639626A16145D5300E58CCA /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; - 6639626B16145D5300E58CCA /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; - 6639626C16145D5300E58CCA /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; - 6639626E16145D5300E58CCA /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; - 6639626F16145D5300E58CCA /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; - 6639627016145D5300E58CCA /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 6639627116145D5300E58CCA /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; - 6639627216145D5300E58CCA /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; - 6639627316145D5300E58CCA /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; - 6639627416145D5300E58CCA /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; - 6639627516145D5300E58CCA /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; - 6639627616145D5300E58CCA /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; - 6639627716145D5300E58CCA /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; - 6639627816145D5300E58CCA /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; - 6639627916145D5300E58CCA /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; - 6639627A16145D5300E58CCA /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; - 6639627B16145D5300E58CCA /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; - 6639627C16145D5300E58CCA /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; - 6639627D16145D5300E58CCA /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; - 6639627E16145D5300E58CCA /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; - 6639627F16145D5300E58CCA /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 6639628016145D5300E58CCA /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 6639628116145D5300E58CCA /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 6639628216145D5300E58CCA /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 6639628316145D5300E58CCA /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 6639628416145D5300E58CCA /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 6639628516145D5300E58CCA /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 6639628616145D5300E58CCA /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; }; - 6639628716145D5300E58CCA /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; - 6639628816145D5300E58CCA /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 6639628916145D5300E58CCA /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 6639628A16145D5300E58CCA /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 6639628B16145D5300E58CCA /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 6639628C16145D5300E58CCA /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 6639628D16145D5300E58CCA /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; - 6639628E16145D5300E58CCA /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; - 6639628F16145D5300E58CCA /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 6639629016145D5300E58CCA /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 6639629116145D5300E58CCA /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 6639629216145D5300E58CCA /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 6639629316145D5300E58CCA /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 6639629416145D5300E58CCA /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 6639629516145D5300E58CCA /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 6639629616145D5300E58CCA /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 6639629716145D5300E58CCA /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 6639629816145D5300E58CCA /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 6639629916145D5300E58CCA /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 6639629A16145D5300E58CCA /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 6639629B16145D5300E58CCA /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; - 6639629C16145D5300E58CCA /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 6639629D16145D5300E58CCA /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; - 6639629E16145D5300E58CCA /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 6639629F16145D5300E58CCA /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 663962A016145D5300E58CCA /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 663962A216145D5300E58CCA /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; - 663962A316145D5300E58CCA /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; - 663962A416145D5300E58CCA /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; - 663962A516145D5300E58CCA /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; - 663962A616145D5300E58CCA /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; - 663962A716145D5300E58CCA /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; - 663962A816145D5300E58CCA /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; - 663962A916145D5300E58CCA /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; - 663962AA16145D5300E58CCA /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; - 663962AB16145D5300E58CCA /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+SVGPathView.h"; sourceTree = ""; }; - 663962AC16145D5300E58CCA /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+SVGPathView.m"; sourceTree = ""; }; - 663962AD16145D5300E58CCA /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; - 663962AE16145D5300E58CCA /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; - 663962AF16145D5300E58CCA /* SVGKImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImageView.h; sourceTree = ""; }; - 663962B016145D5300E58CCA /* SVGKImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImageView.m; sourceTree = ""; }; - 663962B116145D5300E58CCA /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 663962B216145D5300E58CCA /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; - 663962B316145D5300E58CCA /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; - 663962B416145D5300E58CCA /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; - 663962B516145D5300E58CCA /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; - 663962B616145D5300E58CCA /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; - 663962B716145D5300E58CCA /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; - 663962B816145D5300E58CCA /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; - 663962B916145D5300E58CCA /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; - 663962BA16145D5300E58CCA /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; - 663962BB16145D5300E58CCA /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 6639632D16145D6800E58CCA /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; - 6639632E16145D6800E58CCA /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; - 6639632F16145D6800E58CCA /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; - 6639633016145D6800E58CCA /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 6639633116145D6800E58CCA /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; - 6639633216145D6800E58CCA /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; - 6639633A16145D7200E58CCA /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; - 6639633B16145D7200E58CCA /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; - 6639633F16145DDC00E58CCA /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - 6639634116148CDF00E58CCA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 6639634616148DEC00E58CCA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6639618B16145D0400E58CCA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6639634716148DEC00E58CCA /* CoreGraphics.framework in Frameworks */, - 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */, - 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */, - 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 6639618316145D0400E58CCA = { - isa = PBXGroup; - children = ( - 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */, - 6639619316145D0400E58CCA /* SVGKit-iOS */, - 6639619016145D0400E58CCA /* Frameworks */, - 6639618F16145D0400E58CCA /* Products */, - ); - sourceTree = ""; - }; - 6639618F16145D0400E58CCA /* Products */ = { - isa = PBXGroup; - children = ( - 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 6639619016145D0400E58CCA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6639633F16145DDC00E58CCA /* libxml2.dylib */, - 6639634616148DEC00E58CCA /* CoreGraphics.framework */, - 6639634116148CDF00E58CCA /* QuartzCore.framework */, - 6639619116145D0400E58CCA /* Foundation.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6639619316145D0400E58CCA /* SVGKit-iOS */ = { - isa = PBXGroup; - children = ( - 6639619416145D0400E58CCA /* Supporting Files */, - ); - path = "SVGKit-iOS"; - sourceTree = ""; - }; - 6639619416145D0400E58CCA /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6639619516145D0400E58CCA /* SVGKit-iOS-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 6639624716145D5300E58CCA /* Core */ = { - isa = PBXGroup; - children = ( - 6639624816145D5300E58CCA /* CGPathAdditions.h */, - 6639624916145D5300E58CCA /* CGPathAdditions.m */, - 6639624A16145D5300E58CCA /* DOM classes */, - 663962A116145D5300E58CCA /* Parsing */, - 663962AB16145D5300E58CCA /* SVGKImage+SVGPathView.h */, - 663962AC16145D5300E58CCA /* SVGKImage+SVGPathView.m */, - 663962AD16145D5300E58CCA /* SVGKImage.h */, - 663962AE16145D5300E58CCA /* SVGKImage.m */, - 663962AF16145D5300E58CCA /* SVGKImageView.h */, - 663962B016145D5300E58CCA /* SVGKImageView.m */, - 663962B116145D5300E58CCA /* SVGKit.h */, - 663962B216145D5300E58CCA /* SVGKParser.h */, - 663962B316145D5300E58CCA /* SVGKParser.m */, - 663962B416145D5300E58CCA /* SVGKPattern.h */, - 663962B516145D5300E58CCA /* SVGKPattern.m */, - 663962B616145D5300E58CCA /* SVGKSource.h */, - 663962B716145D5300E58CCA /* SVGKSource.m */, - 663962B816145D5300E58CCA /* SVGKView.h */, - 663962B916145D5300E58CCA /* SVGKView.m */, - 663962BA16145D5300E58CCA /* SVGUtils.h */, - 663962BB16145D5300E58CCA /* SVGUtils.m */, - ); - name = Core; - path = ../../Core; - sourceTree = ""; - }; - 6639624A16145D5300E58CCA /* DOM classes */ = { - isa = PBXGroup; - children = ( - 6639624B16145D5300E58CCA /* Core DOM */, - 6639626D16145D5300E58CCA /* SVG-DOM */, - 6639627F16145D5300E58CCA /* SVGCircleElement.h */, - 6639628016145D5300E58CCA /* SVGCircleElement.m */, - 6639628116145D5300E58CCA /* SVGDefsElement.h */, - 6639628216145D5300E58CCA /* SVGDefsElement.m */, - 6639628316145D5300E58CCA /* SVGDescriptionElement.h */, - 6639628416145D5300E58CCA /* SVGDescriptionElement.m */, - 6639628516145D5300E58CCA /* SVGElement.h */, - 6639628616145D5300E58CCA /* SVGElement.m */, - 6639628716145D5300E58CCA /* SVGElement_ForParser.h */, - 6639628816145D5300E58CCA /* SVGEllipseElement.h */, - 6639628916145D5300E58CCA /* SVGEllipseElement.m */, - 6639628A16145D5300E58CCA /* SVGGroupElement.h */, - 6639628B16145D5300E58CCA /* SVGGroupElement.m */, - 6639628C16145D5300E58CCA /* SVGImageElement.h */, - 6639628D16145D5300E58CCA /* SVGImageElement.m */, - 6639628E16145D5300E58CCA /* SVGLayeredElement.h */, - 6639628F16145D5300E58CCA /* SVGLineElement.h */, - 6639629016145D5300E58CCA /* SVGLineElement.m */, - 6639629116145D5300E58CCA /* SVGPathElement.h */, - 6639629216145D5300E58CCA /* SVGPathElement.m */, - 6639629316145D5300E58CCA /* SVGPolygonElement.h */, - 6639629416145D5300E58CCA /* SVGPolygonElement.m */, - 6639629516145D5300E58CCA /* SVGPolylineElement.h */, - 6639629616145D5300E58CCA /* SVGPolylineElement.m */, - 6639629716145D5300E58CCA /* SVGRectElement.h */, - 6639629816145D5300E58CCA /* SVGRectElement.m */, - 6639629916145D5300E58CCA /* SVGShapeElement.h */, - 6639629A16145D5300E58CCA /* SVGShapeElement.m */, - 6639629B16145D5300E58CCA /* SVGSVGElement.h */, - 6639629C16145D5300E58CCA /* SVGSVGElement.m */, - 6639629D16145D5300E58CCA /* SVGTextElement.h */, - 6639629E16145D5300E58CCA /* SVGTextElement.m */, - 6639629F16145D5300E58CCA /* SVGTitleElement.h */, - 663962A016145D5300E58CCA /* SVGTitleElement.m */, - ); - path = "DOM classes"; - sourceTree = ""; - }; - 6639624B16145D5300E58CCA /* Core DOM */ = { - isa = PBXGroup; - children = ( - 6639624C16145D5300E58CCA /* AppleSucksDOMImplementation.h */, - 6639624D16145D5300E58CCA /* AppleSucksDOMImplementation.m */, - 6639624E16145D5300E58CCA /* Attr.h */, - 6639624F16145D5300E58CCA /* Attr.m */, - 6639625016145D5300E58CCA /* CDATASection.h */, - 6639625116145D5300E58CCA /* CDATASection.m */, - 6639625216145D5300E58CCA /* CharacterData.h */, - 6639625316145D5300E58CCA /* CharacterData.m */, - 6639625416145D5300E58CCA /* Comment.h */, - 6639625516145D5300E58CCA /* Comment.m */, - 6639625616145D5300E58CCA /* Document+Mutable.h */, - 6639625716145D5300E58CCA /* Document.h */, - 6639625816145D5300E58CCA /* Document.m */, - 6639625916145D5300E58CCA /* DocumentFragment.h */, - 6639625A16145D5300E58CCA /* DocumentFragment.m */, - 6639625B16145D5300E58CCA /* DocumentType.h */, - 6639625C16145D5300E58CCA /* DocumentType.m */, - 6639625D16145D5300E58CCA /* Element.h */, - 6639625E16145D5300E58CCA /* Element.m */, - 6639625F16145D5300E58CCA /* EntityReference.h */, - 6639626016145D5300E58CCA /* EntityReference.m */, - 6639626116145D5300E58CCA /* NamedNodeMap.h */, - 6639626216145D5300E58CCA /* NamedNodeMap.m */, - 6639626316145D5300E58CCA /* Node+Mutable.h */, - 6639626416145D5300E58CCA /* Node.h */, - 6639626516145D5300E58CCA /* Node.m */, - 6639626616145D5300E58CCA /* NodeList+Mutable.h */, - 6639626716145D5300E58CCA /* NodeList.h */, - 6639626816145D5300E58CCA /* NodeList.m */, - 6639626916145D5300E58CCA /* ProcessingInstruction.h */, - 6639626A16145D5300E58CCA /* ProcessingInstruction.m */, - 6639626B16145D5300E58CCA /* Text.h */, - 6639626C16145D5300E58CCA /* Text.m */, - ); - path = "Core DOM"; - sourceTree = ""; - }; - 6639626D16145D5300E58CCA /* SVG-DOM */ = { - isa = PBXGroup; - children = ( - 6639626E16145D5300E58CCA /* SVGAngle.h */, - 6639626F16145D5300E58CCA /* SVGAngle.m */, - 6639627016145D5300E58CCA /* SVGDocument.h */, - 6639627116145D5300E58CCA /* SVGDocument.m */, - 6639627216145D5300E58CCA /* SVGDocument_Mutable.h */, - 6639627316145D5300E58CCA /* SVGLength.h */, - 6639627416145D5300E58CCA /* SVGLength.m */, - 6639627516145D5300E58CCA /* SVGMatrix.h */, - 6639627616145D5300E58CCA /* SVGMatrix.m */, - 6639627716145D5300E58CCA /* SVGNumber.h */, - 6639627816145D5300E58CCA /* SVGPoint.h */, - 6639627916145D5300E58CCA /* SVGPoint.m */, - 6639627A16145D5300E58CCA /* SVGRect.h */, - 6639627B16145D5300E58CCA /* SVGSVGElement_Mutable.h */, - 6639627C16145D5300E58CCA /* SVGTransform.h */, - 6639627D16145D5300E58CCA /* SVGTransform.m */, - 6639627E16145D5300E58CCA /* SVGViewSpec.h */, - ); - path = "SVG-DOM"; - sourceTree = ""; - }; - 663962A116145D5300E58CCA /* Parsing */ = { - isa = PBXGroup; - children = ( - 663962A216145D5300E58CCA /* SVGKParseResult.h */, - 663962A316145D5300E58CCA /* SVGKParseResult.m */, - 663962A416145D5300E58CCA /* SVGKParserExtension.h */, - 663962A516145D5300E58CCA /* SVGKParserPatternsAndGradients.h */, - 663962A616145D5300E58CCA /* SVGKParserPatternsAndGradients.m */, - 663962A716145D5300E58CCA /* SVGKParserSVG.h */, - 663962A816145D5300E58CCA /* SVGKParserSVG.m */, - 663962A916145D5300E58CCA /* SVGKPointsAndPathsParser.h */, - 663962AA16145D5300E58CCA /* SVGKPointsAndPathsParser.m */, - ); - path = Parsing; - sourceTree = ""; - }; - 6639632C16145D6800E58CCA /* iOS */ = { - isa = PBXGroup; - children = ( - 6639632D16145D6800E58CCA /* CALayerWithChildHitTest.h */, - 6639632E16145D6800E58CCA /* CALayerWithChildHitTest.m */, - 6639632F16145D6800E58CCA /* CAShapeLayerWithHitTest.h */, - 6639633016145D6800E58CCA /* CAShapeLayerWithHitTest.m */, - 6639633116145D6800E58CCA /* SVGPathView.h */, - 6639633216145D6800E58CCA /* SVGPathView.m */, - ); - name = iOS; - path = ../../iOS; - sourceTree = ""; - }; - 6639633916145D7200E58CCA /* calayer-exporter */ = { - isa = PBXGroup; - children = ( - 6639633A16145D7200E58CCA /* CALayerExporter.h */, - 6639633B16145D7200E58CCA /* CALayerExporter.m */, - ); - name = "calayer-exporter"; - path = "../../calayer-exporter"; - sourceTree = ""; - }; - 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */ = { - isa = PBXGroup; - children = ( - 6639633916145D7200E58CCA /* calayer-exporter */, - 6639624716145D5300E58CCA /* Core */, - 6639632C16145D6800E58CCA /* iOS */, - ); - name = "EXTERNAL REFERENCES"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 6639624616145D3E00E58CCA /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 663962BC16145D5300E58CCA /* CGPathAdditions.h in Headers */, - 663962BE16145D5300E58CCA /* AppleSucksDOMImplementation.h in Headers */, - 663962C016145D5300E58CCA /* Attr.h in Headers */, - 663962C216145D5300E58CCA /* CDATASection.h in Headers */, - 663962C416145D5300E58CCA /* CharacterData.h in Headers */, - 663962C616145D5300E58CCA /* Comment.h in Headers */, - 663962C816145D5300E58CCA /* Document+Mutable.h in Headers */, - 663962C916145D5300E58CCA /* Document.h in Headers */, - 663962CB16145D5300E58CCA /* DocumentFragment.h in Headers */, - 663962CD16145D5300E58CCA /* DocumentType.h in Headers */, - 663962CF16145D5300E58CCA /* Element.h in Headers */, - 663962D116145D5300E58CCA /* EntityReference.h in Headers */, - 663962D316145D5300E58CCA /* NamedNodeMap.h in Headers */, - 663962D516145D5300E58CCA /* Node+Mutable.h in Headers */, - 663962D616145D5300E58CCA /* Node.h in Headers */, - 663962D816145D5300E58CCA /* NodeList+Mutable.h in Headers */, - 663962D916145D5300E58CCA /* NodeList.h in Headers */, - 663962DB16145D5300E58CCA /* ProcessingInstruction.h in Headers */, - 663962DD16145D5300E58CCA /* Text.h in Headers */, - 663962DF16145D5300E58CCA /* SVGAngle.h in Headers */, - 663962E116145D5300E58CCA /* SVGDocument.h in Headers */, - 663962E316145D5300E58CCA /* SVGDocument_Mutable.h in Headers */, - 663962E416145D5300E58CCA /* SVGLength.h in Headers */, - 663962E616145D5300E58CCA /* SVGMatrix.h in Headers */, - 663962E816145D5300E58CCA /* SVGNumber.h in Headers */, - 663962E916145D5300E58CCA /* SVGPoint.h in Headers */, - 663962EB16145D5300E58CCA /* SVGRect.h in Headers */, - 663962EC16145D5300E58CCA /* SVGSVGElement_Mutable.h in Headers */, - 663962ED16145D5300E58CCA /* SVGTransform.h in Headers */, - 663962EF16145D5300E58CCA /* SVGViewSpec.h in Headers */, - 663962F016145D5300E58CCA /* SVGCircleElement.h in Headers */, - 663962F216145D5300E58CCA /* SVGDefsElement.h in Headers */, - 663962F416145D5300E58CCA /* SVGDescriptionElement.h in Headers */, - 663962F616145D5300E58CCA /* SVGElement.h in Headers */, - 663962F816145D5300E58CCA /* SVGElement_ForParser.h in Headers */, - 663962F916145D5300E58CCA /* SVGEllipseElement.h in Headers */, - 663962FB16145D5300E58CCA /* SVGGroupElement.h in Headers */, - 663962FD16145D5300E58CCA /* SVGImageElement.h in Headers */, - 663962FF16145D5300E58CCA /* SVGLayeredElement.h in Headers */, - 6639630016145D5300E58CCA /* SVGLineElement.h in Headers */, - 6639630216145D5300E58CCA /* SVGPathElement.h in Headers */, - 6639630416145D5300E58CCA /* SVGPolygonElement.h in Headers */, - 6639630616145D5300E58CCA /* SVGPolylineElement.h in Headers */, - 6639630816145D5300E58CCA /* SVGRectElement.h in Headers */, - 6639630A16145D5300E58CCA /* SVGShapeElement.h in Headers */, - 6639630C16145D5300E58CCA /* SVGSVGElement.h in Headers */, - 6639630E16145D5300E58CCA /* SVGTextElement.h in Headers */, - 6639631016145D5300E58CCA /* SVGTitleElement.h in Headers */, - 6639631216145D5300E58CCA /* SVGKParseResult.h in Headers */, - 6639631416145D5300E58CCA /* SVGKParserExtension.h in Headers */, - 6639631516145D5300E58CCA /* SVGKParserPatternsAndGradients.h in Headers */, - 6639631716145D5300E58CCA /* SVGKParserSVG.h in Headers */, - 6639631916145D5300E58CCA /* SVGKPointsAndPathsParser.h in Headers */, - 6639631B16145D5300E58CCA /* SVGKImage+SVGPathView.h in Headers */, - 6639631D16145D5300E58CCA /* SVGKImage.h in Headers */, - 6639631F16145D5300E58CCA /* SVGKImageView.h in Headers */, - 6639632116145D5300E58CCA /* SVGKit.h in Headers */, - 6639632216145D5300E58CCA /* SVGKParser.h in Headers */, - 6639632416145D5300E58CCA /* SVGKPattern.h in Headers */, - 6639632616145D5300E58CCA /* SVGKSource.h in Headers */, - 6639632816145D5300E58CCA /* SVGKView.h in Headers */, - 6639632A16145D5300E58CCA /* SVGUtils.h in Headers */, - 6639633316145D6800E58CCA /* CALayerWithChildHitTest.h in Headers */, - 6639633516145D6800E58CCA /* CAShapeLayerWithHitTest.h in Headers */, - 6639633716145D6800E58CCA /* SVGPathView.h in Headers */, - 6639633C16145D7200E58CCA /* CALayerExporter.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 6639618D16145D0400E58CCA /* SVGKit-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6639619C16145D0400E58CCA /* Build configuration list for PBXNativeTarget "SVGKit-iOS" */; - buildPhases = ( - 6639618A16145D0400E58CCA /* Sources */, - 6639618B16145D0400E58CCA /* Frameworks */, - 6639618C16145D0400E58CCA /* CopyFiles */, - 6639624616145D3E00E58CCA /* Headers */, - 663963481614968A00E58CCA /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SVGKit-iOS"; - productName = "SVGKit-iOS"; - productReference = 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6639618516145D0400E58CCA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0440; - ORGANIZATIONNAME = na; - }; - buildConfigurationList = 6639618816145D0400E58CCA /* Build configuration list for PBXProject "SVGKit-iOS" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 6639618316145D0400E58CCA; - productRefGroup = 6639618F16145D0400E58CCA /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6639618D16145D0400E58CCA /* SVGKit-iOS */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXShellScriptBuildPhase section */ - 663963481614968A00E58CCA /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Version 2.0 (updated for Xcode 4, with some fixes)\n# Changes:\n# - Works with xcode 4, even when running xcode 3 projects (Workarounds for apple bugs)\n# - Faster / better: only runs lipo once, instead of once per recursion\n# - Added some debugging statemetns that can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to \"true\"\n# - Fixed some typos\n#\n# Purpose:\n# Create a static library for iPhone from within XCode\n# Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI (Xcode 3.2.3 specifically states this in the Release notes!)\n# ...no, I don't understand why they did this!\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)\n#\n# More info: see this Stack Overflow question: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n\n#################[ Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"false\"\n\nif [ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use the following variables when debugging this script; note that they may change on recursions\"\necho \"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROOT = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR = $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n# (incidental: searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep -o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\" ]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho \"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[ end of part 1 ]##################\n\n#####################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif [ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation, so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\" -target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\"\nxcodebuild -configuration \"${CONFIGURATION}\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\"\n\nACTION=\"build\"\n\n#Merge all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple) built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho \"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\n\n# ... remove the products of previous runs of this script\n# NB: this directory is ONLY created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir \"${CREATING_UNIVERSAL_DIR}\"\n\n#\necho \"lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"\nlipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow suggestion to also copy \"include\" files\n# (untested, but should work OK)\n#\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\n# * needs to be outside the double quotes?\ncp \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include/\"* \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\nfi\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6639618A16145D0400E58CCA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 663962BD16145D5300E58CCA /* CGPathAdditions.m in Sources */, - 663962BF16145D5300E58CCA /* AppleSucksDOMImplementation.m in Sources */, - 663962C116145D5300E58CCA /* Attr.m in Sources */, - 663962C316145D5300E58CCA /* CDATASection.m in Sources */, - 663962C516145D5300E58CCA /* CharacterData.m in Sources */, - 663962C716145D5300E58CCA /* Comment.m in Sources */, - 663962CA16145D5300E58CCA /* Document.m in Sources */, - 663962CC16145D5300E58CCA /* DocumentFragment.m in Sources */, - 663962CE16145D5300E58CCA /* DocumentType.m in Sources */, - 663962D016145D5300E58CCA /* Element.m in Sources */, - 663962D216145D5300E58CCA /* EntityReference.m in Sources */, - 663962D416145D5300E58CCA /* NamedNodeMap.m in Sources */, - 663962D716145D5300E58CCA /* Node.m in Sources */, - 663962DA16145D5300E58CCA /* NodeList.m in Sources */, - 663962DC16145D5300E58CCA /* ProcessingInstruction.m in Sources */, - 663962DE16145D5300E58CCA /* Text.m in Sources */, - 663962E016145D5300E58CCA /* SVGAngle.m in Sources */, - 663962E216145D5300E58CCA /* SVGDocument.m in Sources */, - 663962E516145D5300E58CCA /* SVGLength.m in Sources */, - 663962E716145D5300E58CCA /* SVGMatrix.m in Sources */, - 663962EA16145D5300E58CCA /* SVGPoint.m in Sources */, - 663962EE16145D5300E58CCA /* SVGTransform.m in Sources */, - 663962F116145D5300E58CCA /* SVGCircleElement.m in Sources */, - 663962F316145D5300E58CCA /* SVGDefsElement.m in Sources */, - 663962F516145D5300E58CCA /* SVGDescriptionElement.m in Sources */, - 663962F716145D5300E58CCA /* SVGElement.m in Sources */, - 663962FA16145D5300E58CCA /* SVGEllipseElement.m in Sources */, - 663962FC16145D5300E58CCA /* SVGGroupElement.m in Sources */, - 663962FE16145D5300E58CCA /* SVGImageElement.m in Sources */, - 6639630116145D5300E58CCA /* SVGLineElement.m in Sources */, - 6639630316145D5300E58CCA /* SVGPathElement.m in Sources */, - 6639630516145D5300E58CCA /* SVGPolygonElement.m in Sources */, - 6639630716145D5300E58CCA /* SVGPolylineElement.m in Sources */, - 6639630916145D5300E58CCA /* SVGRectElement.m in Sources */, - 6639630B16145D5300E58CCA /* SVGShapeElement.m in Sources */, - 6639630D16145D5300E58CCA /* SVGSVGElement.m in Sources */, - 6639630F16145D5300E58CCA /* SVGTextElement.m in Sources */, - 6639631116145D5300E58CCA /* SVGTitleElement.m in Sources */, - 6639631316145D5300E58CCA /* SVGKParseResult.m in Sources */, - 6639631616145D5300E58CCA /* SVGKParserPatternsAndGradients.m in Sources */, - 6639631816145D5300E58CCA /* SVGKParserSVG.m in Sources */, - 6639631A16145D5300E58CCA /* SVGKPointsAndPathsParser.m in Sources */, - 6639631C16145D5300E58CCA /* SVGKImage+SVGPathView.m in Sources */, - 6639631E16145D5300E58CCA /* SVGKImage.m in Sources */, - 6639632016145D5300E58CCA /* SVGKImageView.m in Sources */, - 6639632316145D5300E58CCA /* SVGKParser.m in Sources */, - 6639632516145D5300E58CCA /* SVGKPattern.m in Sources */, - 6639632716145D5300E58CCA /* SVGKSource.m in Sources */, - 6639632916145D5300E58CCA /* SVGKView.m in Sources */, - 6639632B16145D5300E58CCA /* SVGUtils.m in Sources */, - 6639633416145D6800E58CCA /* CALayerWithChildHitTest.m in Sources */, - 6639633616145D6800E58CCA /* CAShapeLayerWithHitTest.m in Sources */, - 6639633816145D6800E58CCA /* SVGPathView.m in Sources */, - 6639633D16145D7200E58CCA /* CALayerExporter.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 6639619A16145D0400E58CCA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 6639619B16145D0400E58CCA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6639619D16145D0400E58CCA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DSTROOT = /tmp/SVGKit_iOS.dst; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SVGKit-iOS/SVGKit-iOS-Prefix.pch"; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 6639619E16145D0400E58CCA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DSTROOT = /tmp/SVGKit_iOS.dst; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SVGKit-iOS/SVGKit-iOS-Prefix.pch"; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6639618816145D0400E58CCA /* Build configuration list for PBXProject "SVGKit-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6639619A16145D0400E58CCA /* Debug */, - 6639619B16145D0400E58CCA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6639619C16145D0400E58CCA /* Build configuration list for PBXNativeTarget "SVGKit-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6639619D16145D0400E58CCA /* Debug */, - 6639619E16145D0400E58CCA /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6639618516145D0400E58CCA /* Project object */; -} diff --git a/XCodeProjects/SVGKit/Info.plist b/XCodeProjects/SVGKit/Info.plist deleted file mode 100644 index 43f8a739b..000000000 --- a/XCodeProjects/SVGKit/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.MattRajca.${PRODUCT_NAME:rfc1034Identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSPrincipalClass - - - diff --git a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj b/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj deleted file mode 100644 index 4b3af098f..000000000 --- a/XCodeProjects/SVGKit/SVGKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1182 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 3BF503A0148C5FC600CC7D17 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF5039F148C5FC600CC7D17 /* UIKit.framework */; }; - 3BF503A2148C5FCE00CC7D17 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF503A1148C5FCE00CC7D17 /* CoreGraphics.framework */; }; - 3BF503A4148C5FD400CC7D17 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF503A3148C5FD400CC7D17 /* QuartzCore.framework */; }; - 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; - 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; - 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66213433148AF2CF006881E1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66226B53148AEAB100EF4A6D /* Foundation.framework */; }; - 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */; }; - 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */; }; - 66213557148AF80B006881E1 /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; - 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6621354D148AF80A006881E1 /* SVGPathView.m */; }; - 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141E015697534000F3A27 /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141E815697534000F3A27 /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141EE15697534000F3A27 /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141F115697534000F3A27 /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666141FA15697534000F3A27 /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661420C15697534000F3A27 /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661420E15697534000F3A27 /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142121569756C000F3A27 /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6621354C148AF80A006881E1 /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427D156C2E69000F3A27 /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; - 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661427E156C2E69000F3A27 /* SVGCircleElement.m */; }; - 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661427F156C2E69000F3A27 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; - 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614280156C2E69000F3A27 /* SVGDefsElement.m */; }; - 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; - 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */; }; - 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614283156C2E69000F3A27 /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142B3156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; - 666142B4156C2E6A000F3A27 /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614284156C2E69000F3A27 /* SVGElement.m */; }; - 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614285156C2E69000F3A27 /* SVGEllipseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142B7156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; - 666142B8156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614286156C2E69000F3A27 /* SVGEllipseElement.m */; }; - 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614287156C2E69000F3A27 /* SVGGroupElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142BB156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; - 666142BC156C2E6A000F3A27 /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614288156C2E69000F3A27 /* SVGGroupElement.m */; }; - 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614289156C2E69000F3A27 /* SVGImageElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142BF156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; - 666142C0156C2E6A000F3A27 /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428A156C2E69000F3A27 /* SVGImageElement.m */; }; - 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428B156C2E69000F3A27 /* SVGLineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142C3156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; - 666142C4156C2E6A000F3A27 /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428C156C2E69000F3A27 /* SVGLineElement.m */; }; - 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428D156C2E69000F3A27 /* SVGPathElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142C7156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; - 666142C8156C2E6A000F3A27 /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661428E156C2E69000F3A27 /* SVGPathElement.m */; }; - 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142CB156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; - 666142CC156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614290156C2E69000F3A27 /* SVGPolygonElement.m */; }; - 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614291156C2E69000F3A27 /* SVGPolylineElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142CF156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; - 666142D0156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614292156C2E69000F3A27 /* SVGPolylineElement.m */; }; - 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614293156C2E69000F3A27 /* SVGRectElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142D3156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; - 666142D4156C2E6A000F3A27 /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614294156C2E69000F3A27 /* SVGRectElement.m */; }; - 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614295156C2E69000F3A27 /* SVGShapeElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142D7156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; - 666142D8156C2E6A000F3A27 /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614296156C2E69000F3A27 /* SVGShapeElement.m */; }; - 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614297156C2E69000F3A27 /* SVGSVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; - 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614298156C2E69000F3A27 /* SVGSVGElement.m */; }; - 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614299156C2E69000F3A27 /* SVGTextElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; - 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429A156C2E69000F3A27 /* SVGTextElement.m */; }; - 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429B156C2E69000F3A27 /* SVGTitleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; - 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429C156C2E69000F3A27 /* SVGTitleElement.m */; }; - 666142E5156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142E6156C2E6A000F3A27 /* SVGKParseResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142E7156C2E6A000F3A27 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */; }; - 666142E8156C2E6A000F3A27 /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */; }; - 666142E9156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142EB156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142ED156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */; }; - 666142EE156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */; }; - 666142EF156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142F1156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */; }; - 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */; }; - 666142FC156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142FD156C2F14000F3A27 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 666142FA156C2F14000F3A27 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666142FE156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; - 666142FF156C2F14000F3A27 /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 666142FB156C2F14000F3A27 /* Document.m */; }; - 66614302156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614303156C3A0B000F3A27 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614300156C3A0B000F3A27 /* Node.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614304156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; - 66614305156C3A0B000F3A27 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614301156C3A0B000F3A27 /* Node.m */; }; - 66614308156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614309156C3B95000F3A27 /* NodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614306156C3B95000F3A27 /* NodeList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661430A156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; - 6661430B156C3B95000F3A27 /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614307156C3B95000F3A27 /* NodeList.m */; }; - 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614310156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; - 66614311156C3DC7000F3A27 /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */; }; - 66614314156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614315156C3F62000F3A27 /* Element.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614312156C3F60000F3A27 /* Element.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614316156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; - 66614317156C3F62000F3A27 /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614313156C3F61000F3A27 /* Element.m */; }; - 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614318156C436E000F3A27 /* ProcessingInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661431C156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; - 6661431D156C436F000F3A27 /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614319156C436F000F3A27 /* ProcessingInstruction.m */; }; - 66614320156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614321156C43BA000F3A27 /* Comment.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661431E156C43B9000F3A27 /* Comment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614322156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; - 66614323156C43BA000F3A27 /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661431F156C43BA000F3A27 /* Comment.m */; }; - 66614326156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614327156C43E0000F3A27 /* CharacterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614324156C43DF000F3A27 /* CharacterData.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614328156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; - 66614329156C43E0000F3A27 /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614325156C43E0000F3A27 /* CharacterData.m */; }; - 6661432C156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661432D156C44BD000F3A27 /* Attr.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661432A156C44BB000F3A27 /* Attr.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661432E156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; - 6661432F156C44BD000F3A27 /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661432B156C44BC000F3A27 /* Attr.m */; }; - 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614330156C45EF000F3A27 /* DocumentFragment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614334156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; - 66614335156C45F2000F3A27 /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614331156C45F1000F3A27 /* DocumentFragment.m */; }; - 66614338156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614339156C463D000F3A27 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614336156C463B000F3A27 /* Text.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661433A156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; - 6661433B156C463D000F3A27 /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614337156C463C000F3A27 /* Text.m */; }; - 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661433C156C46DD000F3A27 /* CDATASection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614340156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; - 66614341156C46DF000F3A27 /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661433D156C46DE000F3A27 /* CDATASection.m */; }; - 66614344156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614345156C4726000F3A27 /* EntityReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614342156C4722000F3A27 /* EntityReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614346156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; - 66614347156C4726000F3A27 /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614343156C4724000F3A27 /* EntityReference.m */; }; - 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614348156C544C000F3A27 /* NodeList+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614351156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614352156C619F000F3A27 /* DocumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661434F156C619A000F3A27 /* DocumentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614353156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; - 66614354156C619F000F3A27 /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66614350156C619D000F3A27 /* DocumentType.m */; }; - 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66614355156C625E000F3A27 /* Node+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661435E156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6661435F156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */; }; - 66614360156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */; }; - 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; - 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */ = {isa = PBXBuildFile; fileRef = 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */; }; - 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; - 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */; }; - 6684CD4B1566D07400A46247 /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6684CD491566D07400A46247 /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6684CD4D1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; - 6684CD4E1566D07400A46247 /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6684CD4A1566D07400A46247 /* SVGKView.m */; }; - 6694713B157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6694713C157421B800EA533D /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 66947139157421B800EA533D /* SVGDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6694713D157421B800EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694713A157421B800EA533D /* SVGDocument.m */; }; - 6694713E157421B800EA533D /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6694713A157421B800EA533D /* SVGDocument.m */; }; - 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AD315475254002F99FF /* CGPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; - 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AD415475254002F99FF /* CGPathAdditions.m */; }; - 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79ADD15475254002F99FF /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGKSource.m */; }; - 66B79B2015475254002F99FF /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79ADE15475254002F99FF /* SVGKSource.m */; }; - 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AE515475254002F99FF /* SVGKImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGKImage.m */; }; - 66B79B3015475254002F99FF /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AE615475254002F99FF /* SVGKImage.m */; }; - 66B79B3915475254002F99FF /* SVGKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEB15475254002F99FF /* SVGKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B3F15475254002F99FF /* SVGKParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AEE15475254002F99FF /* SVGKParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B4115475254002F99FF /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGKParser.m */; }; - 66B79B4215475254002F99FF /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AEF15475254002F99FF /* SVGKParser.m */; }; - 66B79B4D15475254002F99FF /* SVGKPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79AF515475254002F99FF /* SVGKPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B4F15475254002F99FF /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGKPattern.m */; }; - 66B79B5015475254002F99FF /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79AF615475254002F99FF /* SVGKPattern.m */; }; - 66B79B7115475254002F99FF /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 66B79B0715475254002F99FF /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66B79B7315475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; - 66B79B7415475254002F99FF /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B79B0815475254002F99FF /* SVGUtils.m */; }; - 66BB059615F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66BB059715F40A870005D834 /* SVGLength.h in Headers */ = {isa = PBXBuildFile; fileRef = 66BB059415F40A860005D834 /* SVGLength.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66BB059815F40A870005D834 /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BB059515F40A860005D834 /* SVGLength.m */; }; - 66BB059915F40A870005D834 /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BB059515F40A860005D834 /* SVGLength.m */; }; - 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5215B056D000C36B57 /* SVGRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5815B057AD00C36B57 /* SVGPoint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; - 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA5915B057AD00C36B57 /* SVGPoint.m */; }; - 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; - 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */; }; - 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7615B35A9000C36B57 /* SVGTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; - 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7715B35A9100C36B57 /* SVGTransform.m */; }; - 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */ = {isa = PBXBuildFile; fileRef = 66CBCA7D15B3641600C36B57 /* SVGAngle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; - 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */; }; - 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; - C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C95263281271228F00434805 /* libxml2.dylib */; }; - C996E4BC1336CBC200EC3F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 32DBCF5E0370ADEE00C91783 /* SVGKit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit_Prefix.pch; sourceTree = ""; }; - 3BF5039F148C5FC600CC7D17 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 3BF503A1148C5FCE00CC7D17 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; - 3BF503A3148C5FD400CC7D17 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; - 66213432148AF2CF006881E1 /* libSVGKitLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSVGKitLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 66213436148AF2CF006881E1 /* SVGKitLibrary-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SVGKitLibrary-Prefix.pch"; sourceTree = ""; }; - 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; - 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; - 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; - 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 6621354C148AF80A006881E1 /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; - 6621354D148AF80A006881E1 /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; - 66226B53148AEAB100EF4A6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; - 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; - 6661427D156C2E69000F3A27 /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 6661427E156C2E69000F3A27 /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 6661427F156C2E69000F3A27 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 66614280156C2E69000F3A27 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 66614283156C2E69000F3A27 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 66614284156C2E69000F3A27 /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SVGElement.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 66614285156C2E69000F3A27 /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 66614286156C2E69000F3A27 /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 66614287156C2E69000F3A27 /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 66614288156C2E69000F3A27 /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 66614289156C2E69000F3A27 /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 6661428A156C2E69000F3A27 /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; - 6661428B156C2E69000F3A27 /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 6661428C156C2E69000F3A27 /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 6661428D156C2E69000F3A27 /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 6661428E156C2E69000F3A27 /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 66614290156C2E69000F3A27 /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 66614291156C2E69000F3A27 /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 66614292156C2E69000F3A27 /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 66614293156C2E69000F3A27 /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 66614294156C2E69000F3A27 /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 66614295156C2E69000F3A27 /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 66614296156C2E69000F3A27 /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 66614297156C2E69000F3A27 /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; - 66614298156C2E69000F3A27 /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 66614299156C2E69000F3A27 /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; - 6661429A156C2E69000F3A27 /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 6661429B156C2E69000F3A27 /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 6661429C156C2E69000F3A27 /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = SVGKParseResult.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; - 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; - 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; - 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; - 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; - 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; - 666142FA156C2F14000F3A27 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; - 666142FB156C2F14000F3A27 /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; - 66614300156C3A0B000F3A27 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; - 66614301156C3A0B000F3A27 /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; - 66614306156C3B95000F3A27 /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; - 66614307156C3B95000F3A27 /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; - 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; - 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; - 66614312156C3F60000F3A27 /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; - 66614313156C3F61000F3A27 /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; - 66614318156C436E000F3A27 /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; - 66614319156C436F000F3A27 /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; - 6661431E156C43B9000F3A27 /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; - 6661431F156C43BA000F3A27 /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; - 66614324156C43DF000F3A27 /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; - 66614325156C43E0000F3A27 /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; - 6661432A156C44BB000F3A27 /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; - 6661432B156C44BC000F3A27 /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; - 66614330156C45EF000F3A27 /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; - 66614331156C45F1000F3A27 /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; - 66614336156C463B000F3A27 /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; - 66614337156C463C000F3A27 /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; - 6661433C156C46DD000F3A27 /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; - 6661433D156C46DE000F3A27 /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; - 66614342156C4722000F3A27 /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; - 66614343156C4724000F3A27 /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; - 66614348156C544C000F3A27 /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; - 6661434F156C619A000F3A27 /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; - 66614350156C619D000F3A27 /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; - 66614355156C625E000F3A27 /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; - 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; - 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; - 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; - 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; - 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; - 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SVGKImage+SVGPathView.h"; path = "../../Core/SVGKImage+SVGPathView.h"; sourceTree = ""; }; - 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SVGKImage+SVGPathView.m"; path = "../../Core/SVGKImage+SVGPathView.m"; sourceTree = ""; }; - 6684CD491566D07400A46247 /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; - 6684CD4A1566D07400A46247 /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; - 66947139157421B800EA533D /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 6694713A157421B800EA533D /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; - 66B79AD315475254002F99FF /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; - 66B79AD415475254002F99FF /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 66B79ADD15475254002F99FF /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; - 66B79ADE15475254002F99FF /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; - 66B79AE515475254002F99FF /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; - 66B79AE615475254002F99FF /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; - 66B79AEB15475254002F99FF /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 66B79AEE15475254002F99FF /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; - 66B79AEF15475254002F99FF /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; - 66B79AF515475254002F99FF /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; - 66B79AF615475254002F99FF /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; - 66B79B0715475254002F99FF /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; - 66B79B0815475254002F99FF /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 66BB059415F40A860005D834 /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; - 66BB059515F40A860005D834 /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; - 66CBCA5115B0536D00C36B57 /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; - 66CBCA5215B056D000C36B57 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; - 66CBCA5815B057AD00C36B57 /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; - 66CBCA5915B057AD00C36B57 /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; - 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; - 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; - 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; - 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; - 66CBCA7615B35A9000C36B57 /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; - 66CBCA7715B35A9100C36B57 /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; - 66CBCA7C15B35CCD00C36B57 /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; - 66CBCA7D15B3641600C36B57 /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; - 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; - 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8DC2EF5B0486A6940098B216 /* SVGKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVGKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C95263281271228F00434805 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6621342F148AF2CF006881E1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BF503A4148C5FD400CC7D17 /* QuartzCore.framework in Frameworks */, - 3BF503A2148C5FCE00CC7D17 /* CoreGraphics.framework in Frameworks */, - 3BF503A0148C5FC600CC7D17 /* UIKit.framework in Frameworks */, - 66213433148AF2CF006881E1 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8DC2EF560486A6940098B216 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */, - C996E4BC1336CBC200EC3F18 /* QuartzCore.framework in Frameworks */, - C92418E5127336D000403FA7 /* libxml2.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 034768DFFF38A50411DB9C8B /* Products */ = { - isa = PBXGroup; - children = ( - 8DC2EF5B0486A6940098B216 /* SVGKit.framework */, - 66213432148AF2CF006881E1 /* libSVGKitLibrary.a */, - ); - name = Products; - sourceTree = ""; - }; - 0867D691FE84028FC02AAC07 /* SVGKit */ = { - isa = PBXGroup; - children = ( - 6684CD431566CF1300A46247 /* SVGKImage+SVGPathView.h */, - 6684CD441566CF1300A46247 /* SVGKImage+SVGPathView.m */, - C952623F12711D8600434805 /* Framework */, - 66213434148AF2CF006881E1 /* SVGKitLibrary */, - ); - name = SVGKit; - sourceTree = ""; - }; - 0867D69AFE84028FC02AAC07 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */, - 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - 089C1665FE841158C02AAC07 /* Resources */ = { - isa = PBXGroup; - children = ( - 8DC2EF5A0486A6940098B216 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */, - C996E4BB1336CBC100EC3F18 /* QuartzCore.framework */, - C95263281271228F00434805 /* libxml2.dylib */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 0867D6A5FE840307C02AAC07 /* AppKit.framework */, - D2F7E79907B2D74100F64583 /* CoreData.framework */, - 0867D69BFE84028FC02AAC07 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 32C88DFF0371C24200C91783 /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32DBCF5E0370ADEE00C91783 /* SVGKit_Prefix.pch */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 66213434148AF2CF006881E1 /* SVGKitLibrary */ = { - isa = PBXGroup; - children = ( - 66226B52148AEAB100EF4A6D /* Linked Frameworks */, - 66213435148AF2CF006881E1 /* Supporting Files */, - ); - path = SVGKitLibrary; - sourceTree = ""; - }; - 66213435148AF2CF006881E1 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 66213436148AF2CF006881E1 /* SVGKitLibrary-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 66213545148AF80A006881E1 /* iOS */ = { - isa = PBXGroup; - children = ( - 66213546148AF80A006881E1 /* CALayerWithChildHitTest.h */, - 66213547148AF80A006881E1 /* CALayerWithChildHitTest.m */, - 66213548148AF80A006881E1 /* CAShapeLayerWithHitTest.h */, - 66213549148AF80A006881E1 /* CAShapeLayerWithHitTest.m */, - 6621354C148AF80A006881E1 /* SVGPathView.h */, - 6621354D148AF80A006881E1 /* SVGPathView.m */, - ); - name = iOS; - path = ../../iOS; - sourceTree = ""; - }; - 66226B52148AEAB100EF4A6D /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 3BF503A3148C5FD400CC7D17 /* QuartzCore.framework */, - 3BF503A1148C5FCE00CC7D17 /* CoreGraphics.framework */, - 3BF5039F148C5FC600CC7D17 /* UIKit.framework */, - 66226B53148AEAB100EF4A6D /* Foundation.framework */, - ); - name = "Linked Frameworks"; - path = ..; - sourceTree = ""; - }; - 6661427C156C2E68000F3A27 /* DOM classes */ = { - isa = PBXGroup; - children = ( - 666142F9156C2F0C000F3A27 /* Core DOM */, - 6661434E156C5FE5000F3A27 /* SVG-DOM */, - 6661427D156C2E69000F3A27 /* SVGCircleElement.h */, - 665D4E9B15B47FFA00B8DEB2 /* SVGElement_ForParser.h */, - 6661427E156C2E69000F3A27 /* SVGCircleElement.m */, - 6661427F156C2E69000F3A27 /* SVGDefsElement.h */, - 66614280156C2E69000F3A27 /* SVGDefsElement.m */, - 66614281156C2E69000F3A27 /* SVGDescriptionElement.h */, - 66614282156C2E69000F3A27 /* SVGDescriptionElement.m */, - 66614285156C2E69000F3A27 /* SVGEllipseElement.h */, - 66614286156C2E69000F3A27 /* SVGEllipseElement.m */, - 66614283156C2E69000F3A27 /* SVGElement.h */, - 66614284156C2E69000F3A27 /* SVGElement.m */, - 6648DF7015B3846A00B929E2 /* SVGLayeredElement.h */, - 66614287156C2E69000F3A27 /* SVGGroupElement.h */, - 66614288156C2E69000F3A27 /* SVGGroupElement.m */, - 66614289156C2E69000F3A27 /* SVGImageElement.h */, - 6661428A156C2E69000F3A27 /* SVGImageElement.m */, - 6661428B156C2E69000F3A27 /* SVGLineElement.h */, - 6661428C156C2E69000F3A27 /* SVGLineElement.m */, - 6661428D156C2E69000F3A27 /* SVGPathElement.h */, - 6661428E156C2E69000F3A27 /* SVGPathElement.m */, - 6661428F156C2E69000F3A27 /* SVGPolygonElement.h */, - 66614290156C2E69000F3A27 /* SVGPolygonElement.m */, - 66614291156C2E69000F3A27 /* SVGPolylineElement.h */, - 66614292156C2E69000F3A27 /* SVGPolylineElement.m */, - 66614293156C2E69000F3A27 /* SVGRectElement.h */, - 66614294156C2E69000F3A27 /* SVGRectElement.m */, - 66614295156C2E69000F3A27 /* SVGShapeElement.h */, - 66614296156C2E69000F3A27 /* SVGShapeElement.m */, - 66614297156C2E69000F3A27 /* SVGSVGElement.h */, - 66614298156C2E69000F3A27 /* SVGSVGElement.m */, - 66614299156C2E69000F3A27 /* SVGTextElement.h */, - 6661429A156C2E69000F3A27 /* SVGTextElement.m */, - 6661429B156C2E69000F3A27 /* SVGTitleElement.h */, - 6661429C156C2E69000F3A27 /* SVGTitleElement.m */, - ); - path = "DOM classes"; - sourceTree = ""; - }; - 6661429D156C2E69000F3A27 /* Parsing */ = { - isa = PBXGroup; - children = ( - 6661429E156C2E6A000F3A27 /* SVGKParseResult.h */, - 6661429F156C2E6A000F3A27 /* SVGKParseResult.m */, - 666142A0156C2E6A000F3A27 /* SVGKParserExtension.h */, - 666142A1156C2E6A000F3A27 /* SVGKParserSVG.h */, - 666142A2156C2E6A000F3A27 /* SVGKParserSVG.m */, - 667141B0159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h */, - 667141B1159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m */, - 666142A3156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h */, - 666142A4156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m */, - ); - path = Parsing; - sourceTree = ""; - }; - 666142F9156C2F0C000F3A27 /* Core DOM */ = { - isa = PBXGroup; - children = ( - 6661432A156C44BB000F3A27 /* Attr.h */, - 6661432B156C44BC000F3A27 /* Attr.m */, - 6661433C156C46DD000F3A27 /* CDATASection.h */, - 6661433D156C46DE000F3A27 /* CDATASection.m */, - 66614324156C43DF000F3A27 /* CharacterData.h */, - 66614325156C43E0000F3A27 /* CharacterData.m */, - 6661431E156C43B9000F3A27 /* Comment.h */, - 6661431F156C43BA000F3A27 /* Comment.m */, - 66614330156C45EF000F3A27 /* DocumentFragment.h */, - 66614331156C45F1000F3A27 /* DocumentFragment.m */, - 6661434F156C619A000F3A27 /* DocumentType.h */, - 66614350156C619D000F3A27 /* DocumentType.m */, - 6661435B156C645A000F3A27 /* AppleSucksDOMImplementation.h */, - 6661435C156C645C000F3A27 /* AppleSucksDOMImplementation.m */, - 66614342156C4722000F3A27 /* EntityReference.h */, - 66614343156C4724000F3A27 /* EntityReference.m */, - 6661430C156C3DC6000F3A27 /* NamedNodeMap.h */, - 6661430D156C3DC6000F3A27 /* NamedNodeMap.m */, - 66614300156C3A0B000F3A27 /* Node.h */, - 66614301156C3A0B000F3A27 /* Node.m */, - 66614355156C625E000F3A27 /* Node+Mutable.h */, - 66614306156C3B95000F3A27 /* NodeList.h */, - 66614307156C3B95000F3A27 /* NodeList.m */, - 66614348156C544C000F3A27 /* NodeList+Mutable.h */, - 666142FA156C2F14000F3A27 /* Document.h */, - 666142FB156C2F14000F3A27 /* Document.m */, - 667A2D9D15B9FDD700F4464E /* Document+Mutable.h */, - 66614312156C3F60000F3A27 /* Element.h */, - 66614313156C3F61000F3A27 /* Element.m */, - 66614318156C436E000F3A27 /* ProcessingInstruction.h */, - 66614319156C436F000F3A27 /* ProcessingInstruction.m */, - 66614336156C463B000F3A27 /* Text.h */, - 66614337156C463C000F3A27 /* Text.m */, - ); - path = "Core DOM"; - sourceTree = ""; - }; - 6661434E156C5FE5000F3A27 /* SVG-DOM */ = { - isa = PBXGroup; - children = ( - 66947139157421B800EA533D /* SVGDocument.h */, - 66CBCA5115B0536D00C36B57 /* SVGDocument_Mutable.h */, - 6694713A157421B800EA533D /* SVGDocument.m */, - 66CBCA7D15B3641600C36B57 /* SVGAngle.h */, - 66CBCA7E15B3641A00C36B57 /* SVGAngle.m */, - 66CBCA5215B056D000C36B57 /* SVGRect.h */, - 66BB059415F40A860005D834 /* SVGLength.h */, - 66BB059515F40A860005D834 /* SVGLength.m */, - 66CBCA6415B05D2200C36B57 /* SVGMatrix.h */, - 66CBCA6515B05D2300C36B57 /* SVGMatrix.m */, - 66CBCA6A15B358AC00C36B57 /* SVGNumber.h */, - 66CBCA5815B057AD00C36B57 /* SVGPoint.h */, - 66CBCA5915B057AD00C36B57 /* SVGPoint.m */, - 66CBCA5E15B05ACF00C36B57 /* SVGViewSpec.h */, - 66CBCA7615B35A9000C36B57 /* SVGTransform.h */, - 66CBCA7715B35A9100C36B57 /* SVGTransform.m */, - 66CBCA7C15B35CCD00C36B57 /* SVGSVGElement_Mutable.h */, - ); - path = "SVG-DOM"; - sourceTree = ""; - }; - C952623F12711D8600434805 /* Framework */ = { - isa = PBXGroup; - children = ( - C952631B1271225F00434805 /* Core */, - C9DA5C5E1273D26A000CB487 /* Mac */, - 66213545148AF80A006881E1 /* iOS */, - 32C88DFF0371C24200C91783 /* Other Sources */, - 089C1665FE841158C02AAC07 /* Resources */, - 0867D69AFE84028FC02AAC07 /* Frameworks */, - 034768DFFF38A50411DB9C8B /* Products */, - ); - name = Framework; - sourceTree = ""; - }; - C952631B1271225F00434805 /* Core */ = { - isa = PBXGroup; - children = ( - 6661427C156C2E68000F3A27 /* DOM classes */, - 6661429D156C2E69000F3A27 /* Parsing */, - 66B79AD315475254002F99FF /* CGPathAdditions.h */, - 66B79AD415475254002F99FF /* CGPathAdditions.m */, - 66B79ADD15475254002F99FF /* SVGKSource.h */, - 66B79ADE15475254002F99FF /* SVGKSource.m */, - 66B79AE515475254002F99FF /* SVGKImage.h */, - 66B79AE615475254002F99FF /* SVGKImage.m */, - 66B79AEB15475254002F99FF /* SVGKit.h */, - 66B79AEE15475254002F99FF /* SVGKParser.h */, - 66B79AEF15475254002F99FF /* SVGKParser.m */, - 66B79AF515475254002F99FF /* SVGKPattern.h */, - 66B79AF615475254002F99FF /* SVGKPattern.m */, - 66B79B0715475254002F99FF /* SVGUtils.h */, - 66B79B0815475254002F99FF /* SVGUtils.m */, - 6684CD491566D07400A46247 /* SVGKView.h */, - 6684CD4A1566D07400A46247 /* SVGKView.m */, - ); - name = Core; - path = ../../Core; - sourceTree = ""; - }; - C9DA5C5E1273D26A000CB487 /* Mac */ = { - isa = PBXGroup; - children = ( - ); - name = Mac; - path = ../../Mac; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 66213430148AF2CF006881E1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 666141D615697534000F3A27 /* CGPathAdditions.h in Headers */, - 666141E015697534000F3A27 /* SVGKSource.h in Headers */, - 666141E815697534000F3A27 /* SVGKImage.h in Headers */, - 666141EE15697534000F3A27 /* SVGKit.h in Headers */, - 666141F115697534000F3A27 /* SVGKParser.h in Headers */, - 666141FA15697534000F3A27 /* SVGKPattern.h in Headers */, - 6661420C15697534000F3A27 /* SVGUtils.h in Headers */, - 6661420E15697534000F3A27 /* SVGKView.h in Headers */, - 666142101569756C000F3A27 /* CALayerWithChildHitTest.h in Headers */, - 666142111569756C000F3A27 /* CAShapeLayerWithHitTest.h in Headers */, - 666142121569756C000F3A27 /* SVGPathView.h in Headers */, - 666142A6156C2E6A000F3A27 /* SVGCircleElement.h in Headers */, - 666142AA156C2E6A000F3A27 /* SVGDefsElement.h in Headers */, - 666142AE156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */, - 666142B2156C2E6A000F3A27 /* SVGElement.h in Headers */, - 666142B6156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */, - 666142BA156C2E6A000F3A27 /* SVGGroupElement.h in Headers */, - 666142BE156C2E6A000F3A27 /* SVGImageElement.h in Headers */, - 666142C2156C2E6A000F3A27 /* SVGLineElement.h in Headers */, - 666142C6156C2E6A000F3A27 /* SVGPathElement.h in Headers */, - 666142CA156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */, - 666142CE156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */, - 666142D2156C2E6A000F3A27 /* SVGRectElement.h in Headers */, - 666142D6156C2E6A000F3A27 /* SVGShapeElement.h in Headers */, - 666142DA156C2E6A000F3A27 /* SVGSVGElement.h in Headers */, - 666142DE156C2E6A000F3A27 /* SVGTextElement.h in Headers */, - 666142E2156C2E6A000F3A27 /* SVGTitleElement.h in Headers */, - 666142E6156C2E6A000F3A27 /* SVGKParseResult.h in Headers */, - 666142EA156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */, - 666142EC156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */, - 666142F0156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */, - 666142FD156C2F14000F3A27 /* Document.h in Headers */, - 66614303156C3A0B000F3A27 /* Node.h in Headers */, - 66614309156C3B95000F3A27 /* NodeList.h in Headers */, - 6661430F156C3DC7000F3A27 /* NamedNodeMap.h in Headers */, - 66614315156C3F62000F3A27 /* Element.h in Headers */, - 6661431B156C436F000F3A27 /* ProcessingInstruction.h in Headers */, - 66614321156C43BA000F3A27 /* Comment.h in Headers */, - 66614327156C43E0000F3A27 /* CharacterData.h in Headers */, - 6661432D156C44BD000F3A27 /* Attr.h in Headers */, - 66614333156C45F2000F3A27 /* DocumentFragment.h in Headers */, - 66614339156C463D000F3A27 /* Text.h in Headers */, - 6661433F156C46DF000F3A27 /* CDATASection.h in Headers */, - 66614345156C4726000F3A27 /* EntityReference.h in Headers */, - 6661434B156C5452000F3A27 /* NodeList+Mutable.h in Headers */, - 66614352156C619F000F3A27 /* DocumentType.h in Headers */, - 66614358156C6263000F3A27 /* Node+Mutable.h in Headers */, - 6661435E156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */, - 6694713C157421B800EA533D /* SVGDocument.h in Headers */, - 667141EB159C7F4F00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, - 66CBCA5515B056D100C36B57 /* SVGRect.h in Headers */, - 66CBCA5B15B057AE00C36B57 /* SVGPoint.h in Headers */, - 66CBCA6115B05AD000C36B57 /* SVGViewSpec.h in Headers */, - 66CBCA6715B05D2300C36B57 /* SVGMatrix.h in Headers */, - 66CBCA6D15B358AD00C36B57 /* SVGNumber.h in Headers */, - 66CBCA7915B35A9200C36B57 /* SVGTransform.h in Headers */, - 66CBCA8015B3642300C36B57 /* SVGAngle.h in Headers */, - 6648DF7215B3846B00B929E2 /* SVGLayeredElement.h in Headers */, - 665D4E9D15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, - 667A2DA015B9FDDA00F4464E /* Document+Mutable.h in Headers */, - 66BB059715F40A870005D834 /* SVGLength.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8DC2EF500486A6940098B216 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BF503A8148C614D00CC7D17 /* CALayerWithChildHitTest.h in Headers */, - 3BF503A5148C612100CC7D17 /* CAShapeLayerWithHitTest.h in Headers */, - 66B79B0915475254002F99FF /* CGPathAdditions.h in Headers */, - 66B79B1D15475254002F99FF /* SVGKSource.h in Headers */, - 66B79B2D15475254002F99FF /* SVGKImage.h in Headers */, - 66B79B3915475254002F99FF /* SVGKit.h in Headers */, - 66B79B3F15475254002F99FF /* SVGKParser.h in Headers */, - 66B79B4D15475254002F99FF /* SVGKPattern.h in Headers */, - 66B79B7115475254002F99FF /* SVGUtils.h in Headers */, - 6684CD451566CF1300A46247 /* SVGKImage+SVGPathView.h in Headers */, - 6684CD4B1566D07400A46247 /* SVGKView.h in Headers */, - 666142A5156C2E6A000F3A27 /* SVGCircleElement.h in Headers */, - 666142A9156C2E6A000F3A27 /* SVGDefsElement.h in Headers */, - 666142AD156C2E6A000F3A27 /* SVGDescriptionElement.h in Headers */, - 666142B1156C2E6A000F3A27 /* SVGElement.h in Headers */, - 666142B5156C2E6A000F3A27 /* SVGEllipseElement.h in Headers */, - 666142B9156C2E6A000F3A27 /* SVGGroupElement.h in Headers */, - 666142BD156C2E6A000F3A27 /* SVGImageElement.h in Headers */, - 666142C1156C2E6A000F3A27 /* SVGLineElement.h in Headers */, - 666142C5156C2E6A000F3A27 /* SVGPathElement.h in Headers */, - 666142C9156C2E6A000F3A27 /* SVGPolygonElement.h in Headers */, - 666142CD156C2E6A000F3A27 /* SVGPolylineElement.h in Headers */, - 666142D1156C2E6A000F3A27 /* SVGRectElement.h in Headers */, - 666142D5156C2E6A000F3A27 /* SVGShapeElement.h in Headers */, - 666142D9156C2E6A000F3A27 /* SVGSVGElement.h in Headers */, - 666142DD156C2E6A000F3A27 /* SVGTextElement.h in Headers */, - 666142E1156C2E6A000F3A27 /* SVGTitleElement.h in Headers */, - 666142E5156C2E6A000F3A27 /* SVGKParseResult.h in Headers */, - 666142E9156C2E6A000F3A27 /* SVGKParserExtension.h in Headers */, - 666142EB156C2E6A000F3A27 /* SVGKParserSVG.h in Headers */, - 666142EF156C2E6A000F3A27 /* SVGKPointsAndPathsParser.h in Headers */, - 666142FC156C2F14000F3A27 /* Document.h in Headers */, - 66614302156C3A0B000F3A27 /* Node.h in Headers */, - 66614308156C3B95000F3A27 /* NodeList.h in Headers */, - 6661430E156C3DC7000F3A27 /* NamedNodeMap.h in Headers */, - 66614314156C3F62000F3A27 /* Element.h in Headers */, - 6661431A156C436F000F3A27 /* ProcessingInstruction.h in Headers */, - 66614320156C43BA000F3A27 /* Comment.h in Headers */, - 66614326156C43E0000F3A27 /* CharacterData.h in Headers */, - 6661432C156C44BD000F3A27 /* Attr.h in Headers */, - 66614332156C45F2000F3A27 /* DocumentFragment.h in Headers */, - 66614338156C463D000F3A27 /* Text.h in Headers */, - 6661433E156C46DF000F3A27 /* CDATASection.h in Headers */, - 66614344156C4726000F3A27 /* EntityReference.h in Headers */, - 6661434A156C5452000F3A27 /* NodeList+Mutable.h in Headers */, - 66614351156C619F000F3A27 /* DocumentType.h in Headers */, - 66614357156C6263000F3A27 /* Node+Mutable.h in Headers */, - 6661435D156C645F000F3A27 /* AppleSucksDOMImplementation.h in Headers */, - 6694713B157421B800EA533D /* SVGDocument.h in Headers */, - 667141B2159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.h in Headers */, - 66CBCA5415B056D100C36B57 /* SVGRect.h in Headers */, - 66CBCA5A15B057AE00C36B57 /* SVGPoint.h in Headers */, - 66CBCA6015B05AD000C36B57 /* SVGViewSpec.h in Headers */, - 66CBCA6615B05D2300C36B57 /* SVGMatrix.h in Headers */, - 66CBCA6C15B358AD00C36B57 /* SVGNumber.h in Headers */, - 66CBCA7815B35A9200C36B57 /* SVGTransform.h in Headers */, - 66CBCA7F15B3642300C36B57 /* SVGAngle.h in Headers */, - 6648DF7115B3846B00B929E2 /* SVGLayeredElement.h in Headers */, - 665D4E9C15B47FFA00B8DEB2 /* SVGElement_ForParser.h in Headers */, - 667A2D9F15B9FDDA00F4464E /* Document+Mutable.h in Headers */, - 66BB059615F40A870005D834 /* SVGLength.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 66213431148AF2CF006881E1 /* SVGKitLibrary */ = { - isa = PBXNativeTarget; - buildConfigurationList = 66213437148AF2CF006881E1 /* Build configuration list for PBXNativeTarget "SVGKitLibrary" */; - buildPhases = ( - 6621342E148AF2CF006881E1 /* Sources */, - 6621342F148AF2CF006881E1 /* Frameworks */, - 66213430148AF2CF006881E1 /* Headers */, - 66213464148AF3A7006881E1 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SVGKitLibrary; - productName = SVGKitLibrary; - productReference = 66213432148AF2CF006881E1 /* libSVGKitLibrary.a */; - productType = "com.apple.product-type.library.static"; - }; - 8DC2EF4F0486A6940098B216 /* SVGKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "SVGKit" */; - buildPhases = ( - 8DC2EF500486A6940098B216 /* Headers */, - 8DC2EF520486A6940098B216 /* Resources */, - 8DC2EF540486A6940098B216 /* Sources */, - 8DC2EF560486A6940098B216 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SVGKit; - productInstallPath = "$(HOME)/Library/Frameworks"; - productName = SVGKit; - productReference = 8DC2EF5B0486A6940098B216 /* SVGKit.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 0867D690FE84028FC02AAC07 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0430; - }; - buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "SVGKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 0867D691FE84028FC02AAC07 /* SVGKit */; - productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8DC2EF4F0486A6940098B216 /* SVGKit */, - 66213431148AF2CF006881E1 /* SVGKitLibrary */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8DC2EF520486A6940098B216 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 66213464148AF3A7006881E1 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 12; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Version 2.0 (updated for Xcode 4, with some fixes)\n# Changes:\n# - Works with xcode 4, even when running xcode 3 projects (Workarounds for apple bugs)\n# - Faster / better: only runs lipo once, instead of once per recursion\n# - Added some debugging statemetns that can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to \"true\"\n# - Fixed some typos\n# \n# Purpose:\n# Create a static library for iPhone from within XCode\n# Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI (Xcode 3.2.3 specifically states this in the Release notes!)\n# ...no, I don't understand why they did this!\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)\n#\n# More info: see this Stack Overflow question: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n\n#################[ Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"false\"\n\nif [ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use the following variables when debugging this script; note that they may change on recursions\"\necho \"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROOT = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR = $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR = $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n# (incidental: searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep -o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\" ]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho \"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting: ${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[ end of part 1 ]##################\n\n#####################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif [ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation, so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\" -target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\"\nxcodebuild -configuration \"${CONFIGURATION}\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\"\n\nACTION=\"build\"\n\n#Merge all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple) built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho \"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from: ${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\n\n# ... remove the products of previous runs of this script\n# NB: this directory is ONLY created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir \"${CREATING_UNIVERSAL_DIR}\"\n\n#\necho \"lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"\nlipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow suggestion to also copy \"include\" files\n# (untested, but should work OK)\n#\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\n# * needs to be outside the double quotes?\ncp \"${CURRENTCONFIG_DEVICE_DIR}/usr/local/include/\"* \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\nfi\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6621342E148AF2CF006881E1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 666142F2156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */, - 66213551148AF80B006881E1 /* CALayerWithChildHitTest.m in Sources */, - 66213553148AF80B006881E1 /* CAShapeLayerWithHitTest.m in Sources */, - 66213557148AF80B006881E1 /* SVGPathView.m in Sources */, - 66B79B0C15475254002F99FF /* CGPathAdditions.m in Sources */, - 66B79B2015475254002F99FF /* SVGKSource.m in Sources */, - 66B79B3015475254002F99FF /* SVGKImage.m in Sources */, - 66B79B4215475254002F99FF /* SVGKParser.m in Sources */, - 66B79B5015475254002F99FF /* SVGKPattern.m in Sources */, - 66B79B7415475254002F99FF /* SVGUtils.m in Sources */, - 6684CD481566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */, - 6684CD4E1566D07400A46247 /* SVGKView.m in Sources */, - 666142A8156C2E6A000F3A27 /* SVGCircleElement.m in Sources */, - 666142AC156C2E6A000F3A27 /* SVGDefsElement.m in Sources */, - 666142B0156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */, - 666142B4156C2E6A000F3A27 /* SVGElement.m in Sources */, - 666142B8156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */, - 666142BC156C2E6A000F3A27 /* SVGGroupElement.m in Sources */, - 666142C0156C2E6A000F3A27 /* SVGImageElement.m in Sources */, - 666142C4156C2E6A000F3A27 /* SVGLineElement.m in Sources */, - 666142C8156C2E6A000F3A27 /* SVGPathElement.m in Sources */, - 666142CC156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */, - 666142D0156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */, - 666142D4156C2E6A000F3A27 /* SVGRectElement.m in Sources */, - 666142D8156C2E6A000F3A27 /* SVGShapeElement.m in Sources */, - 666142DC156C2E6A000F3A27 /* SVGSVGElement.m in Sources */, - 666142E0156C2E6A000F3A27 /* SVGTextElement.m in Sources */, - 666142E4156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, - 666142E8156C2E6A000F3A27 /* SVGKParseResult.m in Sources */, - 666142EE156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */, - 666142FF156C2F14000F3A27 /* Document.m in Sources */, - 66614305156C3A0B000F3A27 /* Node.m in Sources */, - 6661430B156C3B95000F3A27 /* NodeList.m in Sources */, - 66614311156C3DC7000F3A27 /* NamedNodeMap.m in Sources */, - 66614317156C3F62000F3A27 /* Element.m in Sources */, - 6661431D156C436F000F3A27 /* ProcessingInstruction.m in Sources */, - 66614323156C43BA000F3A27 /* Comment.m in Sources */, - 66614329156C43E0000F3A27 /* CharacterData.m in Sources */, - 6661432F156C44BD000F3A27 /* Attr.m in Sources */, - 66614335156C45F2000F3A27 /* DocumentFragment.m in Sources */, - 6661433B156C463D000F3A27 /* Text.m in Sources */, - 66614341156C46DF000F3A27 /* CDATASection.m in Sources */, - 66614347156C4726000F3A27 /* EntityReference.m in Sources */, - 66614354156C619F000F3A27 /* DocumentType.m in Sources */, - 66614360156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */, - 6694713E157421B800EA533D /* SVGDocument.m in Sources */, - 667141EE159C801500C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, - 66CBCA5D15B057AE00C36B57 /* SVGPoint.m in Sources */, - 66CBCA6915B05D2300C36B57 /* SVGMatrix.m in Sources */, - 66CBCA7B15B35A9200C36B57 /* SVGTransform.m in Sources */, - 66CBCA8215B3642300C36B57 /* SVGAngle.m in Sources */, - 66BB059915F40A870005D834 /* SVGLength.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8DC2EF540486A6940098B216 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BF503A7148C614600CC7D17 /* CALayerWithChildHitTest.m in Sources */, - 3BF503A6148C612F00CC7D17 /* CAShapeLayerWithHitTest.m in Sources */, - 66B79B0B15475254002F99FF /* CGPathAdditions.m in Sources */, - 66B79B1F15475254002F99FF /* SVGKSource.m in Sources */, - 66B79B2F15475254002F99FF /* SVGKImage.m in Sources */, - 66B79B4115475254002F99FF /* SVGKParser.m in Sources */, - 66B79B4F15475254002F99FF /* SVGKPattern.m in Sources */, - 66B79B7315475254002F99FF /* SVGUtils.m in Sources */, - 6684CD471566CF1300A46247 /* SVGKImage+SVGPathView.m in Sources */, - 6684CD4D1566D07400A46247 /* SVGKView.m in Sources */, - 666142A7156C2E6A000F3A27 /* SVGCircleElement.m in Sources */, - 666142AB156C2E6A000F3A27 /* SVGDefsElement.m in Sources */, - 666142AF156C2E6A000F3A27 /* SVGDescriptionElement.m in Sources */, - 666142B3156C2E6A000F3A27 /* SVGElement.m in Sources */, - 666142B7156C2E6A000F3A27 /* SVGEllipseElement.m in Sources */, - 666142BB156C2E6A000F3A27 /* SVGGroupElement.m in Sources */, - 666142BF156C2E6A000F3A27 /* SVGImageElement.m in Sources */, - 666142C3156C2E6A000F3A27 /* SVGLineElement.m in Sources */, - 666142C7156C2E6A000F3A27 /* SVGPathElement.m in Sources */, - 666142CB156C2E6A000F3A27 /* SVGPolygonElement.m in Sources */, - 666142CF156C2E6A000F3A27 /* SVGPolylineElement.m in Sources */, - 666142D3156C2E6A000F3A27 /* SVGRectElement.m in Sources */, - 666142D7156C2E6A000F3A27 /* SVGShapeElement.m in Sources */, - 666142DB156C2E6A000F3A27 /* SVGSVGElement.m in Sources */, - 666142DF156C2E6A000F3A27 /* SVGTextElement.m in Sources */, - 666142E3156C2E6A000F3A27 /* SVGTitleElement.m in Sources */, - 666142E7156C2E6A000F3A27 /* SVGKParseResult.m in Sources */, - 666142ED156C2E6A000F3A27 /* SVGKParserSVG.m in Sources */, - 666142F1156C2E6A000F3A27 /* SVGKPointsAndPathsParser.m in Sources */, - 666142FE156C2F14000F3A27 /* Document.m in Sources */, - 66614304156C3A0B000F3A27 /* Node.m in Sources */, - 6661430A156C3B95000F3A27 /* NodeList.m in Sources */, - 66614310156C3DC7000F3A27 /* NamedNodeMap.m in Sources */, - 66614316156C3F62000F3A27 /* Element.m in Sources */, - 6661431C156C436F000F3A27 /* ProcessingInstruction.m in Sources */, - 66614322156C43BA000F3A27 /* Comment.m in Sources */, - 66614328156C43E0000F3A27 /* CharacterData.m in Sources */, - 6661432E156C44BD000F3A27 /* Attr.m in Sources */, - 66614334156C45F2000F3A27 /* DocumentFragment.m in Sources */, - 6661433A156C463D000F3A27 /* Text.m in Sources */, - 66614340156C46DF000F3A27 /* CDATASection.m in Sources */, - 66614346156C4726000F3A27 /* EntityReference.m in Sources */, - 66614353156C619F000F3A27 /* DocumentType.m in Sources */, - 6661435F156C645F000F3A27 /* AppleSucksDOMImplementation.m in Sources */, - 6694713D157421B800EA533D /* SVGDocument.m in Sources */, - 667141B3159C7E1C00C5A424 /* SVGKParserPatternsAndGradients.m in Sources */, - 66CBCA5C15B057AE00C36B57 /* SVGPoint.m in Sources */, - 66CBCA6815B05D2300C36B57 /* SVGMatrix.m in Sources */, - 66CBCA7A15B35A9200C36B57 /* SVGTransform.m in Sources */, - 66CBCA8115B3642300C36B57 /* SVGAngle.m in Sources */, - 6643AE2A15B8506400E5F2AB /* SVGPathView.m in Sources */, - 66BB059815F40A870005D834 /* SVGLength.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB91AE08733DA50010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_VERSION = A; - GCC_DYNAMIC_NO_PIC = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = SVGKit_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "@executable_path/../Frameworks"; - PRODUCT_NAME = SVGKit; - WRAPPER_EXTENSION = framework; - }; - name = Debug; - }; - 1DEB91AF08733DA50010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_VERSION = A; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = SVGKit_Prefix.pch; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "@executable_path/../Frameworks"; - PRODUCT_NAME = SVGKit; - WRAPPER_EXTENSION = framework; - }; - name = Release; - }; - 1DEB91B208733DA50010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1DEB91B308733DA50010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = supported; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - SDKROOT = macosx; - }; - name = Release; - }; - 66213438148AF2CF006881E1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - DSTROOT = /tmp/SVGKitLibrary.dst; - GCC_ENABLE_OBJC_GC = unsupported; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SVGKitLibrary/SVGKitLibrary-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 66213439148AF2CF006881E1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - DSTROOT = /tmp/SVGKitLibrary.dst; - GCC_ENABLE_OBJC_GC = unsupported; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SVGKitLibrary/SVGKitLibrary-Prefix.pch"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "SVGKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91AE08733DA50010E9CD /* Debug */, - 1DEB91AF08733DA50010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "SVGKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91B208733DA50010E9CD /* Debug */, - 1DEB91B308733DA50010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 66213437148AF2CF006881E1 /* Build configuration list for PBXNativeTarget "SVGKitLibrary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 66213438148AF2CF006881E1 /* Debug */, - 66213439148AF2CF006881E1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 0867D690FE84028FC02AAC07 /* Project object */; -} diff --git a/XCodeProjects/SVGKit/SVGKitLibrary/SVGKitLibrary-Prefix.pch b/XCodeProjects/SVGKit/SVGKitLibrary/SVGKitLibrary-Prefix.pch deleted file mode 100644 index 7c3a2edf1..000000000 --- a/XCodeProjects/SVGKit/SVGKitLibrary/SVGKitLibrary-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SVGKitLibrary' target in the 'SVGKitLibrary' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/XCodeProjects/SVGKit/SVGKit_Prefix.pch b/XCodeProjects/SVGKit/SVGKit_Prefix.pch deleted file mode 100644 index bc9cf2df2..000000000 --- a/XCodeProjects/SVGKit/SVGKit_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SVGKit' target in the 'SVGKit' project. -// - -#ifdef __OBJC__ - #import -#endif diff --git a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.h b/XCodeProjects/SVGPadDemo/Classes/DetailViewController.h deleted file mode 100644 index c071cb8b6..000000000 --- a/XCodeProjects/SVGPadDemo/Classes/DetailViewController.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// DetailViewController.h -// SVGPad -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGKit.h" -#import "CALayerExporter.h" - -@interface DetailViewController : UIViewController < UIPopoverControllerDelegate, UISplitViewControllerDelegate , CALayerExporterDelegate, UIScrollViewDelegate> { - @private - NSString *_name; - UITextView* _exportText; - NSMutableString* _exportLog; - CALayerExporter* _layerExporter; -} - -@property (nonatomic, retain) IBOutlet UIToolbar *toolbar; -@property (retain, nonatomic) IBOutlet UIScrollView *scrollView; -@property (nonatomic, retain) IBOutlet SVGKView *contentView; - -@property (nonatomic, retain) id detailItem; - -- (IBAction)animate:(id)sender; -- (IBAction)exportLayers:(id)sender; - -@end diff --git a/XCodeProjects/SVGPadDemo/Classes/RootViewController.m b/XCodeProjects/SVGPadDemo/Classes/RootViewController.m deleted file mode 100644 index 5893c5e13..000000000 --- a/XCodeProjects/SVGPadDemo/Classes/RootViewController.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// RootViewController.m -// SVGPad -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "RootViewController.h" - -#import "DetailViewController.h" - -@implementation RootViewController - -@synthesize detailViewController = _detailViewController; - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - _sampleNames = [[NSArray alloc] initWithObjects:@"australia_states_blank", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", nil]; - } - return self; -} - -- (void)dealloc { - [_detailViewController release]; - [_sampleNames release]; - - [super dealloc]; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.clearsSelectionOnViewWillAppear = NO; - self.contentSizeForViewInPopover = CGSizeMake(320.0f, 600.0f); -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return YES; -} - -- (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section { - return [_sampleNames count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - - if (!cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:CellIdentifier] autorelease]; - } - - cell.textLabel.text = [_sampleNames objectAtIndex:indexPath.row]; - - return cell; -} - -- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - _detailViewController.detailItem = [_sampleNames objectAtIndex:indexPath.row]; -} - -@end diff --git a/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h b/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h deleted file mode 100644 index 6ead2d8fc..000000000 --- a/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// SVGPadAppDelegate.h -// SVGPad -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import -#import - -@class RootViewController, DetailViewController; - -@interface SVGPadAppDelegate : NSObject < UIApplicationDelegate > { } - -@property (nonatomic, retain) IBOutlet UIWindow *window; - -@property (nonatomic, retain) IBOutlet UISplitViewController *splitViewController; -@property (nonatomic, retain) IBOutlet RootViewController *rootViewController; -@property (nonatomic, retain) IBOutlet DetailViewController *detailViewController; - -@end diff --git a/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.m b/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.m deleted file mode 100644 index 0404f7de3..000000000 --- a/XCodeProjects/SVGPadDemo/Classes/SVGPadAppDelegate.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// SVGPadAppDelegate.m -// SVGPad -// -// Copyright Matt Rajca 2010. All rights reserved. -// - -#import "SVGPadAppDelegate.h" - -#import "DetailViewController.h" -#import "RootViewController.h" - -@implementation SVGPadAppDelegate - -@synthesize window, splitViewController, rootViewController, detailViewController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [self.window addSubview:splitViewController.view]; - [self.window makeKeyAndVisible]; - - return YES; -} - -- (void)dealloc { - self.window = nil; - self.splitViewController = nil; - self.rootViewController = nil; - self.detailViewController = nil; - - [super dealloc]; -} - -@end diff --git a/XCodeProjects/SVGPadDemo/DetailView.xib b/XCodeProjects/SVGPadDemo/DetailView.xib deleted file mode 100644 index 8507497b4..000000000 --- a/XCodeProjects/SVGPadDemo/DetailView.xib +++ /dev/null @@ -1,410 +0,0 @@ - - - - 1296 - 11E53 - 2182 - 1138.47 - 569.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1181 - - - YES - IBUIBarButtonItem - IBUIToolbar - IBUIView - IBUIScrollView - IBProxyObject - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 274 - - YES - - - 290 - {768, 44} - - - - NO - NO - IBIPadFramework - - YES - - IBIPadFramework - - 5 - - - Export Layers - IBIPadFramework - 1 - - - - Animate - IBIPadFramework - 1 - - - - - - - 274 - - YES - - - 292 - {768, 960} - - - - - 3 - MQA - - 2 - - - IBIPadFramework - - - {{0, 44}, {768, 960}} - - - - YES - YES - IBIPadFramework - 0.25 - 3 - - - {{0, 20}, {768, 1004}} - - - - - 3 - MQA - - NO - - 2 - - IBIPadFramework - - - - - YES - - - view - - - - 12 - - - - toolbar - - - - 65 - - - - contentView - - - - 86 - - - - scrollView - - - - 95 - - - - animate: - - - - 89 - - - - exportLayers: - - - - 92 - - - - delegate - - - - 94 - - - - - YES - - 0 - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 8 - - - YES - - - - - - - 63 - - - YES - - - - - - - - 87 - - - - - 88 - - - - - 90 - - - - - 93 - - - YES - - - - - - 85 - - - - - - - YES - - YES - -1.CustomClassName - -1.IBPluginDependency - -2.CustomClassName - -2.IBPluginDependency - 63.IBPluginDependency - 8.IBPluginDependency - 85.CustomClassName - 85.IBPluginDependency - 87.IBPluginDependency - 88.IBPluginDependency - 90.IBPluginDependency - 93.IBPluginDependency - - - YES - DetailViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - SVGKView - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - - - - YES - - - - - 95 - - - - YES - - DetailViewController - UIViewController - - YES - - YES - animate: - exportLayers: - - - YES - id - id - - - - YES - - YES - animate: - exportLayers: - - - YES - - animate: - id - - - exportLayers: - id - - - - - YES - - YES - contentView - scrollView - toolbar - - - YES - SVGKView - UIScrollView - UIToolbar - - - - YES - - YES - contentView - scrollView - toolbar - - - YES - - contentView - SVGKView - - - scrollView - UIScrollView - - - toolbar - UIToolbar - - - - - IBProjectSource - ./Classes/DetailViewController.h - - - - SVGKView - UIView - - IBProjectSource - ./Classes/SVGKView.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - 3 - 1181 - - diff --git a/XCodeProjects/SVGPadDemo/MainWindow.xib b/XCodeProjects/SVGPadDemo/MainWindow.xib deleted file mode 100644 index 4b98bca85..000000000 --- a/XCodeProjects/SVGPadDemo/MainWindow.xib +++ /dev/null @@ -1,626 +0,0 @@ - - - - 1056 - 10F569 - 823 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 132 - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - IBFilesOwner - IBIPadFramework - - - IBFirstResponder - IBIPadFramework - - - - 292 - {768, 1024} - - 1 - MSAxIDEAA - - NO - NO - - 2 - - IBIPadFramework - YES - - - IBIPadFramework - - - - - 2 - - - 3 - - IBIPadFramework - YES - - - - 2 - - - 1 - - IBIPadFramework - NO - - - 256 - {0, 0} - YES - YES - IBIPadFramework - - - - - - Samples - IBIPadFramework - - - - 2 - - - 1 - - IBIPadFramework - NO - - - - - - - DetailView - - 1 - - IBIPadFramework - NO - - - - - - - - window - - - - 4 - - - - delegate - - - - 17 - - - - splitViewController - - - - 43 - - - - rootViewController - - - - 44 - - - - detailViewController - - - - 45 - - - - detailViewController - - - - 46 - - - - delegate - - - - 49 - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - 3 - - - - - 37 - - - - - - - - - 38 - - - - - - - - - 39 - - - - - 40 - - - - - - - - 41 - - - - - 42 - - - - - - - UIApplication - UIResponder - {{190, 57}, {783, 799}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - SVGPadAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{251, 388}, {1024, 768}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - DetailViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - RootViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 49 - - - - - ContentView - UIView - - IBProjectSource - Classes/ContentView.h - - - - DetailViewController - UIViewController - - ContentView - UIToolbar - - - - contentView - ContentView - - - toolbar - UIToolbar - - - - IBProjectSource - Classes/DetailViewController.h - - - - RootViewController - UITableViewController - - detailViewController - DetailViewController - - - detailViewController - - detailViewController - DetailViewController - - - - IBProjectSource - Classes/RootViewController.h - - - - RootViewController - UITableViewController - - IBUserSource - - - - - SVGPadAppDelegate - NSObject - - DetailViewController - RootViewController - UISplitViewController - UIWindow - - - - detailViewController - DetailViewController - - - rootViewController - RootViewController - - - splitViewController - UISplitViewController - - - window - UIWindow - - - - IBProjectSource - Classes/SVGPadAppDelegate.h - - - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIApplication - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIApplication.h - - - - UIBarButtonItem - UIBarItem - - IBFrameworkSource - UIKit.framework/Headers/UIBarButtonItem.h - - - - UIBarItem - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIBarItem.h - - - - UINavigationBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UINavigationBar.h - - - - UINavigationController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UINavigationItem - NSObject - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UISplitViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIToolbar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIToolbar.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIPrintFormatter.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - UIWindow - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIWindow.h - - - - - 0 - IBIPadFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - SVGPad.xcodeproj - 3 - 132 - - diff --git a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj b/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj deleted file mode 100755 index ff2afeebc..000000000 --- a/XCodeProjects/SVGPadDemo/SVGPad.xcodeproj/project.pbxproj +++ /dev/null @@ -1,754 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2804203C108E9BAB000629CD /* DetailView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2804203B108E9BAB000629CD /* DetailView.xib */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; - 3BC23F071488686900FC74CE /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC23F061488686900FC74CE /* libxml2.dylib */; }; - 3BF50422148C63F500CC7D17 /* CurvedDiamond.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */; }; - 3BF50423148C63F500CC7D17 /* Lion.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041C148C63F500CC7D17 /* Lion.svg */; }; - 3BF50424148C63F500CC7D17 /* Map.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041D148C63F500CC7D17 /* Map.svg */; }; - 3BF50425148C63F500CC7D17 /* Monkey.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041E148C63F500CC7D17 /* Monkey.svg */; }; - 3BF50426148C63F500CC7D17 /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF5041F148C63F500CC7D17 /* Note.svg */; }; - 3BF50427148C63F500CC7D17 /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50420148C63F500CC7D17 /* test-wave-1.svg */; }; - 3BF50428148C63F500CC7D17 /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3BF50421148C63F500CC7D17 /* Text.svg */; }; - 662D1A2215B36C800027D07B /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28042008108E984D000629CD /* RootViewController.m */; }; - 662D1A2315B36C830027D07B /* SVGPadAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SVGPadAppDelegate.m */; }; - 662D1A2415B36C890027D07B /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2804200A108E984D000629CD /* DetailViewController.m */; }; - 662D1A2515B36C9C0027D07B /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66436E5214A0BCEF001CC769 /* CALayerExporter.m */; }; - 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */; }; - 663DEFEF14BFDAC100C56E07 /* uk-only.svg in Resources */ = {isa = PBXBuildFile; fileRef = 663DEFEE14BFDAC100C56E07 /* uk-only.svg */; }; - 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */; }; - 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */; }; - 66853A90160E561C00FE256C /* CGPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A80160E561B00FE256C /* CGPathAdditions.m */; }; - 66853A91160E561C00FE256C /* SVGKImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A82160E561B00FE256C /* SVGKImage.m */; }; - 66853A92160E561C00FE256C /* SVGKImage+SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A84160E561B00FE256C /* SVGKImage+SVGPathView.m */; }; - 66853A93160E561C00FE256C /* SVGKParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A87160E561B00FE256C /* SVGKParser.m */; }; - 66853A94160E561C00FE256C /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A89160E561B00FE256C /* SVGKPattern.m */; }; - 66853A95160E561C00FE256C /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A8B160E561B00FE256C /* SVGKSource.m */; }; - 66853A96160E561C00FE256C /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A8D160E561B00FE256C /* SVGKView.m */; }; - 66853A97160E561C00FE256C /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A8F160E561C00FE256C /* SVGUtils.m */; }; - 66853AB9160E565900FE256C /* AppleSucksDOMImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A99160E565900FE256C /* AppleSucksDOMImplementation.m */; }; - 66853ABA160E565900FE256C /* Attr.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A9B160E565900FE256C /* Attr.m */; }; - 66853ABB160E565900FE256C /* CDATASection.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A9D160E565900FE256C /* CDATASection.m */; }; - 66853ABC160E565900FE256C /* CharacterData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853A9F160E565900FE256C /* CharacterData.m */; }; - 66853ABD160E565900FE256C /* Comment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA1160E565900FE256C /* Comment.m */; }; - 66853ABE160E565900FE256C /* Document.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA3160E565900FE256C /* Document.m */; }; - 66853ABF160E565900FE256C /* DocumentFragment.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA6160E565900FE256C /* DocumentFragment.m */; }; - 66853AC0160E565900FE256C /* DocumentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AA8160E565900FE256C /* DocumentType.m */; }; - 66853AC1160E565900FE256C /* Element.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AAA160E565900FE256C /* Element.m */; }; - 66853AC2160E565900FE256C /* EntityReference.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AAC160E565900FE256C /* EntityReference.m */; }; - 66853AC3160E565900FE256C /* NamedNodeMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AAE160E565900FE256C /* NamedNodeMap.m */; }; - 66853AC4160E565900FE256C /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB0160E565900FE256C /* Node.m */; }; - 66853AC5160E565900FE256C /* NodeList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB3160E565900FE256C /* NodeList.m */; }; - 66853AC6160E565900FE256C /* ProcessingInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB6160E565900FE256C /* ProcessingInstruction.m */; }; - 66853AC7160E565900FE256C /* Text.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AB8160E565900FE256C /* Text.m */; }; - 66853AD9160E566500FE256C /* SVGAngle.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AC9160E566500FE256C /* SVGAngle.m */; }; - 66853ADA160E566500FE256C /* SVGDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853ACC160E566500FE256C /* SVGDocument.m */; }; - 66853ADB160E566500FE256C /* SVGLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853ACE160E566500FE256C /* SVGLength.m */; }; - 66853ADC160E566500FE256C /* SVGMatrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AD0160E566500FE256C /* SVGMatrix.m */; }; - 66853ADD160E566500FE256C /* SVGPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AD3160E566500FE256C /* SVGPoint.m */; }; - 66853ADE160E566500FE256C /* SVGTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AD7160E566500FE256C /* SVGTransform.m */; }; - 66853B01160E567300FE256C /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE0160E567300FE256C /* SVGCircleElement.m */; }; - 66853B02160E567300FE256C /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE2160E567300FE256C /* SVGDefsElement.m */; }; - 66853B03160E567300FE256C /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE4160E567300FE256C /* SVGDescriptionElement.m */; }; - 66853B04160E567300FE256C /* SVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE7160E567300FE256C /* SVGElement.m */; }; - 66853B05160E567300FE256C /* SVGEllipseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AE9160E567300FE256C /* SVGEllipseElement.m */; }; - 66853B06160E567300FE256C /* SVGGroupElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AEB160E567300FE256C /* SVGGroupElement.m */; }; - 66853B07160E567300FE256C /* SVGImageElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AED160E567300FE256C /* SVGImageElement.m */; }; - 66853B08160E567300FE256C /* SVGLineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF0160E567300FE256C /* SVGLineElement.m */; }; - 66853B09160E567300FE256C /* SVGPathElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF2160E567300FE256C /* SVGPathElement.m */; }; - 66853B0A160E567300FE256C /* SVGPolygonElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF4160E567300FE256C /* SVGPolygonElement.m */; }; - 66853B0B160E567300FE256C /* SVGPolylineElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF6160E567300FE256C /* SVGPolylineElement.m */; }; - 66853B0C160E567300FE256C /* SVGRectElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AF8160E567300FE256C /* SVGRectElement.m */; }; - 66853B0D160E567300FE256C /* SVGShapeElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AFA160E567300FE256C /* SVGShapeElement.m */; }; - 66853B0E160E567300FE256C /* SVGSVGElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AFC160E567300FE256C /* SVGSVGElement.m */; }; - 66853B0F160E567300FE256C /* SVGTextElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853AFE160E567300FE256C /* SVGTextElement.m */; }; - 66853B10160E567300FE256C /* SVGTitleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B00160E567300FE256C /* SVGTitleElement.m */; }; - 66853B17160E568200FE256C /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B12160E568200FE256C /* CALayerWithChildHitTest.m */; }; - 66853B18160E568200FE256C /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B14160E568200FE256C /* CAShapeLayerWithHitTest.m */; }; - 66853B19160E568200FE256C /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B16160E568200FE256C /* SVGPathView.m */; }; - 66853B23160E569A00FE256C /* SVGKParseResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B1B160E569A00FE256C /* SVGKParseResult.m */; }; - 66853B24160E569A00FE256C /* SVGKParserPatternsAndGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B1E160E569A00FE256C /* SVGKParserPatternsAndGradients.m */; }; - 66853B25160E569A00FE256C /* SVGKParserSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B20160E569A00FE256C /* SVGKParserSVG.m */; }; - 66853B26160E569A00FE256C /* SVGKPointsAndPathsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 66853B22160E569A00FE256C /* SVGKPointsAndPathsParser.m */; }; - 66BBD74315028F0A00102FEF /* australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD74215028F0A00102FEF /* australia_states_blank.svg */; }; - 66BBD7461502A4EE00102FEF /* Europe_states_reduced.svg in Resources */ = {isa = PBXBuildFile; fileRef = 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */; }; - C94B6C5D1274BBFC00B456EB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* SVGPadAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPadAppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* SVGPadAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPadAppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* SVGPad.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SVGPad.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 28042007108E984D000629CD /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 28042008108E984D000629CD /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; - 28042009108E984D000629CD /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; - 2804200A108E984D000629CD /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; - 2804203B108E9BAB000629CD /* DetailView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DetailView.xib; sourceTree = ""; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28A0AAE50D9B0CCF005BE974 /* SVGPad_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPad_Prefix.pch; sourceTree = ""; }; - 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 3BC23F061488686900FC74CE /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; - 3BF5041C148C63F500CC7D17 /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; - 3BF5041D148C63F500CC7D17 /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; - 3BF5041E148C63F500CC7D17 /* Monkey.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Monkey.svg; sourceTree = ""; }; - 3BF5041F148C63F500CC7D17 /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; - 3BF50420148C63F500CC7D17 /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; - 3BF50421148C63F500CC7D17 /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; - 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; - 663DEFEE14BFDAC100C56E07 /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; - 66436E5114A0BCEF001CC769 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; - 66436E5214A0BCEF001CC769 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; - 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; - 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; - 66853A7F160E561B00FE256C /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; - 66853A80160E561B00FE256C /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; - 66853A81160E561B00FE256C /* SVGKImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKImage.h; sourceTree = ""; }; - 66853A82160E561B00FE256C /* SVGKImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKImage.m; sourceTree = ""; }; - 66853A83160E561B00FE256C /* SVGKImage+SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKImage+SVGPathView.h"; sourceTree = ""; }; - 66853A84160E561B00FE256C /* SVGKImage+SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SVGKImage+SVGPathView.m"; sourceTree = ""; }; - 66853A85160E561B00FE256C /* SVGKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKit.h; sourceTree = ""; }; - 66853A86160E561B00FE256C /* SVGKParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParser.h; sourceTree = ""; }; - 66853A87160E561B00FE256C /* SVGKParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParser.m; sourceTree = ""; }; - 66853A88160E561B00FE256C /* SVGKPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPattern.h; sourceTree = ""; }; - 66853A89160E561B00FE256C /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; - 66853A8A160E561B00FE256C /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; - 66853A8B160E561B00FE256C /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; - 66853A8C160E561B00FE256C /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; - 66853A8D160E561B00FE256C /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; - 66853A8E160E561C00FE256C /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; - 66853A8F160E561C00FE256C /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; - 66853A98160E565900FE256C /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; - 66853A99160E565900FE256C /* AppleSucksDOMImplementation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleSucksDOMImplementation.m; sourceTree = ""; }; - 66853A9A160E565900FE256C /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attr.h; sourceTree = ""; }; - 66853A9B160E565900FE256C /* Attr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Attr.m; sourceTree = ""; }; - 66853A9C160E565900FE256C /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = ""; }; - 66853A9D160E565900FE256C /* CDATASection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDATASection.m; sourceTree = ""; }; - 66853A9E160E565900FE256C /* CharacterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterData.h; sourceTree = ""; }; - 66853A9F160E565900FE256C /* CharacterData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterData.m; sourceTree = ""; }; - 66853AA0160E565900FE256C /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; - 66853AA1160E565900FE256C /* Comment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Comment.m; sourceTree = ""; }; - 66853AA2160E565900FE256C /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Document.h; sourceTree = ""; }; - 66853AA3160E565900FE256C /* Document.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Document.m; sourceTree = ""; }; - 66853AA4160E565900FE256C /* Document+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Document+Mutable.h"; sourceTree = ""; }; - 66853AA5160E565900FE256C /* DocumentFragment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentFragment.h; sourceTree = ""; }; - 66853AA6160E565900FE256C /* DocumentFragment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentFragment.m; sourceTree = ""; }; - 66853AA7160E565900FE256C /* DocumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentType.h; sourceTree = ""; }; - 66853AA8160E565900FE256C /* DocumentType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentType.m; sourceTree = ""; }; - 66853AA9160E565900FE256C /* Element.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Element.h; sourceTree = ""; }; - 66853AAA160E565900FE256C /* Element.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Element.m; sourceTree = ""; }; - 66853AAB160E565900FE256C /* EntityReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntityReference.h; sourceTree = ""; }; - 66853AAC160E565900FE256C /* EntityReference.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntityReference.m; sourceTree = ""; }; - 66853AAD160E565900FE256C /* NamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedNodeMap.h; sourceTree = ""; }; - 66853AAE160E565900FE256C /* NamedNodeMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NamedNodeMap.m; sourceTree = ""; }; - 66853AAF160E565900FE256C /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Node.h; sourceTree = ""; }; - 66853AB0160E565900FE256C /* Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Node.m; sourceTree = ""; }; - 66853AB1160E565900FE256C /* Node+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Node+Mutable.h"; sourceTree = ""; }; - 66853AB2160E565900FE256C /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeList.h; sourceTree = ""; }; - 66853AB3160E565900FE256C /* NodeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeList.m; sourceTree = ""; }; - 66853AB4160E565900FE256C /* NodeList+Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NodeList+Mutable.h"; sourceTree = ""; }; - 66853AB5160E565900FE256C /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; - 66853AB6160E565900FE256C /* ProcessingInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProcessingInstruction.m; sourceTree = ""; }; - 66853AB7160E565900FE256C /* Text.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = ""; }; - 66853AB8160E565900FE256C /* Text.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Text.m; sourceTree = ""; }; - 66853AC8160E566500FE256C /* SVGAngle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAngle.h; sourceTree = ""; }; - 66853AC9160E566500FE256C /* SVGAngle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAngle.m; sourceTree = ""; }; - 66853ACA160E566500FE256C /* SVGDocument_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument_Mutable.h; sourceTree = ""; }; - 66853ACB160E566500FE256C /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = ""; }; - 66853ACC160E566500FE256C /* SVGDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDocument.m; sourceTree = ""; }; - 66853ACD160E566500FE256C /* SVGLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLength.h; sourceTree = ""; }; - 66853ACE160E566500FE256C /* SVGLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLength.m; sourceTree = ""; }; - 66853ACF160E566500FE256C /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = ""; }; - 66853AD0160E566500FE256C /* SVGMatrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGMatrix.m; sourceTree = ""; }; - 66853AD1160E566500FE256C /* SVGNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGNumber.h; sourceTree = ""; }; - 66853AD2160E566500FE256C /* SVGPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPoint.h; sourceTree = ""; }; - 66853AD3160E566500FE256C /* SVGPoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPoint.m; sourceTree = ""; }; - 66853AD4160E566500FE256C /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = ""; }; - 66853AD5160E566500FE256C /* SVGSVGElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement_Mutable.h; sourceTree = ""; }; - 66853AD6160E566500FE256C /* SVGTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransform.h; sourceTree = ""; }; - 66853AD7160E566500FE256C /* SVGTransform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTransform.m; sourceTree = ""; }; - 66853AD8160E566500FE256C /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; - 66853ADF160E567300FE256C /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; - 66853AE0160E567300FE256C /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 66853AE1160E567300FE256C /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 66853AE2160E567300FE256C /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; - 66853AE3160E567300FE256C /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; - 66853AE4160E567300FE256C /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; - 66853AE5160E567300FE256C /* SVGElement_ForParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement_ForParser.h; sourceTree = ""; }; - 66853AE6160E567300FE256C /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; - 66853AE7160E567300FE256C /* SVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElement.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 66853AE8160E567300FE256C /* SVGEllipseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGEllipseElement.h; sourceTree = ""; }; - 66853AE9160E567300FE256C /* SVGEllipseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGEllipseElement.m; sourceTree = ""; }; - 66853AEA160E567300FE256C /* SVGGroupElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGroupElement.h; sourceTree = ""; }; - 66853AEB160E567300FE256C /* SVGGroupElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGGroupElement.m; sourceTree = ""; }; - 66853AEC160E567300FE256C /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = ""; }; - 66853AED160E567300FE256C /* SVGImageElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGImageElement.m; sourceTree = ""; }; - 66853AEE160E567300FE256C /* SVGLayeredElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLayeredElement.h; sourceTree = ""; }; - 66853AEF160E567300FE256C /* SVGLineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLineElement.h; sourceTree = ""; }; - 66853AF0160E567300FE256C /* SVGLineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGLineElement.m; sourceTree = ""; }; - 66853AF1160E567300FE256C /* SVGPathElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathElement.h; sourceTree = ""; }; - 66853AF2160E567300FE256C /* SVGPathElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathElement.m; sourceTree = ""; }; - 66853AF3160E567300FE256C /* SVGPolygonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolygonElement.h; sourceTree = ""; }; - 66853AF4160E567300FE256C /* SVGPolygonElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolygonElement.m; sourceTree = ""; }; - 66853AF5160E567300FE256C /* SVGPolylineElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPolylineElement.h; sourceTree = ""; }; - 66853AF6160E567300FE256C /* SVGPolylineElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPolylineElement.m; sourceTree = ""; }; - 66853AF7160E567300FE256C /* SVGRectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRectElement.h; sourceTree = ""; }; - 66853AF8160E567300FE256C /* SVGRectElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGRectElement.m; sourceTree = ""; }; - 66853AF9160E567300FE256C /* SVGShapeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGShapeElement.h; sourceTree = ""; }; - 66853AFA160E567300FE256C /* SVGShapeElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGShapeElement.m; sourceTree = ""; }; - 66853AFB160E567300FE256C /* SVGSVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGSVGElement.h; sourceTree = ""; }; - 66853AFC160E567300FE256C /* SVGSVGElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGSVGElement.m; sourceTree = ""; }; - 66853AFD160E567300FE256C /* SVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextElement.h; sourceTree = ""; }; - 66853AFE160E567300FE256C /* SVGTextElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTextElement.m; sourceTree = ""; }; - 66853AFF160E567300FE256C /* SVGTitleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTitleElement.h; sourceTree = ""; }; - 66853B00160E567300FE256C /* SVGTitleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTitleElement.m; sourceTree = ""; }; - 66853B11160E568200FE256C /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; - 66853B12160E568200FE256C /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; - 66853B13160E568200FE256C /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; - 66853B14160E568200FE256C /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 66853B15160E568200FE256C /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; - 66853B16160E568200FE256C /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; - 66853B1A160E569A00FE256C /* SVGKParseResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParseResult.h; sourceTree = ""; }; - 66853B1B160E569A00FE256C /* SVGKParseResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParseResult.m; sourceTree = ""; }; - 66853B1C160E569A00FE256C /* SVGKParserExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserExtension.h; sourceTree = ""; }; - 66853B1D160E569A00FE256C /* SVGKParserPatternsAndGradients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserPatternsAndGradients.h; sourceTree = ""; }; - 66853B1E160E569A00FE256C /* SVGKParserPatternsAndGradients.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserPatternsAndGradients.m; sourceTree = ""; }; - 66853B1F160E569A00FE256C /* SVGKParserSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserSVG.h; sourceTree = ""; }; - 66853B20160E569A00FE256C /* SVGKParserSVG.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserSVG.m; sourceTree = ""; }; - 66853B21160E569A00FE256C /* SVGKPointsAndPathsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKPointsAndPathsParser.h; sourceTree = ""; }; - 66853B22160E569A00FE256C /* SVGKPointsAndPathsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPointsAndPathsParser.m; sourceTree = ""; }; - 66BBD74215028F0A00102FEF /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; - 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* SVGPad-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SVGPad-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3BC23F071488686900FC74CE /* libxml2.dylib in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - C94B6C5D1274BBFC00B456EB /* QuartzCore.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Controllers */ = { - isa = PBXGroup; - children = ( - 28042009108E984D000629CD /* DetailViewController.h */, - 2804200A108E984D000629CD /* DetailViewController.m */, - 28042007108E984D000629CD /* RootViewController.h */, - 28042008108E984D000629CD /* RootViewController.m */, - 1D3623240D0F684500981E51 /* SVGPadAppDelegate.h */, - 1D3623250D0F684500981E51 /* SVGPadAppDelegate.m */, - ); - name = Controllers; - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* SVGPad.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 66436E5014A0BCEF001CC769 /* calayer-exporter */, - 080E96DDFE201D6D7F000001 /* Controllers */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 29B97316FDCFA39411CA2CEA /* main.m */, - 28A0AAE50D9B0CCF005BE974 /* SVGPad_Prefix.pch */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 3BF5041A148C63F500CC7D17 /* Samples */, - 8D1107310486CEB800E47090 /* SVGPad-Info.plist */, - 28AD735F0D9D9599002E5188 /* MainWindow.xib */, - 2804203B108E9BAB000629CD /* DetailView.xib */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3BF503BB148C62A800CC7D17 /* SVGKit */, - 3BC23F061488686900FC74CE /* libxml2.dylib */, - C94B6C5C1274BBFC00B456EB /* QuartzCore.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 3BF503BB148C62A800CC7D17 /* SVGKit */ = { - isa = PBXGroup; - children = ( - 3BF503C0148C62D900CC7D17 /* Core */, - 3BF503F0148C62D900CC7D17 /* iOS */, - ); - name = SVGKit; - sourceTree = ""; - }; - 3BF503C0148C62D900CC7D17 /* Core */ = { - isa = PBXGroup; - children = ( - 66853A7F160E561B00FE256C /* CGPathAdditions.h */, - 66853A80160E561B00FE256C /* CGPathAdditions.m */, - 66853A81160E561B00FE256C /* SVGKImage.h */, - 66853A82160E561B00FE256C /* SVGKImage.m */, - 66853A83160E561B00FE256C /* SVGKImage+SVGPathView.h */, - 66853A84160E561B00FE256C /* SVGKImage+SVGPathView.m */, - 66853A85160E561B00FE256C /* SVGKit.h */, - 66853A86160E561B00FE256C /* SVGKParser.h */, - 66853A87160E561B00FE256C /* SVGKParser.m */, - 66853A88160E561B00FE256C /* SVGKPattern.h */, - 66853A89160E561B00FE256C /* SVGKPattern.m */, - 66853A8A160E561B00FE256C /* SVGKSource.h */, - 66853A8B160E561B00FE256C /* SVGKSource.m */, - 66853A8C160E561B00FE256C /* SVGKView.h */, - 66853A8D160E561B00FE256C /* SVGKView.m */, - 66853A8E160E561C00FE256C /* SVGUtils.h */, - 66853A8F160E561C00FE256C /* SVGUtils.m */, - 669471441574221200EA533D /* DOM classes */, - 669471891574221200EA533D /* Parsing */, - ); - name = Core; - path = ../../Core; - sourceTree = ""; - }; - 3BF503F0148C62D900CC7D17 /* iOS */ = { - isa = PBXGroup; - children = ( - 66853B11160E568200FE256C /* CALayerWithChildHitTest.h */, - 66853B12160E568200FE256C /* CALayerWithChildHitTest.m */, - 66853B13160E568200FE256C /* CAShapeLayerWithHitTest.h */, - 66853B14160E568200FE256C /* CAShapeLayerWithHitTest.m */, - 66853B15160E568200FE256C /* SVGPathView.h */, - 66853B16160E568200FE256C /* SVGPathView.m */, - ); - name = iOS; - path = ../../iOS; - sourceTree = ""; - }; - 3BF5041A148C63F500CC7D17 /* Samples */ = { - isa = PBXGroup; - children = ( - 66BBD7451502A4EE00102FEF /* Europe_states_reduced.svg */, - 66BBD74215028F0A00102FEF /* australia_states_blank.svg */, - 663DEFEE14BFDAC100C56E07 /* uk-only.svg */, - 663DEFEB14BFD6BC00C56E07 /* Location_European_nation_states.svg */, - 6680A6D2149E4F0B00F2113F /* Blank_Map-Africa.svg */, - 3BF5041B148C63F500CC7D17 /* CurvedDiamond.svg */, - 3BF5041C148C63F500CC7D17 /* Lion.svg */, - 3BF5041D148C63F500CC7D17 /* Map.svg */, - 3BF5041E148C63F500CC7D17 /* Monkey.svg */, - 3BF5041F148C63F500CC7D17 /* Note.svg */, - 3BF50420148C63F500CC7D17 /* test-wave-1.svg */, - 3BF50421148C63F500CC7D17 /* Text.svg */, - 6680A6D4149E4F3900F2113F /* Sample Licenses.txt */, - ); - name = Samples; - path = ../../Samples; - sourceTree = ""; - }; - 66436E5014A0BCEF001CC769 /* calayer-exporter */ = { - isa = PBXGroup; - children = ( - 66436E5114A0BCEF001CC769 /* CALayerExporter.h */, - 66436E5214A0BCEF001CC769 /* CALayerExporter.m */, - ); - name = "calayer-exporter"; - path = "../../calayer-exporter"; - sourceTree = ""; - }; - 669471441574221200EA533D /* DOM classes */ = { - isa = PBXGroup; - children = ( - 66853ADF160E567300FE256C /* SVGCircleElement.h */, - 66853AE0160E567300FE256C /* SVGCircleElement.m */, - 66853AE1160E567300FE256C /* SVGDefsElement.h */, - 66853AE2160E567300FE256C /* SVGDefsElement.m */, - 66853AE3160E567300FE256C /* SVGDescriptionElement.h */, - 66853AE4160E567300FE256C /* SVGDescriptionElement.m */, - 66853AE5160E567300FE256C /* SVGElement_ForParser.h */, - 66853AE6160E567300FE256C /* SVGElement.h */, - 66853AE7160E567300FE256C /* SVGElement.m */, - 66853AE8160E567300FE256C /* SVGEllipseElement.h */, - 66853AE9160E567300FE256C /* SVGEllipseElement.m */, - 66853AEA160E567300FE256C /* SVGGroupElement.h */, - 66853AEB160E567300FE256C /* SVGGroupElement.m */, - 66853AEC160E567300FE256C /* SVGImageElement.h */, - 66853AED160E567300FE256C /* SVGImageElement.m */, - 66853AEE160E567300FE256C /* SVGLayeredElement.h */, - 66853AEF160E567300FE256C /* SVGLineElement.h */, - 66853AF0160E567300FE256C /* SVGLineElement.m */, - 66853AF1160E567300FE256C /* SVGPathElement.h */, - 66853AF2160E567300FE256C /* SVGPathElement.m */, - 66853AF3160E567300FE256C /* SVGPolygonElement.h */, - 66853AF4160E567300FE256C /* SVGPolygonElement.m */, - 66853AF5160E567300FE256C /* SVGPolylineElement.h */, - 66853AF6160E567300FE256C /* SVGPolylineElement.m */, - 66853AF7160E567300FE256C /* SVGRectElement.h */, - 66853AF8160E567300FE256C /* SVGRectElement.m */, - 66853AF9160E567300FE256C /* SVGShapeElement.h */, - 66853AFA160E567300FE256C /* SVGShapeElement.m */, - 66853AFB160E567300FE256C /* SVGSVGElement.h */, - 66853AFC160E567300FE256C /* SVGSVGElement.m */, - 66853AFD160E567300FE256C /* SVGTextElement.h */, - 66853AFE160E567300FE256C /* SVGTextElement.m */, - 66853AFF160E567300FE256C /* SVGTitleElement.h */, - 66853B00160E567300FE256C /* SVGTitleElement.m */, - 669471451574221200EA533D /* Core DOM */, - 669471661574221200EA533D /* SVG-DOM */, - ); - path = "DOM classes"; - sourceTree = ""; - }; - 669471451574221200EA533D /* Core DOM */ = { - isa = PBXGroup; - children = ( - 66853A98160E565900FE256C /* AppleSucksDOMImplementation.h */, - 66853A99160E565900FE256C /* AppleSucksDOMImplementation.m */, - 66853A9A160E565900FE256C /* Attr.h */, - 66853A9B160E565900FE256C /* Attr.m */, - 66853A9C160E565900FE256C /* CDATASection.h */, - 66853A9D160E565900FE256C /* CDATASection.m */, - 66853A9E160E565900FE256C /* CharacterData.h */, - 66853A9F160E565900FE256C /* CharacterData.m */, - 66853AA0160E565900FE256C /* Comment.h */, - 66853AA1160E565900FE256C /* Comment.m */, - 66853AA2160E565900FE256C /* Document.h */, - 66853AA3160E565900FE256C /* Document.m */, - 66853AA4160E565900FE256C /* Document+Mutable.h */, - 66853AA5160E565900FE256C /* DocumentFragment.h */, - 66853AA6160E565900FE256C /* DocumentFragment.m */, - 66853AA7160E565900FE256C /* DocumentType.h */, - 66853AA8160E565900FE256C /* DocumentType.m */, - 66853AA9160E565900FE256C /* Element.h */, - 66853AAA160E565900FE256C /* Element.m */, - 66853AAB160E565900FE256C /* EntityReference.h */, - 66853AAC160E565900FE256C /* EntityReference.m */, - 66853AAD160E565900FE256C /* NamedNodeMap.h */, - 66853AAE160E565900FE256C /* NamedNodeMap.m */, - 66853AAF160E565900FE256C /* Node.h */, - 66853AB0160E565900FE256C /* Node.m */, - 66853AB1160E565900FE256C /* Node+Mutable.h */, - 66853AB2160E565900FE256C /* NodeList.h */, - 66853AB3160E565900FE256C /* NodeList.m */, - 66853AB4160E565900FE256C /* NodeList+Mutable.h */, - 66853AB5160E565900FE256C /* ProcessingInstruction.h */, - 66853AB6160E565900FE256C /* ProcessingInstruction.m */, - 66853AB7160E565900FE256C /* Text.h */, - 66853AB8160E565900FE256C /* Text.m */, - ); - path = "Core DOM"; - sourceTree = ""; - }; - 669471661574221200EA533D /* SVG-DOM */ = { - isa = PBXGroup; - children = ( - 66853AC8160E566500FE256C /* SVGAngle.h */, - 66853AC9160E566500FE256C /* SVGAngle.m */, - 66853ACA160E566500FE256C /* SVGDocument_Mutable.h */, - 66853ACB160E566500FE256C /* SVGDocument.h */, - 66853ACC160E566500FE256C /* SVGDocument.m */, - 66853ACD160E566500FE256C /* SVGLength.h */, - 66853ACE160E566500FE256C /* SVGLength.m */, - 66853ACF160E566500FE256C /* SVGMatrix.h */, - 66853AD0160E566500FE256C /* SVGMatrix.m */, - 66853AD1160E566500FE256C /* SVGNumber.h */, - 66853AD2160E566500FE256C /* SVGPoint.h */, - 66853AD3160E566500FE256C /* SVGPoint.m */, - 66853AD4160E566500FE256C /* SVGRect.h */, - 66853AD5160E566500FE256C /* SVGSVGElement_Mutable.h */, - 66853AD6160E566500FE256C /* SVGTransform.h */, - 66853AD7160E566500FE256C /* SVGTransform.m */, - 66853AD8160E566500FE256C /* SVGViewSpec.h */, - ); - path = "SVG-DOM"; - sourceTree = ""; - }; - 669471891574221200EA533D /* Parsing */ = { - isa = PBXGroup; - children = ( - 66853B1A160E569A00FE256C /* SVGKParseResult.h */, - 66853B1B160E569A00FE256C /* SVGKParseResult.m */, - 66853B1C160E569A00FE256C /* SVGKParserExtension.h */, - 66853B1D160E569A00FE256C /* SVGKParserPatternsAndGradients.h */, - 66853B1E160E569A00FE256C /* SVGKParserPatternsAndGradients.m */, - 66853B1F160E569A00FE256C /* SVGKParserSVG.h */, - 66853B20160E569A00FE256C /* SVGKParserSVG.m */, - 66853B21160E569A00FE256C /* SVGKPointsAndPathsParser.h */, - 66853B22160E569A00FE256C /* SVGKPointsAndPathsParser.m */, - ); - path = Parsing; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* SVGPad */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SVGPad" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SVGPad; - productName = SVGPad; - productReference = 1D6058910D05DD3D006BFB54 /* SVGPad.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0430; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SVGPad" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* SVGPad */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, - 2804203C108E9BAB000629CD /* DetailView.xib in Resources */, - 3BF50422148C63F500CC7D17 /* CurvedDiamond.svg in Resources */, - 3BF50423148C63F500CC7D17 /* Lion.svg in Resources */, - 3BF50424148C63F500CC7D17 /* Map.svg in Resources */, - 3BF50425148C63F500CC7D17 /* Monkey.svg in Resources */, - 3BF50426148C63F500CC7D17 /* Note.svg in Resources */, - 3BF50427148C63F500CC7D17 /* test-wave-1.svg in Resources */, - 3BF50428148C63F500CC7D17 /* Text.svg in Resources */, - 6680A6D3149E4F0B00F2113F /* Blank_Map-Africa.svg in Resources */, - 6680A6D5149E4F3900F2113F /* Sample Licenses.txt in Resources */, - 663DEFEC14BFD6BC00C56E07 /* Location_European_nation_states.svg in Resources */, - 663DEFEF14BFDAC100C56E07 /* uk-only.svg in Resources */, - 66BBD74315028F0A00102FEF /* australia_states_blank.svg in Resources */, - 66BBD7461502A4EE00102FEF /* Europe_states_reduced.svg in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 662D1A2215B36C800027D07B /* RootViewController.m in Sources */, - 662D1A2315B36C830027D07B /* SVGPadAppDelegate.m in Sources */, - 662D1A2415B36C890027D07B /* DetailViewController.m in Sources */, - 662D1A2515B36C9C0027D07B /* CALayerExporter.m in Sources */, - 66853A90160E561C00FE256C /* CGPathAdditions.m in Sources */, - 66853A91160E561C00FE256C /* SVGKImage.m in Sources */, - 66853A92160E561C00FE256C /* SVGKImage+SVGPathView.m in Sources */, - 66853A93160E561C00FE256C /* SVGKParser.m in Sources */, - 66853A94160E561C00FE256C /* SVGKPattern.m in Sources */, - 66853A95160E561C00FE256C /* SVGKSource.m in Sources */, - 66853A96160E561C00FE256C /* SVGKView.m in Sources */, - 66853A97160E561C00FE256C /* SVGUtils.m in Sources */, - 66853AB9160E565900FE256C /* AppleSucksDOMImplementation.m in Sources */, - 66853ABA160E565900FE256C /* Attr.m in Sources */, - 66853ABB160E565900FE256C /* CDATASection.m in Sources */, - 66853ABC160E565900FE256C /* CharacterData.m in Sources */, - 66853ABD160E565900FE256C /* Comment.m in Sources */, - 66853ABE160E565900FE256C /* Document.m in Sources */, - 66853ABF160E565900FE256C /* DocumentFragment.m in Sources */, - 66853AC0160E565900FE256C /* DocumentType.m in Sources */, - 66853AC1160E565900FE256C /* Element.m in Sources */, - 66853AC2160E565900FE256C /* EntityReference.m in Sources */, - 66853AC3160E565900FE256C /* NamedNodeMap.m in Sources */, - 66853AC4160E565900FE256C /* Node.m in Sources */, - 66853AC5160E565900FE256C /* NodeList.m in Sources */, - 66853AC6160E565900FE256C /* ProcessingInstruction.m in Sources */, - 66853AC7160E565900FE256C /* Text.m in Sources */, - 66853AD9160E566500FE256C /* SVGAngle.m in Sources */, - 66853ADA160E566500FE256C /* SVGDocument.m in Sources */, - 66853ADB160E566500FE256C /* SVGLength.m in Sources */, - 66853ADC160E566500FE256C /* SVGMatrix.m in Sources */, - 66853ADD160E566500FE256C /* SVGPoint.m in Sources */, - 66853ADE160E566500FE256C /* SVGTransform.m in Sources */, - 66853B01160E567300FE256C /* SVGCircleElement.m in Sources */, - 66853B02160E567300FE256C /* SVGDefsElement.m in Sources */, - 66853B03160E567300FE256C /* SVGDescriptionElement.m in Sources */, - 66853B04160E567300FE256C /* SVGElement.m in Sources */, - 66853B05160E567300FE256C /* SVGEllipseElement.m in Sources */, - 66853B06160E567300FE256C /* SVGGroupElement.m in Sources */, - 66853B07160E567300FE256C /* SVGImageElement.m in Sources */, - 66853B08160E567300FE256C /* SVGLineElement.m in Sources */, - 66853B09160E567300FE256C /* SVGPathElement.m in Sources */, - 66853B0A160E567300FE256C /* SVGPolygonElement.m in Sources */, - 66853B0B160E567300FE256C /* SVGPolylineElement.m in Sources */, - 66853B0C160E567300FE256C /* SVGRectElement.m in Sources */, - 66853B0D160E567300FE256C /* SVGShapeElement.m in Sources */, - 66853B0E160E567300FE256C /* SVGSVGElement.m in Sources */, - 66853B0F160E567300FE256C /* SVGTextElement.m in Sources */, - 66853B10160E567300FE256C /* SVGTitleElement.m in Sources */, - 66853B17160E568200FE256C /* CALayerWithChildHitTest.m in Sources */, - 66853B18160E568200FE256C /* CAShapeLayerWithHitTest.m in Sources */, - 66853B19160E568200FE256C /* SVGPathView.m in Sources */, - 66853B23160E569A00FE256C /* SVGKParseResult.m in Sources */, - 66853B24160E569A00FE256C /* SVGKParserPatternsAndGradients.m in Sources */, - 66853B25160E569A00FE256C /* SVGKParserSVG.m in Sources */, - 66853B26160E569A00FE256C /* SVGKPointsAndPathsParser.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = SVGPad_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - INFOPLIST_FILE = "SVGPad-Info.plist"; - PRODUCT_NAME = SVGPad; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = SVGPad_Prefix.pch; - HEADER_SEARCH_PATHS = /usr/include/libxml2; - INFOPLIST_FILE = "SVGPad-Info.plist"; - PRODUCT_NAME = SVGPad; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SVGPad" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SVGPad" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/XCodeProjects/SVGPadDemo/SVGPad_Prefix.pch b/XCodeProjects/SVGPadDemo/SVGPad_Prefix.pch deleted file mode 100644 index d6eb0699b..000000000 --- a/XCodeProjects/SVGPadDemo/SVGPad_Prefix.pch +++ /dev/null @@ -1,17 +0,0 @@ -// -// Prefix header for all source files of the 'SVGPad' target in the 'SVGPad' project -// - -#import - -#ifndef __IPHONE_3_2 -#warning "This project uses features only available in iPhone SDK 3.2 and later." -#endif - -#define OUTLINE_SHAPES 1 - -#ifdef __OBJC__ - #import - #import - #import "SVGKit.h" -#endif diff --git a/XCodeProjects/SVGPadDemo/main.m b/XCodeProjects/SVGPadDemo/main.m deleted file mode 100644 index 8f84c1dab..000000000 --- a/XCodeProjects/SVGPadDemo/main.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// main.m -// SVGPad -// -// Copyright Matt Rajca 2010. All rights reserved. -// - -int main (int argc, char *argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - - return retVal; -} diff --git a/XCodeProjects/SVGTesterDemo/Classes/ComparisonView.h b/XCodeProjects/SVGTesterDemo/Classes/ComparisonView.h deleted file mode 100644 index 9a0d44716..000000000 --- a/XCodeProjects/SVGTesterDemo/Classes/ComparisonView.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ComparisonView.h -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -@interface ComparisonView : NSView { - @private - NSBitmapImageRep *_original; - NSBitmapImageRep *_output; -} - -- (void)compareImage:(NSBitmapImageRep *)image withOriginal:(NSBitmapImageRep *)original; - -@end diff --git a/XCodeProjects/SVGTesterDemo/Classes/ComparisonView.m b/XCodeProjects/SVGTesterDemo/Classes/ComparisonView.m deleted file mode 100644 index d7b4ec1e2..000000000 --- a/XCodeProjects/SVGTesterDemo/Classes/ComparisonView.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// ComparisonView.m -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -#import "ComparisonView.h" - -@implementation ComparisonView - -- (void)compareImage:(NSBitmapImageRep *)image withOriginal:(NSBitmapImageRep *)original { - if (!NSEqualSizes([image size], [original size])) { - NSLog(@"Invalid image sizes"); - return; - } - - _original = [image retain]; - - _output = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL - pixelsWide:image.size.width - pixelsHigh:image.size.height - bitsPerSample:8 - samplesPerPixel:3 - hasAlpha:NO - isPlanar:NO - colorSpaceName:NSCalibratedRGBColorSpace - bytesPerRow:4 * image.size.width - bitsPerPixel:32]; - - for (NSUInteger x = 0; x < image.size.width; x++) { - for (NSUInteger y = 0; y < image.size.height; y++) { - NSUInteger comps[3]; - [image getPixel:comps atX:x y:y]; - - NSUInteger compsTwo[3]; - [original getPixel:compsTwo atX:x y:y]; - - if (comps[0] == compsTwo[0] && comps[1] == compsTwo[1] && comps[2] == compsTwo[2]) { - [_output setColor:[NSColor greenColor] atX:x y:y]; - } - else { - [_output setColor:[NSColor redColor] atX:x y:y]; - } - } - } - - [self setNeedsDisplay:YES]; -} - -- (void)drawRect:(NSRect)dirtyRect { - if (!_output) - return; - - NSSize size = _original.size; - - NSPoint origin = NSMakePoint((int) (self.bounds.size.width - size.width) / 2, - (int) (self.bounds.size.height - size.height) / 2); - - [_original drawAtPoint:origin]; - - [_output drawInRect:NSMakeRect(origin.x, origin.y, size.width, size.height) - fromRect:NSZeroRect - operation:NSCompositeSourceOver - fraction:0.4f - respectFlipped:NO - hints:nil]; -} - -@end diff --git a/XCodeProjects/SVGTesterDemo/Classes/MainWindowController.h b/XCodeProjects/SVGTesterDemo/Classes/MainWindowController.h deleted file mode 100644 index 5930d3a1b..000000000 --- a/XCodeProjects/SVGTesterDemo/Classes/MainWindowController.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// MainWindowController.h -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -#import -#import "ComparisonView.h" - -@interface MainWindowController : NSWindowController { - @private - NSArray *_names; - NSUInteger _currentIndex; -} - -@property (nonatomic, retain) IBOutlet ComparisonView *view; - -- (IBAction)next:(id)sender; - -@end diff --git a/XCodeProjects/SVGTesterDemo/Classes/MainWindowController.m b/XCodeProjects/SVGTesterDemo/Classes/MainWindowController.m deleted file mode 100644 index 7695eb85f..000000000 --- a/XCodeProjects/SVGTesterDemo/Classes/MainWindowController.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// MainWindowController.m -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -#import "MainWindowController.h" - -@implementation MainWindowController - -@synthesize view = _view; - -- (id)init { - self = [super initWithWindowNibName:@"MainWindow"]; - if (self) { - _names = [NSArray arrayWithObjects:@"Monkey.svg", @"Note.svg", nil]; - _currentIndex = 0; - } - return self; -} - -- (IBAction)next:(id)sender { - NSString *name = [_names objectAtIndex:_currentIndex]; - - SVGDocument *document = [SVGDocument documentNamed:name]; - - NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL - pixelsWide:document.width - pixelsHigh:document.height - bitsPerSample:8 - samplesPerPixel:3 - hasAlpha:NO - isPlanar:NO - colorSpaceName:NSCalibratedRGBColorSpace - bytesPerRow:4 * document.width - bitsPerPixel:32]; - - CGContextRef context = [[NSGraphicsContext graphicsContextWithBitmapImageRep:rep] graphicsPort]; - - CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 1.0f); // white background - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, document.width, document.height)); - - CGContextScaleCTM(context, 1.0f, -1.0f); // flip - CGContextTranslateCTM(context, 0.0f, -document.height); - - [[document layerTree] renderInContext:context]; - - CGImageRef image = CGBitmapContextCreateImage(context); - - NSBitmapImageRep *rendering = [[NSBitmapImageRep alloc] initWithCGImage:image]; - CGImageRelease(image); - - NSString *imageName = [name stringByReplacingOccurrencesOfString:@"svg" withString:@"png"]; - NSString *file = [[NSBundle mainBundle] pathForImageResource:imageName]; - - NSData *data = [NSData dataWithContentsOfFile:file]; - NSBitmapImageRep *original = [[NSBitmapImageRep alloc] initWithData:data]; - - [_view compareImage:rendering withOriginal:original]; - - if (_currentIndex == [_names count] - 1) { - [sender setEnabled:NO]; - } - - _currentIndex++; -} - -- (void)windowDidLoad { - [super windowDidLoad]; - [self next:nil]; -} - -@end diff --git a/XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.h b/XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.h deleted file mode 100644 index 1842e1552..000000000 --- a/XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// SVGTesterAppDelegate.h -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -@class MainWindowController; - -@interface SVGTesterAppDelegate : NSObject < NSApplicationDelegate > { - @private - MainWindowController *_controller; -} - -@end diff --git a/XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.m b/XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.m deleted file mode 100644 index efa4cef12..000000000 --- a/XCodeProjects/SVGTesterDemo/Classes/SVGTesterAppDelegate.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// SVGTesterAppDelegate.m -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -#import "SVGTesterAppDelegate.h" - -#import "MainWindowController.h" - -@implementation SVGTesterAppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - if (!_controller) { - _controller = [[MainWindowController alloc] init]; - } - - [_controller showWindow:self]; -} - -@end diff --git a/XCodeProjects/SVGTesterDemo/SVGTester-Info.plist b/XCodeProjects/SVGTesterDemo/SVGTester-Info.plist deleted file mode 100644 index dfbe30bc1..000000000 --- a/XCodeProjects/SVGTesterDemo/SVGTester-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.MattRajca.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/XCodeProjects/SVGTesterDemo/SVGTester-Prefix.pch b/XCodeProjects/SVGTesterDemo/SVGTester-Prefix.pch deleted file mode 100644 index a6ba44c68..000000000 --- a/XCodeProjects/SVGTesterDemo/SVGTester-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'SVGTester' target in the 'SVGTester' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/XCodeProjects/SVGTesterDemo/SVGTester.xcodeproj/project.pbxproj b/XCodeProjects/SVGTesterDemo/SVGTester.xcodeproj/project.pbxproj deleted file mode 100644 index 66e9a6140..000000000 --- a/XCodeProjects/SVGTesterDemo/SVGTester.xcodeproj/project.pbxproj +++ /dev/null @@ -1,429 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 3B86B3CD148C661C0082ACCF /* SVGKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B86B3CA148C66030082ACCF /* SVGKit.framework */; }; - 3B86B3D7148C66AE0082ACCF /* CurvedDiamond.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D0148C66AE0082ACCF /* CurvedDiamond.svg */; }; - 3B86B3D8148C66AE0082ACCF /* Lion.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D1148C66AE0082ACCF /* Lion.svg */; }; - 3B86B3D9148C66AE0082ACCF /* Map.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D2148C66AE0082ACCF /* Map.svg */; }; - 3B86B3DA148C66AE0082ACCF /* Monkey.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D3148C66AE0082ACCF /* Monkey.svg */; }; - 3B86B3DB148C66AE0082ACCF /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D4148C66AE0082ACCF /* Note.svg */; }; - 3B86B3DC148C66AE0082ACCF /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D5148C66AE0082ACCF /* test-wave-1.svg */; }; - 3B86B3DD148C66AE0082ACCF /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3D6148C66AE0082ACCF /* Text.svg */; }; - 3B86B3E1148C66B50082ACCF /* Monkey.png in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3DF148C66B50082ACCF /* Monkey.png */; }; - 3B86B3E2148C66B50082ACCF /* Note.png in Resources */ = {isa = PBXBuildFile; fileRef = 3B86B3E0148C66B50082ACCF /* Note.png */; }; - C9A1718013477A440048E122 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9A1717F13477A440048E122 /* Cocoa.framework */; }; - C9FC228F1347924600A91703 /* ComparisonView.m in Sources */ = {isa = PBXBuildFile; fileRef = C9FC228A1347924600A91703 /* ComparisonView.m */; }; - C9FC22901347924600A91703 /* MainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C9FC228C1347924600A91703 /* MainWindowController.m */; }; - C9FC22911347924600A91703 /* SVGTesterAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C9FC228E1347924600A91703 /* SVGTesterAppDelegate.m */; }; - C9FC22971347928C00A91703 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C9FC22931347928C00A91703 /* MainMenu.xib */; }; - C9FC22981347928C00A91703 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C9FC22951347928C00A91703 /* MainWindow.xib */; }; - C9FC229D134792A800A91703 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C9FC229A134792A800A91703 /* main.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 3B86B3C9148C66030082ACCF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3B86B3C1148C66030082ACCF /* SVGKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 8DC2EF5B0486A6940098B216; - remoteInfo = SVGKit; - }; - 3B86B3CB148C66030082ACCF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 3B86B3C1148C66030082ACCF /* SVGKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 66213432148AF2CF006881E1; - remoteInfo = SVGKitLibrary; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - C9A171BB13477B6A0048E122 /* Copy Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 3B86B3C1148C66030082ACCF /* SVGKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SVGKit.xcodeproj; path = ../SVGKit/SVGKit.xcodeproj; sourceTree = ""; }; - 3B86B3D0148C66AE0082ACCF /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; - 3B86B3D1148C66AE0082ACCF /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; - 3B86B3D2148C66AE0082ACCF /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; - 3B86B3D3148C66AE0082ACCF /* Monkey.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Monkey.svg; sourceTree = ""; }; - 3B86B3D4148C66AE0082ACCF /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; - 3B86B3D5148C66AE0082ACCF /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; - 3B86B3D6148C66AE0082ACCF /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; - 3B86B3DF148C66B50082ACCF /* Monkey.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Monkey.png; sourceTree = ""; }; - 3B86B3E0148C66B50082ACCF /* Note.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Note.png; sourceTree = ""; }; - C9A1717B13477A440048E122 /* SVGTester.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SVGTester.app; sourceTree = BUILT_PRODUCTS_DIR; }; - C9A1717F13477A440048E122 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - C9A1718213477A440048E122 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - C9A1718313477A440048E122 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - C9A1718413477A440048E122 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - C9FC22891347924600A91703 /* ComparisonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComparisonView.h; sourceTree = ""; }; - C9FC228A1347924600A91703 /* ComparisonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ComparisonView.m; sourceTree = ""; }; - C9FC228B1347924600A91703 /* MainWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainWindowController.h; sourceTree = ""; }; - C9FC228C1347924600A91703 /* MainWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainWindowController.m; sourceTree = ""; }; - C9FC228D1347924600A91703 /* SVGTesterAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTesterAppDelegate.h; sourceTree = ""; }; - C9FC228E1347924600A91703 /* SVGTesterAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTesterAppDelegate.m; sourceTree = ""; }; - C9FC22941347928C00A91703 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - C9FC22961347928C00A91703 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - C9FC229A134792A800A91703 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - C9FC229B134792A800A91703 /* SVGTester-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SVGTester-Info.plist"; sourceTree = ""; }; - C9FC229C134792A800A91703 /* SVGTester-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGTester-Prefix.pch"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - C9A1717813477A440048E122 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3B86B3CD148C661C0082ACCF /* SVGKit.framework in Frameworks */, - C9A1718013477A440048E122 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 3B86B3C2148C66030082ACCF /* Products */ = { - isa = PBXGroup; - children = ( - 3B86B3CA148C66030082ACCF /* SVGKit.framework */, - 3B86B3CC148C66030082ACCF /* libSVGKitLibrary.a */, - ); - name = Products; - sourceTree = ""; - }; - 3B86B3CF148C66AE0082ACCF /* Samples */ = { - isa = PBXGroup; - children = ( - 3B86B3D0148C66AE0082ACCF /* CurvedDiamond.svg */, - 3B86B3D1148C66AE0082ACCF /* Lion.svg */, - 3B86B3D2148C66AE0082ACCF /* Map.svg */, - 3B86B3D3148C66AE0082ACCF /* Monkey.svg */, - 3B86B3D4148C66AE0082ACCF /* Note.svg */, - 3B86B3D5148C66AE0082ACCF /* test-wave-1.svg */, - 3B86B3D6148C66AE0082ACCF /* Text.svg */, - ); - name = Samples; - path = ../../Samples; - sourceTree = ""; - }; - 3B86B3DE148C66B50082ACCF /* RenderedSamples */ = { - isa = PBXGroup; - children = ( - 3B86B3DF148C66B50082ACCF /* Monkey.png */, - 3B86B3E0148C66B50082ACCF /* Note.png */, - ); - name = RenderedSamples; - path = ../../RenderedSamples; - sourceTree = ""; - }; - C9A1717013477A440048E122 = { - isa = PBXGroup; - children = ( - 3B86B3C1148C66030082ACCF /* SVGKit.xcodeproj */, - C9FC22881347924600A91703 /* Classes */, - C9FC22921347926E00A91703 /* Resources */, - C9FC22991347929600A91703 /* Support Files */, - C9A1717E13477A440048E122 /* Frameworks */, - C9A1717C13477A440048E122 /* Products */, - ); - sourceTree = ""; - }; - C9A1717C13477A440048E122 /* Products */ = { - isa = PBXGroup; - children = ( - C9A1717B13477A440048E122 /* SVGTester.app */, - ); - name = Products; - sourceTree = ""; - }; - C9A1717E13477A440048E122 /* Frameworks */ = { - isa = PBXGroup; - children = ( - C9A1717F13477A440048E122 /* Cocoa.framework */, - C9A1718113477A440048E122 /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - C9A1718113477A440048E122 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - C9A1718213477A440048E122 /* AppKit.framework */, - C9A1718313477A440048E122 /* CoreData.framework */, - C9A1718413477A440048E122 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - C9FC22881347924600A91703 /* Classes */ = { - isa = PBXGroup; - children = ( - C9FC22891347924600A91703 /* ComparisonView.h */, - C9FC228A1347924600A91703 /* ComparisonView.m */, - C9FC228B1347924600A91703 /* MainWindowController.h */, - C9FC228C1347924600A91703 /* MainWindowController.m */, - C9FC228D1347924600A91703 /* SVGTesterAppDelegate.h */, - C9FC228E1347924600A91703 /* SVGTesterAppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - C9FC22921347926E00A91703 /* Resources */ = { - isa = PBXGroup; - children = ( - 3B86B3DE148C66B50082ACCF /* RenderedSamples */, - 3B86B3CF148C66AE0082ACCF /* Samples */, - C9FC22931347928C00A91703 /* MainMenu.xib */, - C9FC22951347928C00A91703 /* MainWindow.xib */, - ); - name = Resources; - sourceTree = ""; - }; - C9FC22991347929600A91703 /* Support Files */ = { - isa = PBXGroup; - children = ( - C9FC229A134792A800A91703 /* main.m */, - C9FC229B134792A800A91703 /* SVGTester-Info.plist */, - C9FC229C134792A800A91703 /* SVGTester-Prefix.pch */, - ); - name = "Support Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C9A1717A13477A440048E122 /* SVGTester */ = { - isa = PBXNativeTarget; - buildConfigurationList = C9A1719913477A450048E122 /* Build configuration list for PBXNativeTarget "SVGTester" */; - buildPhases = ( - C9A1717713477A440048E122 /* Sources */, - C9A1717813477A440048E122 /* Frameworks */, - C9A1717913477A440048E122 /* Resources */, - C9A171BB13477B6A0048E122 /* Copy Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SVGTester; - productName = SVGTester; - productReference = C9A1717B13477A440048E122 /* SVGTester.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - C9A1717213477A440048E122 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - ORGANIZATIONNAME = "Matt Rajca"; - }; - buildConfigurationList = C9A1717513477A440048E122 /* Build configuration list for PBXProject "SVGTester" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = C9A1717013477A440048E122; - productRefGroup = C9A1717C13477A440048E122 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 3B86B3C2148C66030082ACCF /* Products */; - ProjectRef = 3B86B3C1148C66030082ACCF /* SVGKit.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - C9A1717A13477A440048E122 /* SVGTester */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 3B86B3CA148C66030082ACCF /* SVGKit.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SVGKit.framework; - remoteRef = 3B86B3C9148C66030082ACCF /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 3B86B3CC148C66030082ACCF /* libSVGKitLibrary.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libSVGKitLibrary.a; - remoteRef = 3B86B3CB148C66030082ACCF /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - C9A1717913477A440048E122 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C9FC22971347928C00A91703 /* MainMenu.xib in Resources */, - C9FC22981347928C00A91703 /* MainWindow.xib in Resources */, - 3B86B3D7148C66AE0082ACCF /* CurvedDiamond.svg in Resources */, - 3B86B3D8148C66AE0082ACCF /* Lion.svg in Resources */, - 3B86B3D9148C66AE0082ACCF /* Map.svg in Resources */, - 3B86B3DA148C66AE0082ACCF /* Monkey.svg in Resources */, - 3B86B3DB148C66AE0082ACCF /* Note.svg in Resources */, - 3B86B3DC148C66AE0082ACCF /* test-wave-1.svg in Resources */, - 3B86B3DD148C66AE0082ACCF /* Text.svg in Resources */, - 3B86B3E1148C66B50082ACCF /* Monkey.png in Resources */, - 3B86B3E2148C66B50082ACCF /* Note.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - C9A1717713477A440048E122 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C9FC228F1347924600A91703 /* ComparisonView.m in Sources */, - C9FC22901347924600A91703 /* MainWindowController.m in Sources */, - C9FC22911347924600A91703 /* SVGTesterAppDelegate.m in Sources */, - C9FC229D134792A800A91703 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - C9FC22931347928C00A91703 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - C9FC22941347928C00A91703 /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; - C9FC22951347928C00A91703 /* MainWindow.xib */ = { - isa = PBXVariantGroup; - children = ( - C9FC22961347928C00A91703 /* en */, - ); - name = MainWindow.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C9A1719713477A450048E122 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - C9A1719813477A450048E122 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - SDKROOT = macosx; - }; - name = Release; - }; - C9A1719A13477A450048E122 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_ENABLE_OBJC_GC = required; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SVGTester-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - ../../Core, - ../../Mac, - ); - INFOPLIST_FILE = "SVGTester-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C9A1719B13477A450048E122 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_ENABLE_OBJC_GC = required; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "SVGTester-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - ../../Core, - ../../Mac, - ); - INFOPLIST_FILE = "SVGTester-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C9A1717513477A440048E122 /* Build configuration list for PBXProject "SVGTester" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C9A1719713477A450048E122 /* Debug */, - C9A1719813477A450048E122 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C9A1719913477A450048E122 /* Build configuration list for PBXNativeTarget "SVGTester" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C9A1719A13477A450048E122 /* Debug */, - C9A1719B13477A450048E122 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = C9A1717213477A440048E122 /* Project object */; -} diff --git a/XCodeProjects/SVGTesterDemo/en.lproj/MainMenu.xib b/XCodeProjects/SVGTesterDemo/en.lproj/MainMenu.xib deleted file mode 100644 index dfaf42fe4..000000000 --- a/XCodeProjects/SVGTesterDemo/en.lproj/MainMenu.xib +++ /dev/null @@ -1,3292 +0,0 @@ - - - - 1060 - 11A419 - 1530 - 1115.2 - 549.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 1530 - - - YES - NSMenu - NSMenuItem - NSCustomObject - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - - - YES - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - YES - - - SVGTester - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - SVGTester - - YES - - - About SVGTester - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Services - - 1048576 - 2147483647 - - - submenuAction: - - Services - - YES - - _NSServicesMenu - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide SVGTester - h - 1048576 - 2147483647 - - - - - - Hide Others - h - 1572864 - 2147483647 - - - - - - Show All - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit SVGTester - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - File - - 1048576 - 2147483647 - - - submenuAction: - - File - - YES - - - Close - w - 1048576 - 2147483647 - - - - - - - - - Edit - - 1048576 - 2147483647 - - - submenuAction: - - Edit - - YES - - - Undo - z - 1048576 - 2147483647 - - - - - - Redo - Z - 1179648 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Cut - x - 1048576 - 2147483647 - - - - - - Copy - c - 1048576 - 2147483647 - - - - - - Paste - v - 1048576 - 2147483647 - - - - - - Paste and Match Style - V - 1572864 - 2147483647 - - - - - - Delete - - 1048576 - 2147483647 - - - - - - Select All - a - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Find - - 1048576 - 2147483647 - - - submenuAction: - - Find - - YES - - - Find… - f - 1048576 - 2147483647 - - - 1 - - - - Find Next - g - 1048576 - 2147483647 - - - 2 - - - - Find Previous - G - 1179648 - 2147483647 - - - 3 - - - - Use Selection for Find - e - 1048576 - 2147483647 - - - 7 - - - - Jump to Selection - j - 1048576 - 2147483647 - - - - - - - - - Spelling and Grammar - - 1048576 - 2147483647 - - - submenuAction: - - Spelling and Grammar - - YES - - - Show Spelling and Grammar - : - 1048576 - 2147483647 - - - - - - Check Document Now - ; - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Check Spelling While Typing - - 1048576 - 2147483647 - - - - - - Check Grammar With Spelling - - 1048576 - 2147483647 - - - - - - Correct Spelling Automatically - - 2147483647 - - - - - - - - - Substitutions - - 1048576 - 2147483647 - - - submenuAction: - - Substitutions - - YES - - - Show Substitutions - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Smart Copy/Paste - f - 1048576 - 2147483647 - - - 1 - - - - Smart Quotes - g - 1048576 - 2147483647 - - - 2 - - - - Smart Dashes - - 2147483647 - - - - - - Smart Links - G - 1179648 - 2147483647 - - - 3 - - - - Text Replacement - - 2147483647 - - - - - - - - - Transformations - - 2147483647 - - - submenuAction: - - Transformations - - YES - - - Make Upper Case - - 2147483647 - - - - - - Make Lower Case - - 2147483647 - - - - - - Capitalize - - 2147483647 - - - - - - - - - Speech - - 1048576 - 2147483647 - - - submenuAction: - - Speech - - YES - - - Start Speaking - - 1048576 - 2147483647 - - - - - - Stop Speaking - - 1048576 - 2147483647 - - - - - - - - - - - - Format - - 2147483647 - - - submenuAction: - - Format - - YES - - - Font - - 2147483647 - - - submenuAction: - - Font - - YES - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - YES - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - YES - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - YES - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - YES - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - - - - View - - 1048576 - 2147483647 - - - submenuAction: - - View - - YES - - - Show Toolbar - t - 1572864 - 2147483647 - - - - - - Customize Toolbar… - - 1048576 - 2147483647 - - - - - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - Window - - YES - - - Minimize - m - 1048576 - 2147483647 - - - - - - Zoom - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 2147483647 - - - submenuAction: - - Help - - YES - - - SVGTester Help - ? - 1048576 - 2147483647 - - - - - _NSHelpMenu - - - - _NSMainMenu - - - SVGTesterAppDelegate - - - NSFontManager - - - - - YES - - - performMiniaturize: - - - - 37 - - - - arrangeInFront: - - - - 39 - - - - orderFrontStandardAboutPanel: - - - - 142 - - - - performClose: - - - - 193 - - - - toggleContinuousSpellChecking: - - - - 222 - - - - undo: - - - - 223 - - - - copy: - - - - 224 - - - - checkSpelling: - - - - 225 - - - - paste: - - - - 226 - - - - stopSpeaking: - - - - 227 - - - - cut: - - - - 228 - - - - showGuessPanel: - - - - 230 - - - - redo: - - - - 231 - - - - selectAll: - - - - 232 - - - - startSpeaking: - - - - 233 - - - - delete: - - - - 235 - - - - performZoom: - - - - 240 - - - - performFindPanelAction: - - - - 241 - - - - centerSelectionInVisibleArea: - - - - 245 - - - - toggleGrammarChecking: - - - - 347 - - - - toggleSmartInsertDelete: - - - - 355 - - - - toggleAutomaticQuoteSubstitution: - - - - 356 - - - - toggleAutomaticLinkDetection: - - - - 357 - - - - runToolbarCustomizationPalette: - - - - 365 - - - - toggleToolbarShown: - - - - 366 - - - - hide: - - - - 367 - - - - hideOtherApplications: - - - - 368 - - - - unhideAllApplications: - - - - 370 - - - - addFontTrait: - - - - 421 - - - - addFontTrait: - - - - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 - - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - - - - terminate: - - - - 449 - - - - toggleAutomaticSpellingCorrection: - - - - 456 - - - - orderFrontSubstitutionsPanel: - - - - 458 - - - - toggleAutomaticDashSubstitution: - - - - 461 - - - - toggleAutomaticTextReplacement: - - - - 463 - - - - uppercaseWord: - - - - 464 - - - - capitalizeWord: - - - - 467 - - - - lowercaseWord: - - - - 468 - - - - pasteAsPlainText: - - - - 486 - - - - performFindPanelAction: - - - - 487 - - - - performFindPanelAction: - - - - 488 - - - - performFindPanelAction: - - - - 489 - - - - showHelp: - - - - 493 - - - - delegate - - - - 495 - - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - - - - - - - 19 - - - YES - - - - - - 56 - - - YES - - - - - - 217 - - - YES - - - - - - 83 - - - YES - - - - - - 81 - - - YES - - - - - - 73 - - - - - 205 - - - YES - - - - - - - - - - - - - - - - - - - - 202 - - - - - 198 - - - - - 207 - - - - - 214 - - - - - 199 - - - - - 203 - - - - - 197 - - - - - 206 - - - - - 215 - - - - - 218 - - - YES - - - - - - 216 - - - YES - - - - - - 200 - - - YES - - - - - - - - - - - 219 - - - - - 201 - - - - - 204 - - - - - 220 - - - YES - - - - - - - - - - 213 - - - - - 210 - - - - - 221 - - - - - 208 - - - - - 209 - - - - - 57 - - - YES - - - - - - - - - - - - - - 58 - - - - - 134 - - - - - 150 - - - - - 136 - - - - - 144 - - - - - 236 - - - - - 131 - - - YES - - - - - - 149 - - - - - 145 - - - - - 130 - - - - - 24 - - - YES - - - - - - - - - 92 - - - - - 5 - - - - - 239 - - - - - 23 - - - - - 295 - - - YES - - - - - - 296 - - - YES - - - - - - - 297 - - - - - 298 - - - - - 211 - - - YES - - - - - - 212 - - - YES - - - - - - - 195 - - - - - 196 - - - - - 346 - - - - - 348 - - - YES - - - - - - 349 - - - YES - - - - - - - - - - - - 350 - - - - - 351 - - - - - 354 - - - - - 375 - - - YES - - - - - - 376 - - - YES - - - - - - - 377 - - - YES - - - - - - 388 - - - YES - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - YES - - - - - - 398 - - - YES - - - - - - 399 - - - YES - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - YES - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - YES - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - YES - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - - - 420 - - - - - 450 - - - YES - - - - - - 451 - - - YES - - - - - - - - 452 - - - - - 453 - - - - - 454 - - - - - 457 - - - - - 459 - - - - - 460 - - - - - 462 - - - - - 465 - - - - - 466 - - - - - 485 - - - - - 490 - - - YES - - - - - - 491 - - - YES - - - - - - 492 - - - - - 494 - - - - - 496 - - - YES - - - - - - 497 - - - YES - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - YES - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 130.IBPluginDependency - 130.ImportedFromIB2 - 130.editorWindowContentRectSynchronizationRect - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 195.IBPluginDependency - 195.ImportedFromIB2 - 196.IBPluginDependency - 196.ImportedFromIB2 - 197.IBPluginDependency - 197.ImportedFromIB2 - 198.IBPluginDependency - 198.ImportedFromIB2 - 199.IBPluginDependency - 199.ImportedFromIB2 - 200.IBEditorWindowLastContentRect - 200.IBPluginDependency - 200.ImportedFromIB2 - 200.editorWindowContentRectSynchronizationRect - 201.IBPluginDependency - 201.ImportedFromIB2 - 202.IBPluginDependency - 202.ImportedFromIB2 - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 205.ImportedFromIB2 - 205.editorWindowContentRectSynchronizationRect - 206.IBPluginDependency - 206.ImportedFromIB2 - 207.IBPluginDependency - 207.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 - 209.IBPluginDependency - 209.ImportedFromIB2 - 210.IBPluginDependency - 210.ImportedFromIB2 - 211.IBPluginDependency - 211.ImportedFromIB2 - 212.IBPluginDependency - 212.ImportedFromIB2 - 212.editorWindowContentRectSynchronizationRect - 213.IBPluginDependency - 213.ImportedFromIB2 - 214.IBPluginDependency - 214.ImportedFromIB2 - 215.IBPluginDependency - 215.ImportedFromIB2 - 216.IBPluginDependency - 216.ImportedFromIB2 - 217.IBPluginDependency - 217.ImportedFromIB2 - 218.IBPluginDependency - 218.ImportedFromIB2 - 219.IBPluginDependency - 219.ImportedFromIB2 - 220.IBEditorWindowLastContentRect - 220.IBPluginDependency - 220.ImportedFromIB2 - 220.editorWindowContentRectSynchronizationRect - 221.IBPluginDependency - 221.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 236.IBPluginDependency - 236.ImportedFromIB2 - 239.IBPluginDependency - 239.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.WindowOrigin - 29.editorWindowContentRectSynchronizationRect - 295.IBPluginDependency - 296.IBEditorWindowLastContentRect - 296.IBPluginDependency - 296.editorWindowContentRectSynchronizationRect - 297.IBPluginDependency - 298.IBPluginDependency - 346.IBPluginDependency - 346.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBEditorWindowLastContentRect - 349.IBPluginDependency - 349.ImportedFromIB2 - 349.editorWindowContentRectSynchronizationRect - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 375.IBPluginDependency - 376.IBEditorWindowLastContentRect - 376.IBPluginDependency - 377.IBPluginDependency - 388.IBEditorWindowLastContentRect - 388.IBPluginDependency - 389.IBPluginDependency - 390.IBPluginDependency - 391.IBPluginDependency - 392.IBPluginDependency - 393.IBPluginDependency - 394.IBPluginDependency - 395.IBPluginDependency - 396.IBPluginDependency - 397.IBPluginDependency - 398.IBPluginDependency - 399.IBPluginDependency - 400.IBPluginDependency - 401.IBPluginDependency - 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency - 405.IBPluginDependency - 406.IBPluginDependency - 407.IBPluginDependency - 408.IBPluginDependency - 409.IBPluginDependency - 410.IBPluginDependency - 411.IBPluginDependency - 412.IBPluginDependency - 413.IBPluginDependency - 414.IBPluginDependency - 415.IBPluginDependency - 416.IBPluginDependency - 417.IBPluginDependency - 418.IBPluginDependency - 419.IBPluginDependency - 420.IBPluginDependency - 450.IBPluginDependency - 451.IBEditorWindowLastContentRect - 451.IBPluginDependency - 452.IBPluginDependency - 453.IBPluginDependency - 454.IBPluginDependency - 457.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 462.IBPluginDependency - 465.IBPluginDependency - 466.IBPluginDependency - 485.IBPluginDependency - 490.IBPluginDependency - 491.IBEditorWindowLastContentRect - 491.IBPluginDependency - 492.IBPluginDependency - 494.IBPluginDependency - 496.IBPluginDependency - 497.IBEditorWindowLastContentRect - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 507.IBPluginDependency - 508.IBEditorWindowLastContentRect - 508.IBPluginDependency - 509.IBPluginDependency - 510.IBPluginDependency - 511.IBPluginDependency - 512.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 517.IBPluginDependency - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 58.IBPluginDependency - 58.ImportedFromIB2 - 73.IBPluginDependency - 73.ImportedFromIB2 - 81.IBEditorWindowLastContentRect - 81.IBPluginDependency - 81.ImportedFromIB2 - 81.editorWindowContentRectSynchronizationRect - 83.IBPluginDependency - 83.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{436, 809}, {64, 6}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 187}, {275, 113}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {275, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{547, 180}, {254, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{187, 434}, {243, 243}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {167, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{753, 217}, {238, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {241, 103}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{654, 239}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{525, 802}, {197, 73}} - {{380, 836}, {512, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {74, 862} - {{6, 978}, {478, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - {{604, 269}, {231, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - {{475, 832}, {234, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{746, 287}, {220, 133}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{608, 612}, {215, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - {{591, 420}, {83, 43}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{523, 2}, {178, 283}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{753, 197}, {170, 63}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{725, 289}, {246, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{674, 260}, {204, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{878, 180}, {164, 173}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - {{286, 129}, {275, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{23, 794}, {245, 183}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{452, 109}, {196, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 474}, {199, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - - - - YES - - - - - 532 - - - - YES - - NSPopover - NSResponder - - performClose: - id - - - performClose: - - performClose: - id - - - - YES - - YES - contentViewController - delegate - - - YES - NSViewController - id - - - - YES - - YES - contentViewController - delegate - - - YES - - contentViewController - NSViewController - - - delegate - id - - - - - IBProjectSource - ./Classes/NSPopover.h - - - - SVGTesterAppDelegate - NSObject - - IBProjectSource - ./Classes/SVGTesterAppDelegate.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - diff --git a/XCodeProjects/SVGTesterDemo/en.lproj/MainWindow.xib b/XCodeProjects/SVGTesterDemo/en.lproj/MainWindow.xib deleted file mode 100644 index 08e996170..000000000 --- a/XCodeProjects/SVGTesterDemo/en.lproj/MainWindow.xib +++ /dev/null @@ -1,291 +0,0 @@ - - - - 1070 - 11A419 - 1530 - 1115.2 - 549.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 1530 - - - YES - NSCustomView - NSWindowTemplate - NSView - NSButtonCell - NSCustomObject - NSButton - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - - - YES - - MainWindowController - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{196, 240}, {800, 560}} - 544735232 - Window - NSWindow - - - - - 256 - - YES - - - 274 - {{20, 52}, {760, 488}} - - - - ComparisonView - - - - 289 - {{690, 12}, {96, 32}} - - - YES - - 67239424 - 134217728 - Next - - LucidaGrande - 13 - 1044 - - - -2038284033 - 129 - - - 200 - 25 - - - - {{7, 11}, {800, 560}} - - - - - {{0, 0}, {2560, 1418}} - {10000000000000, 10000000000000} - - - - - YES - - - view - - - - 9 - - - - next: - - - - 10 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - YES - - - - - - 2 - - - YES - - - - - - - 3 - - - YES - - - - - 7 - - - YES - - - - - - 8 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 1.IBPluginDependency - 1.IBWindowTemplateEditedContentRect - 1.NSWindowTemplate.visibleAtLaunch - 1.WindowOrigin - 1.editorWindowContentRectSynchronizationRect - 2.IBPluginDependency - 3.IBPluginDependency - 7.IBPluginDependency - 8.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{357, 418}, {480, 270}} - - {196, 240} - {{357, 418}, {480, 270}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 10 - - - - YES - - ComparisonView - NSView - - IBProjectSource - ./Classes/ComparisonView.h - - - - MainWindowController - NSWindowController - - next: - id - - - next: - - next: - id - - - - view - ComparisonView - - - view - - view - ComparisonView - - - - IBProjectSource - ./Classes/MainWindowController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - diff --git a/XCodeProjects/SVGTesterDemo/main.m b/XCodeProjects/SVGTesterDemo/main.m deleted file mode 100644 index 3eeccf398..000000000 --- a/XCodeProjects/SVGTesterDemo/main.m +++ /dev/null @@ -1,10 +0,0 @@ -// -// main.m -// SVGTester -// -// Copyright Matt Rajca 2011. All rights reserved. -// - -int main(int argc, char *argv[]) { - return NSApplicationMain(argc, (const char **) argv); -} diff --git a/iOSDemo.xcodeproj/project.pbxproj b/iOSDemo.xcodeproj/project.pbxproj new file mode 100644 index 000000000..ef75bb334 --- /dev/null +++ b/iOSDemo.xcodeproj/project.pbxproj @@ -0,0 +1,505 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 661A0DCF161727CF008D5FBE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 661A0DCE161727CF008D5FBE /* UIKit.framework */; }; + 661A0DD1161727CF008D5FBE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 661A0DD0161727CF008D5FBE /* Foundation.framework */; }; + 661A0DD3161727CF008D5FBE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 661A0DD2161727CF008D5FBE /* CoreGraphics.framework */; }; + 661D721016177537005899EA /* Monkey.png in Resources */ = {isa = PBXBuildFile; fileRef = 661D71FE16177537005899EA /* Monkey.png */; }; + 661D721116177537005899EA /* Note.png in Resources */ = {isa = PBXBuildFile; fileRef = 661D71FF16177537005899EA /* Note.png */; }; + 661D721216177537005899EA /* Sample Licenses.txt in Resources */ = {isa = PBXBuildFile; fileRef = 661D720016177537005899EA /* Sample Licenses.txt */; }; + 661D721316177537005899EA /* australia_states_blank.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720216177537005899EA /* australia_states_blank.svg */; }; + 661D721416177537005899EA /* Blank_Map-Africa.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720316177537005899EA /* Blank_Map-Africa.svg */; }; + 661D721516177537005899EA /* breaking-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720416177537005899EA /* breaking-1.svg */; }; + 661D721616177537005899EA /* CurvedDiamond.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720516177537005899EA /* CurvedDiamond.svg */; }; + 661D721716177537005899EA /* Europe_states_reduced.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720616177537005899EA /* Europe_states_reduced.svg */; }; + 661D721816177537005899EA /* Lion.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720716177537005899EA /* Lion.svg */; }; + 661D721916177537005899EA /* Location_European_nation_states.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720816177537005899EA /* Location_European_nation_states.svg */; }; + 661D721A16177537005899EA /* Map.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720916177537005899EA /* Map.svg */; }; + 661D721B16177537005899EA /* Monkey.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720A16177537005899EA /* Monkey.svg */; }; + 661D721C16177537005899EA /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720B16177537005899EA /* Note.svg */; }; + 661D721D16177537005899EA /* Reinel_compass_rose-ADAM.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720C16177537005899EA /* Reinel_compass_rose-ADAM.svg */; }; + 661D721E16177537005899EA /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720D16177537005899EA /* test-wave-1.svg */; }; + 661D721F16177537005899EA /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720E16177537005899EA /* Text.svg */; }; + 661D722016177537005899EA /* uk-only.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720F16177537005899EA /* uk-only.svg */; }; + 661D722916177655005899EA /* iPadDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722116177655005899EA /* iPadDetailViewController.xib */; }; + 661D722A16177655005899EA /* iPhoneDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722316177655005899EA /* iPhoneDetailViewController.xib */; }; + 661D722B16177655005899EA /* MasterViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722516177655005899EA /* MasterViewController_iPad.xib */; }; + 661D722C16177655005899EA /* MasterViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722716177655005899EA /* MasterViewController_iPhone.xib */; }; + 6649E07B16172D4200AFE92A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E06916172D4200AFE92A /* AppDelegate.m */; }; + 6649E07C16172D4200AFE92A /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E06B16172D4200AFE92A /* DetailViewController.m */; }; + 6649E07F16172D4200AFE92A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6649E07016172D4200AFE92A /* InfoPlist.strings */; }; + 6649E08316172D4200AFE92A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E07816172D4200AFE92A /* main.m */; }; + 6649E0AB1617472900AFE92A /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0AA1617472900AFE92A /* MasterViewController.m */; }; + 6649E0AD1617479200AFE92A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E0AC1617479200AFE92A /* QuartzCore.framework */; }; + 6649E10D1617577000AFE92A /* libSVGKit-iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10A1617574700AFE92A /* libSVGKit-iOS.a */; }; + 6649E10F1617578500AFE92A /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10E1617578500AFE92A /* libxml2.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6649E1091617574700AFE92A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 6639618E16145D0400E58CCA; + remoteInfo = "SVGKit-iOS"; + }; + 6649E10B1617575500AFE92A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 6639618D16145D0400E58CCA; + remoteInfo = "SVGKit-iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 661A0DCA161727CF008D5FBE /* iOSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 661A0DCE161727CF008D5FBE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 661A0DD0161727CF008D5FBE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 661A0DD2161727CF008D5FBE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 661D71FE16177537005899EA /* Monkey.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Monkey.png; sourceTree = ""; }; + 661D71FF16177537005899EA /* Note.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Note.png; sourceTree = ""; }; + 661D720016177537005899EA /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; + 661D720216177537005899EA /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; + 661D720316177537005899EA /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; + 661D720416177537005899EA /* breaking-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "breaking-1.svg"; sourceTree = ""; }; + 661D720516177537005899EA /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; + 661D720616177537005899EA /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; + 661D720716177537005899EA /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; + 661D720816177537005899EA /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; + 661D720916177537005899EA /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; + 661D720A16177537005899EA /* Monkey.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Monkey.svg; sourceTree = ""; }; + 661D720B16177537005899EA /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; + 661D720C16177537005899EA /* Reinel_compass_rose-ADAM.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Reinel_compass_rose-ADAM.svg"; sourceTree = ""; }; + 661D720D16177537005899EA /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; + 661D720E16177537005899EA /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; + 661D720F16177537005899EA /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; + 661D722216177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/iPadDetailViewController.xib; sourceTree = ""; }; + 661D722416177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/iPhoneDetailViewController.xib; sourceTree = ""; }; + 661D722616177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController_iPad.xib; sourceTree = ""; }; + 661D722816177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController_iPhone.xib; sourceTree = ""; }; + 6649E06816172D4200AFE92A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 6649E06916172D4200AFE92A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 6649E06A16172D4200AFE92A /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; + 6649E06B16172D4200AFE92A /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; + 6649E07116172D4200AFE92A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6649E07616172D4200AFE92A /* iOSDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iOSDemo-Info.plist"; sourceTree = ""; }; + 6649E07716172D4200AFE92A /* iOSDemo-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "iOSDemo-Prefix.pch"; sourceTree = ""; }; + 6649E07816172D4200AFE92A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 6649E0A91617472900AFE92A /* MasterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; + 6649E0AA1617472900AFE92A /* MasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; + 6649E0AC1617479200AFE92A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "SVGKit-iOS.xcodeproj"; sourceTree = ""; }; + 6649E10E1617578500AFE92A /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 661A0DC7161727CF008D5FBE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6649E10F1617578500AFE92A /* libxml2.dylib in Frameworks */, + 6649E10D1617577000AFE92A /* libSVGKit-iOS.a in Frameworks */, + 6649E0AD1617479200AFE92A /* QuartzCore.framework in Frameworks */, + 661A0DCF161727CF008D5FBE /* UIKit.framework in Frameworks */, + 661A0DD1161727CF008D5FBE /* Foundation.framework in Frameworks */, + 661A0DD3161727CF008D5FBE /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 661A0DBF161727CF008D5FBE = { + isa = PBXGroup; + children = ( + 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */, + 6649E0AC1617479200AFE92A /* QuartzCore.framework */, + 6649E06716172D4200AFE92A /* iOSDemo */, + 661D71FC16177537005899EA /* Samples */, + 661A0DCD161727CF008D5FBE /* Frameworks */, + 661A0DCB161727CF008D5FBE /* Products */, + ); + sourceTree = ""; + }; + 661A0DCB161727CF008D5FBE /* Products */ = { + isa = PBXGroup; + children = ( + 661A0DCA161727CF008D5FBE /* iOSDemo.app */, + ); + name = Products; + sourceTree = ""; + }; + 661A0DCD161727CF008D5FBE /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6649E10E1617578500AFE92A /* libxml2.dylib */, + 661A0DCE161727CF008D5FBE /* UIKit.framework */, + 661A0DD0161727CF008D5FBE /* Foundation.framework */, + 661A0DD2161727CF008D5FBE /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 661D71FC16177537005899EA /* Samples */ = { + isa = PBXGroup; + children = ( + 661D71FD16177537005899EA /* Bitmap */, + 661D720016177537005899EA /* Sample Licenses.txt */, + 661D720116177537005899EA /* SVG */, + ); + path = Samples; + sourceTree = ""; + }; + 661D71FD16177537005899EA /* Bitmap */ = { + isa = PBXGroup; + children = ( + 661D71FE16177537005899EA /* Monkey.png */, + 661D71FF16177537005899EA /* Note.png */, + ); + path = Bitmap; + sourceTree = ""; + }; + 661D720116177537005899EA /* SVG */ = { + isa = PBXGroup; + children = ( + 661D720216177537005899EA /* australia_states_blank.svg */, + 661D720316177537005899EA /* Blank_Map-Africa.svg */, + 661D720416177537005899EA /* breaking-1.svg */, + 661D720516177537005899EA /* CurvedDiamond.svg */, + 661D720616177537005899EA /* Europe_states_reduced.svg */, + 661D720716177537005899EA /* Lion.svg */, + 661D720816177537005899EA /* Location_European_nation_states.svg */, + 661D720916177537005899EA /* Map.svg */, + 661D720A16177537005899EA /* Monkey.svg */, + 661D720B16177537005899EA /* Note.svg */, + 661D720C16177537005899EA /* Reinel_compass_rose-ADAM.svg */, + 661D720D16177537005899EA /* test-wave-1.svg */, + 661D720E16177537005899EA /* Text.svg */, + 661D720F16177537005899EA /* uk-only.svg */, + ); + path = SVG; + sourceTree = ""; + }; + 6649E06716172D4200AFE92A /* iOSDemo */ = { + isa = PBXGroup; + children = ( + 661D722116177655005899EA /* iPadDetailViewController.xib */, + 661D722316177655005899EA /* iPhoneDetailViewController.xib */, + 661D722516177655005899EA /* MasterViewController_iPad.xib */, + 661D722716177655005899EA /* MasterViewController_iPhone.xib */, + 6649E06816172D4200AFE92A /* AppDelegate.h */, + 6649E06916172D4200AFE92A /* AppDelegate.m */, + 6649E06A16172D4200AFE92A /* DetailViewController.h */, + 6649E06B16172D4200AFE92A /* DetailViewController.m */, + 6649E0A91617472900AFE92A /* MasterViewController.h */, + 6649E0AA1617472900AFE92A /* MasterViewController.m */, + 6649E07016172D4200AFE92A /* InfoPlist.strings */, + 6649E07616172D4200AFE92A /* iOSDemo-Info.plist */, + 6649E07716172D4200AFE92A /* iOSDemo-Prefix.pch */, + 6649E07816172D4200AFE92A /* main.m */, + ); + name = iOSDemo; + path = XCodeProjectData/iOSDemo; + sourceTree = ""; + }; + 6649E1031617574600AFE92A /* Products */ = { + isa = PBXGroup; + children = ( + 6649E10A1617574700AFE92A /* libSVGKit-iOS.a */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 661A0DC9161727CF008D5FBE /* iOSDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 661A0DF4161727D0008D5FBE /* Build configuration list for PBXNativeTarget "iOSDemo" */; + buildPhases = ( + 661A0DC6161727CF008D5FBE /* Sources */, + 661A0DC7161727CF008D5FBE /* Frameworks */, + 661A0DC8161727CF008D5FBE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6649E10C1617575500AFE92A /* PBXTargetDependency */, + ); + name = iOSDemo; + productName = iOSDemo; + productReference = 661A0DCA161727CF008D5FBE /* iOSDemo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 661A0DC1161727CF008D5FBE /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0440; + ORGANIZATIONNAME = na; + }; + buildConfigurationList = 661A0DC4161727CF008D5FBE /* Build configuration list for PBXProject "iOSDemo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 661A0DBF161727CF008D5FBE; + productRefGroup = 661A0DCB161727CF008D5FBE /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 6649E1031617574600AFE92A /* Products */; + ProjectRef = 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 661A0DC9161727CF008D5FBE /* iOSDemo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 6649E10A1617574700AFE92A /* libSVGKit-iOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libSVGKit-iOS.a"; + remoteRef = 6649E1091617574700AFE92A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 661A0DC8161727CF008D5FBE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6649E07F16172D4200AFE92A /* InfoPlist.strings in Resources */, + 661D721016177537005899EA /* Monkey.png in Resources */, + 661D721116177537005899EA /* Note.png in Resources */, + 661D721216177537005899EA /* Sample Licenses.txt in Resources */, + 661D721316177537005899EA /* australia_states_blank.svg in Resources */, + 661D721416177537005899EA /* Blank_Map-Africa.svg in Resources */, + 661D721516177537005899EA /* breaking-1.svg in Resources */, + 661D721616177537005899EA /* CurvedDiamond.svg in Resources */, + 661D721716177537005899EA /* Europe_states_reduced.svg in Resources */, + 661D721816177537005899EA /* Lion.svg in Resources */, + 661D721916177537005899EA /* Location_European_nation_states.svg in Resources */, + 661D721A16177537005899EA /* Map.svg in Resources */, + 661D721B16177537005899EA /* Monkey.svg in Resources */, + 661D721C16177537005899EA /* Note.svg in Resources */, + 661D721D16177537005899EA /* Reinel_compass_rose-ADAM.svg in Resources */, + 661D721E16177537005899EA /* test-wave-1.svg in Resources */, + 661D721F16177537005899EA /* Text.svg in Resources */, + 661D722016177537005899EA /* uk-only.svg in Resources */, + 661D722916177655005899EA /* iPadDetailViewController.xib in Resources */, + 661D722A16177655005899EA /* iPhoneDetailViewController.xib in Resources */, + 661D722B16177655005899EA /* MasterViewController_iPad.xib in Resources */, + 661D722C16177655005899EA /* MasterViewController_iPhone.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 661A0DC6161727CF008D5FBE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6649E07B16172D4200AFE92A /* AppDelegate.m in Sources */, + 6649E07C16172D4200AFE92A /* DetailViewController.m in Sources */, + 6649E08316172D4200AFE92A /* main.m in Sources */, + 6649E0AB1617472900AFE92A /* MasterViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6649E10C1617575500AFE92A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "SVGKit-iOS"; + targetProxy = 6649E10B1617575500AFE92A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 661D722116177655005899EA /* iPadDetailViewController.xib */ = { + isa = PBXVariantGroup; + children = ( + 661D722216177655005899EA /* en */, + ); + name = iPadDetailViewController.xib; + sourceTree = ""; + }; + 661D722316177655005899EA /* iPhoneDetailViewController.xib */ = { + isa = PBXVariantGroup; + children = ( + 661D722416177655005899EA /* en */, + ); + name = iPhoneDetailViewController.xib; + sourceTree = ""; + }; + 661D722516177655005899EA /* MasterViewController_iPad.xib */ = { + isa = PBXVariantGroup; + children = ( + 661D722616177655005899EA /* en */, + ); + name = MasterViewController_iPad.xib; + sourceTree = ""; + }; + 661D722716177655005899EA /* MasterViewController_iPhone.xib */ = { + isa = PBXVariantGroup; + children = ( + 661D722816177655005899EA /* en */, + ); + name = MasterViewController_iPhone.xib; + sourceTree = ""; + }; + 6649E07016172D4200AFE92A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 6649E07116172D4200AFE92A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 661A0DF2161727D0008D5FBE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../iOS/**", + "../../Core/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + PROVISIONING_PROFILE = ""; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 661A0DF3161727D0008D5FBE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "../../iOS/**", + "../../Core/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 661A0DF5161727D0008D5FBE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "Source/**", + "calayer-exporter", + ); + INFOPLIST_FILE = "XCodeProjectData/iOSDemo/iOSDemo-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../Library/Developer/Xcode/DerivedData/SVGKit-iOS-fdaumrdvswucxfexyosnvlgswvey/Build/Products/Debug-universal\"", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 661A0DF6161727D0008D5FBE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "XCodeProjectData/iOSDemo/iOSDemo-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "Source/**", + "calayer-exporter", + ); + INFOPLIST_FILE = "XCodeProjectData/iOSDemo/iOSDemo-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../Library/Developer/Xcode/DerivedData/SVGKit-iOS-fdaumrdvswucxfexyosnvlgswvey/Build/Products/Debug-universal\"", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 661A0DC4161727CF008D5FBE /* Build configuration list for PBXProject "iOSDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 661A0DF2161727D0008D5FBE /* Debug */, + 661A0DF3161727D0008D5FBE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 661A0DF4161727D0008D5FBE /* Build configuration list for PBXNativeTarget "iOSDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 661A0DF5161727D0008D5FBE /* Debug */, + 661A0DF6161727D0008D5FBE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 661A0DC1161727CF008D5FBE /* Project object */; +} From a5b23e11a8f4e314ac34fc05345eb40c343f9414 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 30 Sep 2012 01:55:36 +0100 Subject: [PATCH 081/110] FIXED: several CRITICAL aspects of DOM to do with attributes and namespaces ADDED: Assertions against you mixing and matching DOM 1 with DOM 2 (bad spec design: it specifically allows something UNDEFINED) ADDED: *most of* the implementation for the "use" tag in SVG - NB: it is partially working, but DOES NOT SUPPORT nested USE tags ADDED: new test case Sample file that has MANY use tags (and nested use tags). Also, this file breaks our original Path parser :( --- SVGKit-iOS.xcodeproj/project.pbxproj | 64 ++++++++-- Samples/SVG/Reinel_compass_rose-ADAM.svg | 2 +- Samples/SVG/Reinel_compass_rose.svg | 49 ++++++++ Samples/Sample Licenses.txt | 6 +- Source/Core/DOM classes/Core DOM/Document.m | 30 ++++- Source/Core/DOM classes/Core DOM/Element.m | 32 ++--- .../Core/DOM classes/Core DOM/NamedNodeMap.m | 37 +++++- .../Core/DOM classes/SVG-DOM/SVGDefsElement.h | 9 ++ .../Core/DOM classes/SVG-DOM/SVGDefsElement.m | 5 + .../DOM classes/SVG-DOM/SVGElementInstance.h | 52 ++++++++ .../DOM classes/SVG-DOM/SVGElementInstance.m | 84 +++++++++++++ .../SVG-DOM/SVGElementInstanceList.h | 21 ++++ .../SVG-DOM/SVGElementInstanceList.m | 28 +++++ .../SVG-DOM/SVGElementInstanceList_Internal.h | 15 +++ .../SVG-DOM/SVGElementInstance_Mutable.h | 8 ++ .../Core/DOM classes/SVG-DOM/SVGUseElement.h | 37 ++++++ .../Core/DOM classes/SVG-DOM/SVGUseElement.m | 39 ++++++ .../SVG-DOM/SVGUseElement_Mutable.h | 11 ++ Source/Core/DOM classes/SVGDefsElement.h | 12 -- Source/Core/DOM classes/SVGDefsElement.m | 12 -- Source/Core/Parsing/SVGKParserDefsAndUse.h | 11 ++ Source/Core/Parsing/SVGKParserDefsAndUse.m | 119 ++++++++++++++++++ Source/Core/Parsing/SVGKParserSVG.m | 3 +- Source/Core/SVGKImage.m | 16 ++- Source/Core/SVGKParser.h | 2 +- Source/Core/SVGKParser.m | 69 ++++++++-- .../iOSDemo/MasterViewController.m | 2 +- iOSDemo.xcodeproj/project.pbxproj | 6 +- 28 files changed, 695 insertions(+), 86 deletions(-) create mode 100644 Samples/SVG/Reinel_compass_rose.svg create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGDefsElement.h create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGDefsElement.m create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGElementInstance.h create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGElementInstance.m create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.h create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.m create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList_Internal.h create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGElementInstance_Mutable.h create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGUseElement.h create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGUseElement.m create mode 100644 Source/Core/DOM classes/SVG-DOM/SVGUseElement_Mutable.h delete mode 100644 Source/Core/DOM classes/SVGDefsElement.h delete mode 100644 Source/Core/DOM classes/SVGDefsElement.m create mode 100644 Source/Core/Parsing/SVGKParserDefsAndUse.h create mode 100644 Source/Core/Parsing/SVGKParserDefsAndUse.m diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 521f3ae57..465d1ea4f 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -65,8 +65,6 @@ 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA316172CCC00AFE92A /* SVGViewSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA416172CCC00AFE92A /* SVGCircleElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E01D16172CCC00AFE92A /* SVGCircleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA516172CCC00AFE92A /* SVGCircleElement.m */; }; - 6649E01E16172CCC00AFE92A /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA616172CCC00AFE92A /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6649E01F16172CCC00AFE92A /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA716172CCC00AFE92A /* SVGDefsElement.m */; }; 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFA816172CCC00AFE92A /* SVGDescriptionElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E02116172CCC00AFE92A /* SVGDescriptionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFA916172CCC00AFE92A /* SVGDescriptionElement.m */; }; 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFAA16172CCC00AFE92A /* SVGElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -132,6 +130,19 @@ 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */; }; 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649E0921617432700AFE92A /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0931617432700AFE92A /* CALayerExporter.m */; }; + 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0132C16179DCC00359714 /* SVGDefsElement.h */; }; + 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0132D16179DCC00359714 /* SVGDefsElement.m */; }; + 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133016179E6F00359714 /* SVGUseElement.h */; }; + 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133116179E6F00359714 /* SVGUseElement.m */; }; + 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133416179F4400359714 /* SVGElementInstance.h */; }; + 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133516179F4400359714 /* SVGElementInstance.m */; }; + 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133816179FD700359714 /* SVGElementInstanceList.h */; }; + 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133916179FD700359714 /* SVGElementInstanceList.m */; }; + 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */; }; + 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */; }; + 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013401617A52600359714 /* SVGUseElement_Mutable.h */; }; + 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */; }; + 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -165,7 +176,6 @@ 6649DF6416172CCC00AFE92A /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; 6649DF6516172CCC00AFE92A /* Monkey.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Monkey.svg; sourceTree = ""; }; 6649DF6616172CCC00AFE92A /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; - 6649DF6716172CCC00AFE92A /* Reinel_compass_rose-ADAM.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Reinel_compass_rose-ADAM.svg"; sourceTree = ""; }; 6649DF6816172CCC00AFE92A /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; 6649DF6916172CCC00AFE92A /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; 6649DF6A16172CCC00AFE92A /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; @@ -223,8 +233,6 @@ 6649DFA316172CCC00AFE92A /* SVGViewSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewSpec.h; sourceTree = ""; }; 6649DFA416172CCC00AFE92A /* SVGCircleElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCircleElement.h; sourceTree = ""; }; 6649DFA516172CCC00AFE92A /* SVGCircleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGCircleElement.m; sourceTree = ""; }; - 6649DFA616172CCC00AFE92A /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; - 6649DFA716172CCC00AFE92A /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; 6649DFA816172CCC00AFE92A /* SVGDescriptionElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescriptionElement.h; sourceTree = ""; }; 6649DFA916172CCC00AFE92A /* SVGDescriptionElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDescriptionElement.m; sourceTree = ""; }; 6649DFAA16172CCC00AFE92A /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = ""; }; @@ -290,6 +298,20 @@ 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; 6649E0921617432700AFE92A /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CALayerExporter.h; path = "calayer-exporter/CALayerExporter.h"; sourceTree = SOURCE_ROOT; }; 6649E0931617432700AFE92A /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; + 6649F4F51617CECA00F1A064 /* Reinel_compass_rose.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Reinel_compass_rose.svg; sourceTree = ""; }; + 66C0132C16179DCC00359714 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; + 66C0132D16179DCC00359714 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; + 66C0133016179E6F00359714 /* SVGUseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUseElement.h; sourceTree = ""; }; + 66C0133116179E6F00359714 /* SVGUseElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUseElement.m; sourceTree = ""; }; + 66C0133416179F4400359714 /* SVGElementInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstance.h; sourceTree = ""; }; + 66C0133516179F4400359714 /* SVGElementInstance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElementInstance.m; sourceTree = ""; }; + 66C0133816179FD700359714 /* SVGElementInstanceList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstanceList.h; sourceTree = ""; }; + 66C0133916179FD700359714 /* SVGElementInstanceList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGElementInstanceList.m; sourceTree = ""; }; + 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserDefsAndUse.h; sourceTree = ""; }; + 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserDefsAndUse.m; sourceTree = ""; }; + 66C013401617A52600359714 /* SVGUseElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUseElement_Mutable.h; sourceTree = ""; }; + 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstance_Mutable.h; sourceTree = ""; }; + 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstanceList_Internal.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -377,8 +399,8 @@ 6649DF6316172CCC00AFE92A /* Location_European_nation_states.svg */, 6649DF6416172CCC00AFE92A /* Map.svg */, 6649DF6516172CCC00AFE92A /* Monkey.svg */, + 6649F4F51617CECA00F1A064 /* Reinel_compass_rose.svg */, 6649DF6616172CCC00AFE92A /* Note.svg */, - 6649DF6716172CCC00AFE92A /* Reinel_compass_rose-ADAM.svg */, 6649DF6816172CCC00AFE92A /* test-wave-1.svg */, 6649DF6916172CCC00AFE92A /* Text.svg */, 6649DF6A16172CCC00AFE92A /* uk-only.svg */, @@ -430,8 +452,6 @@ 6649DF9216172CCC00AFE92A /* SVG-DOM */, 6649DFA416172CCC00AFE92A /* SVGCircleElement.h */, 6649DFA516172CCC00AFE92A /* SVGCircleElement.m */, - 6649DFA616172CCC00AFE92A /* SVGDefsElement.h */, - 6649DFA716172CCC00AFE92A /* SVGDefsElement.m */, 6649DFA816172CCC00AFE92A /* SVGDescriptionElement.h */, 6649DFA916172CCC00AFE92A /* SVGDescriptionElement.m */, 6649DFAA16172CCC00AFE92A /* SVGElement.h */, @@ -511,9 +531,17 @@ children = ( 6649DF9316172CCC00AFE92A /* SVGAngle.h */, 6649DF9416172CCC00AFE92A /* SVGAngle.m */, + 66C0132C16179DCC00359714 /* SVGDefsElement.h */, + 66C0132D16179DCC00359714 /* SVGDefsElement.m */, 6649DF9516172CCC00AFE92A /* SVGDocument.h */, 6649DF9616172CCC00AFE92A /* SVGDocument.m */, 6649DF9716172CCC00AFE92A /* SVGDocument_Mutable.h */, + 66C0133416179F4400359714 /* SVGElementInstance.h */, + 66C0133516179F4400359714 /* SVGElementInstance.m */, + 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */, + 66C0133816179FD700359714 /* SVGElementInstanceList.h */, + 66C0133916179FD700359714 /* SVGElementInstanceList.m */, + 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */, 6649DF9816172CCC00AFE92A /* SVGLength.h */, 6649DF9916172CCC00AFE92A /* SVGLength.m */, 6649DF9A16172CCC00AFE92A /* SVGMatrix.h */, @@ -525,6 +553,9 @@ 6649DFA016172CCC00AFE92A /* SVGSVGElement_Mutable.h */, 6649DFA116172CCC00AFE92A /* SVGTransform.h */, 6649DFA216172CCC00AFE92A /* SVGTransform.m */, + 66C0133016179E6F00359714 /* SVGUseElement.h */, + 66C0133116179E6F00359714 /* SVGUseElement.m */, + 66C013401617A52600359714 /* SVGUseElement_Mutable.h */, 6649DFA316172CCC00AFE92A /* SVGViewSpec.h */, ); path = "SVG-DOM"; @@ -542,6 +573,8 @@ 6649DFCD16172CCC00AFE92A /* SVGKParserSVG.m */, 6649DFCE16172CCC00AFE92A /* SVGKPointsAndPathsParser.h */, 6649DFCF16172CCC00AFE92A /* SVGKPointsAndPathsParser.m */, + 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */, + 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */, ); path = Parsing; sourceTree = ""; @@ -615,7 +648,6 @@ 6649E01916172CCC00AFE92A /* SVGTransform.h in Headers */, 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */, 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */, - 6649E01E16172CCC00AFE92A /* SVGDefsElement.h in Headers */, 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */, 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */, 6649E02416172CCC00AFE92A /* SVGElement_ForParser.h in Headers */, @@ -651,6 +683,14 @@ 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */, 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */, 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */, + 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, + 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, + 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, + 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, + 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, + 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, + 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, + 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -747,7 +787,6 @@ 6649E01616172CCC00AFE92A /* SVGPoint.m in Sources */, 6649E01A16172CCC00AFE92A /* SVGTransform.m in Sources */, 6649E01D16172CCC00AFE92A /* SVGCircleElement.m in Sources */, - 6649E01F16172CCC00AFE92A /* SVGDefsElement.m in Sources */, 6649E02116172CCC00AFE92A /* SVGDescriptionElement.m in Sources */, 6649E02316172CCC00AFE92A /* SVGElement.m in Sources */, 6649E02616172CCC00AFE92A /* SVGEllipseElement.m in Sources */, @@ -778,6 +817,11 @@ 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */, 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */, 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */, + 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */, + 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */, + 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */, + 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */, + 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Samples/SVG/Reinel_compass_rose-ADAM.svg b/Samples/SVG/Reinel_compass_rose-ADAM.svg index 26f181c46..ddfa469ac 100644 --- a/Samples/SVG/Reinel_compass_rose-ADAM.svg +++ b/Samples/SVG/Reinel_compass_rose-ADAM.svg @@ -58,7 +58,7 @@ diff --git a/Samples/SVG/Reinel_compass_rose.svg b/Samples/SVG/Reinel_compass_rose.svg new file mode 100644 index 000000000..6a6f3270d --- /dev/null +++ b/Samples/SVG/Reinel_compass_rose.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Sample Licenses.txt b/Samples/Sample Licenses.txt index 44a239f82..afd2c114c 100644 --- a/Samples/Sample Licenses.txt +++ b/Samples/Sample Licenses.txt @@ -25,4 +25,8 @@ Location_European_nation_states -- http://en.wikipedia.org/wiki/File:Location_European_nation_states.svg uk-only.svg, Europe_states_reduced.svg - -- Adam Martin's modified versions of Location_European_nation_states, same license \ No newline at end of file + -- Adam Martin's modified versions of Location_European_nation_states, same license + +Reinel_compass_rose.svg + -- Creative Commons + -- http://commons.wikimedia.org/wiki/File:Reinel_compass_rose.svg diff --git a/Source/Core/DOM classes/Core DOM/Document.m b/Source/Core/DOM classes/Core DOM/Document.m index 177c4d3e4..e56c96f56 100644 --- a/Source/Core/DOM classes/Core DOM/Document.m +++ b/Source/Core/DOM classes/Core DOM/Document.m @@ -4,6 +4,7 @@ #import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt specify how lists are made mutable @interface Document() +-(Element*) privateGetElementById:(NSString*) idValue childrenOfElement:(Node*) parent; /*! private method used in implementation of the MULTIPLE getElementsByTagName methods */ -(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; @end @@ -105,15 +106,34 @@ -(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString // Introduced in DOM Level 2: -(Element*) getElementById:(NSString*) elementId { - /** - Hard-coding this to SVG, where only attributes tagged "id" are ID attributes - */ - NSAssert( FALSE, @"At this point, we have to recurse down the tree looking at the id's of each SVG element. This is already implemented in old SVGKit, need to copy/paste/debug the code" ); - return nil; + return [self privateGetElementById:elementId childrenOfElement:self.documentElement]; } #pragma mark - Non-Spec methods required to implement the Spec methods +-(Element*) privateGetElementById:(NSString*) idValue childrenOfElement:(Node*) parent +{ + /** According to spec, this is only valid for ELEMENT nodes */ + if( [parent isKindOfClass:[Element class]] ) + { + Element* parentAsElement = (Element*) parent; + + if( [[parentAsElement getAttribute:@"id"] isEqualToString:idValue]) + return parentAsElement; + } + + for( Node* childNode in parent.childNodes ) + { + Element* childResult = [self privateGetElementById:idValue childrenOfElement:childNode]; + + if( childResult != nil ) + return childResult; + } + + return nil; +} + + /*! This useful method provides both the DOM level 1 and the DOM level 2 implementations of searching the tree for a node - because THEY ARE DIFFERENT yet very similar */ diff --git a/Source/Core/DOM classes/Core DOM/Element.m b/Source/Core/DOM classes/Core DOM/Element.m index 19ad0cea5..1f8db54d0 100644 --- a/Source/Core/DOM classes/Core DOM/Element.m +++ b/Source/Core/DOM classes/Core DOM/Element.m @@ -15,12 +15,6 @@ - (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attribut if (self) { self.tagName = n; - /** FIXME: read the spec and add two versions of this, one that uses NAMESPACED attributes, - and one that doesn't. - - Yes, DOM is a total Pain In The A** to implement - the different versions are mostly - separate, parallel, specs - */ for( NSString* attributeName in attributes.allKeys ) { [self setAttribute:attributeName value:[attributes objectForKey:attributeName]]; @@ -28,20 +22,15 @@ - (id)initWithLocalName:(NSString*) n attributes:(NSMutableDictionary*) attribut } return self; } -- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary*) attributes { +- (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attributes:(NSMutableDictionary *)attributes +{ self = [super initType:SKNodeType_ELEMENT_NODE name:n inNamespace:nsURI]; if (self) { self.tagName = n; - /** FIXME: read the spec and add two versions of this, one that uses NAMESPACED attributes, - and one that doesn't. - - Yes, DOM is a total Pain In The A** to implement - the different versions are mostly - separate, parallel, specs - */ - for( NSString* attributeName in attributes.allKeys ) + for( Attr* attribute in attributes.allValues ) { - [self setAttribute:attributeName value:[attributes objectForKey:attributeName]]; + [self.attributes setNamedItemNS:attribute]; } } return self; @@ -113,8 +102,12 @@ -(NodeList*) getElementsByTagName:(NSString*) name // Introduced in DOM Level 2: -(NSString*) getAttributeNS:(NSString*) namespaceURI localName:(NSString*) localName { - NSAssert( FALSE, @"Not implemented yet" ); - return nil; + Attr* result = (Attr*) [self.attributes getNamedItemNS:namespaceURI localName:localName]; + + if( result == nil || result.value == nil ) + return @""; // according to spec + else + return result.value; } // Introduced in DOM Level 2: @@ -134,8 +127,9 @@ -(void) removeAttributeNS:(NSString*) namespaceURI localName:(NSString*) localNa // Introduced in DOM Level 2: -(Attr*) getAttributeNodeNS:(NSString*) namespaceURI localName:(NSString*) localName { - NSAssert( FALSE, @"Not implemented yet" ); - return nil; + Attr* result = (Attr*) [self.attributes getNamedItemNS:namespaceURI localName:localName]; + + return result; } // Introduced in DOM Level 2: diff --git a/Source/Core/DOM classes/Core DOM/NamedNodeMap.m b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m index d092c052a..9786fff88 100644 --- a/Source/Core/DOM classes/Core DOM/NamedNodeMap.m +++ b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -36,20 +36,47 @@ - (void)dealloc { -(Node*) getNamedItem:(NSString*) name { - return [self.internalDictionary objectForKey:name]; + Node* simpleResult = [self.internalDictionary objectForKey:name]; + + if( simpleResult == nil ) + { + /** + Check the namespaces in turn, to see if we can find this node in one of them + + NB: according to spec, this behaviour is: + + "The result depends on the implementation" + + I've chosen to implement it the most user-friendly way possible. It is NOT the best + solution IMHO - the spec authors should have defined the outcome! + */ + + for( NSString* key in [self.internalDictionaryOfNamespaces allKeys] ) + { + simpleResult = [self getNamedItemNS:key localName:name]; + if( simpleResult != nil ) + break; + } + } + + return simpleResult; } -(Node*) setNamedItem:(Node*) arg { - Node* oldNode = [self.internalDictionary objectForKey:arg.nodeName]; + NSAssert( [[self.internalDictionaryOfNamespaces allKeys] count] < 1, @"WARNING: you are using namespaced attributes in parallel with non-namespaced. According to the DOM Spec, this leads to UNDEFINED behaviour. This is insane - you do NOT want to be doing this! Crashing deliberately...." ); - [self.internalDictionary setObject:arg forKey:arg.nodeName]; + Node* oldNode = [self.internalDictionary objectForKey:arg.localName]; + + [self.internalDictionary setObject:arg forKey:arg.localName]; return oldNode; } -(Node*) removeNamedItem:(NSString*) name { + NSAssert( [[self.internalDictionaryOfNamespaces allKeys] count] < 1, @"WARNING: you are using namespaced attributes in parallel with non-namespaced. According to the DOM Spec, this leads to UNDEFINED behaviour. This is insane - you do NOT want to be doing this! Crashing deliberately...." ); + Node* oldNode = [self.internalDictionary objectForKey:name]; [self.internalDictionary removeObjectForKey:name]; @@ -106,9 +133,9 @@ -(Node*) setNamedItemNS:(Node*) arg namespaceDict = [NSMutableDictionary dictionary]; [self.internalDictionaryOfNamespaces setObject:namespaceDict forKey:arg.namespaceURI]; } - Node* oldNode = [namespaceDict objectForKey:arg.nodeName]; + Node* oldNode = [namespaceDict objectForKey:arg.localName]; - [namespaceDict setObject:arg forKey:arg.nodeName]; + [namespaceDict setObject:arg forKey:arg.localName]; return oldNode; } diff --git a/Source/Core/DOM classes/SVG-DOM/SVGDefsElement.h b/Source/Core/DOM classes/SVG-DOM/SVGDefsElement.h new file mode 100644 index 000000000..c47fca9b5 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGDefsElement.h @@ -0,0 +1,9 @@ +/* + http://www.w3.org/TR/SVG/struct.html#InterfaceSVGDefsElement + + */ +#import "SVGElement.h" + +@interface SVGDefsElement : SVGElement { } + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGDefsElement.m b/Source/Core/DOM classes/SVG-DOM/SVGDefsElement.m new file mode 100644 index 000000000..02ea0542d --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGDefsElement.m @@ -0,0 +1,5 @@ +#import "SVGDefsElement.h" + +@implementation SVGDefsElement + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGElementInstance.h b/Source/Core/DOM classes/SVG-DOM/SVGElementInstance.h new file mode 100644 index 000000000..854cf853c --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGElementInstance.h @@ -0,0 +1,52 @@ +/* + http://www.w3.org/TR/SVG/struct.html#InterfaceSVGElementInstance + + interface SVGElementInstance : EventTarget { + readonly attribute SVGElement correspondingElement; + readonly attribute SVGUseElement correspondingUseElement; + readonly attribute SVGElementInstance parentNode; + readonly attribute SVGElementInstanceList childNodes; + readonly attribute SVGElementInstance firstChild; + readonly attribute SVGElementInstance lastChild; + readonly attribute SVGElementInstance previousSibling; + readonly attribute SVGElementInstance nextSibling; + */ + +#import "SVGElement.h" +#import "SVGElementInstanceList.h" + +@class SVGUseElement; +#import "SVGUseElement.h" + + +@interface SVGElementInstance : NSObject + + +/*The corresponding element to which this object is an instance. For example, if a ‘use’ element references a ‘rect’ element, then an SVGElementInstance is created, with its correspondingElement being the SVGRectElement object for the ‘rect’ element. */ +@property(nonatomic,retain, readonly) SVGElement* correspondingElement; + + +/* The corresponding ‘use’ element to which this SVGElementInstance object belongs. When ‘use’ elements are nested (e.g., a ‘use’ references another ‘use’ which references a graphics element such as a ‘rect’), then the correspondingUseElement is the outermost ‘use’ (i.e., the one which indirectly references the ‘rect’, not the one with the direct reference). */ +@property(nonatomic,retain, readonly) SVGUseElement* correspondingUseElement; + +/* The parent of this SVGElementInstance within the instance tree. All SVGElementInstance objects have a parent except the SVGElementInstance which corresponds to the element which was directly referenced by the ‘use’ element, in which case parentNode is null. */ +@property(nonatomic,retain, readonly) SVGElementInstance* parentNode; + +/* An SVGElementInstanceList that contains all children of this SVGElementInstance within the instance tree. If there are no children, this is an SVGElementInstanceList containing no entries (i.e., an empty list). +firstChild (readonly SVGElementInstance) */ +@property(nonatomic,retain, readonly) SVGElementInstanceList* childNodes; + + +/* The first child of this SVGElementInstance within the instance tree. If there is no such SVGElementInstance, this returns null. */ +@property(nonatomic,retain, readonly) SVGElementInstance* firstChild; + +/* The last child of this SVGElementInstance within the instance tree. If there is no such SVGElementInstance, this returns null. */ +@property(nonatomic,retain, readonly) SVGElementInstance* lastChild; + +/* The SVGElementInstance immediately preceding this SVGElementInstance. If there is no such SVGElementInstance, this returns null. */ +@property(nonatomic,retain, readonly) SVGElementInstance* previousSibling; + +/* The SVGElementInstance immediately following this SVGElementInstance. If there is no such SVGElementInstance, this returns null. */ +@property(nonatomic,retain, readonly) SVGElementInstance* nextSibling; + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGElementInstance.m b/Source/Core/DOM classes/SVG-DOM/SVGElementInstance.m new file mode 100644 index 000000000..53f91a33a --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGElementInstance.m @@ -0,0 +1,84 @@ +#import "SVGElementInstance.h" +#import "SVGElementInstance_Mutable.h" + +#import "SVGElementInstanceList_Internal.h" + +@implementation SVGElementInstance + +@synthesize correspondingElement; +@synthesize correspondingUseElement; +@synthesize parentNode; +@synthesize childNodes; + +-(void)setParentNode:(SVGElementInstance *)newParentNode +{ + if( newParentNode != self.parentNode ) + { + if( newParentNode == nil ) + { + /* additionally remove self from parent's childNodes */ + [self.parentNode.childNodes.internalArray removeObject:self]; + + [parentNode release]; + parentNode = newParentNode; + } + else + { + /* additionally ADD self to parent's childNodes */ + parentNode = newParentNode; + [parentNode retain]; + + NSAssert( NSNotFound != [self.parentNode.childNodes.internalArray indexOfObject:self], @"Found that I was already a child of the node that I was being added to - should be impossible!" ); + + [self.parentNode.childNodes.internalArray addObject:self]; + } + } +} + +-(SVGElementInstance *)firstChild +{ + if( [self.childNodes length] < 1 ) + return nil; + else + return [self.childNodes item:0]; +} + +-(SVGElementInstance *)lastChild +{ + if( [self.childNodes length] < 1 ) + return nil; + else + return [self.childNodes item: [self.childNodes length] - 1]; +} + +-(SVGElementInstance *)previousSibling +{ + if( self.parentNode == nil ) + return nil; + else + { + int indexInParent = [self.parentNode.childNodes.internalArray indexOfObject:self]; + + if( indexInParent < 1 ) + return nil; + else + return [self.parentNode.childNodes item:indexInParent-1]; + } +} + +-(SVGElementInstance *)nextSibling +{ + if( self.parentNode == nil ) + return nil; + else + { + int indexInParent = [self.parentNode.childNodes.internalArray indexOfObject:self]; + + if( indexInParent >= [self.parentNode.childNodes length] ) + return nil; + else + return [self.parentNode.childNodes item:indexInParent + 1]; + } +} + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.h b/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.h new file mode 100644 index 000000000..9043b5d00 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.h @@ -0,0 +1,21 @@ +/* + http://www.w3.org/TR/SVG/struct.html#InterfaceSVGElementInstanceList + + interface SVGElementInstanceList { + + readonly attribute unsigned long length; + + SVGElementInstance item(in unsigned long index); +*/ + +#import "SVGElement.h" + +@class SVGElementInstance; + +@interface SVGElementInstanceList : SVGElement + +@property(nonatomic, readonly) unsigned long length; + +-(SVGElementInstance*) item:(unsigned long) index; + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.m b/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.m new file mode 100644 index 000000000..db8eaf2e3 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList.m @@ -0,0 +1,28 @@ +#import "SVGElementInstanceList.h" +#import "SVGElementInstanceList_Internal.h" + +@implementation SVGElementInstanceList + +- (id)init +{ + self = [super init]; + if (self) { + self.internalArray = [NSMutableArray array]; + } + return self; +} + +-(unsigned long)length +{ + return [self.internalArray count]; +} + +-(SVGElementInstance*) item:(unsigned long) index +{ + if( index >= [self.internalArray count] ) + return nil; + + return [self.internalArray objectAtIndex:index]; +} + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList_Internal.h b/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList_Internal.h new file mode 100644 index 000000000..ee88221e9 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGElementInstanceList_Internal.h @@ -0,0 +1,15 @@ +// +// SVGElementInstanceList_Internal.h +// SVGKit-iOS +// +// Created by adam on 29/09/2012. +// Copyright (c) 2012 na. All rights reserved. +// + +#import "SVGElementInstanceList.h" + +@interface SVGElementInstanceList () + +@property(nonatomic,retain) NSMutableArray* internalArray; + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGElementInstance_Mutable.h b/Source/Core/DOM classes/SVG-DOM/SVGElementInstance_Mutable.h new file mode 100644 index 000000000..05ef3ea59 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGElementInstance_Mutable.h @@ -0,0 +1,8 @@ +#import "SVGElementInstance.h" + +@interface SVGElementInstance () +@property(nonatomic,retain, readwrite) SVGElement* correspondingElement; +@property(nonatomic,retain, readwrite) SVGUseElement* correspondingUseElement; +@property(nonatomic,retain, readwrite) SVGElementInstance* parentNode; +@property(nonatomic,retain, readwrite) SVGElementInstanceList* childNodes; +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGUseElement.h b/Source/Core/DOM classes/SVG-DOM/SVGUseElement.h new file mode 100644 index 000000000..e783129c1 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGUseElement.h @@ -0,0 +1,37 @@ +/* + http://www.w3.org/TR/SVG/struct.html#InterfaceSVGUseElement + + interface SVGUseElement : SVGElement, + SVGURIReference, + SVGTests, + SVGLangSpace, + SVGExternalResourcesRequired, + SVGStylable, + SVGTransformable { + readonly attribute SVGAnimatedLength x; + readonly attribute SVGAnimatedLength y; + readonly attribute SVGAnimatedLength width; + readonly attribute SVGAnimatedLength height; + readonly attribute SVGElementInstance instanceRoot; + readonly attribute SVGElementInstance animatedInstanceRoot; + }; + + */ +#import "SVGLength.h" +#import "SVGElement.h" + +@class SVGElementInstance; +#import "SVGElementInstance.h" + +#import "SVGLayeredElement.h" + +@interface SVGUseElement : SVGElement + +@property(nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; +@property(nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; +@property(nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; +@property(nonatomic, retain, readonly) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; +@property(nonatomic, retain, readonly) SVGElementInstance* instanceRoot; +@property(nonatomic, retain, readonly) SVGElementInstance* animatedInstanceRoot; + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m b/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m new file mode 100644 index 000000000..d5b37b826 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m @@ -0,0 +1,39 @@ +#import "SVGUseElement.h" +#import "SVGUseElement_Mutable.h" + +@implementation SVGUseElement + +@synthesize x; +@synthesize y; +@synthesize width; +@synthesize height; +@synthesize instanceRoot; +@synthesize animatedInstanceRoot; + +-(CALayer *)newLayer +{ + if( [instanceRoot.correspondingElement respondsToSelector:@selector(newLayer)]) + { + CALayer* initialLayer = [((SVGElement*)instanceRoot.correspondingElement) newLayer]; + + if( CGRectIsEmpty( initialLayer.frame ) ) // Avoid Apple's UIKit getting upset by infinitely large/small areas due to floating point inaccuracy + return initialLayer; + + CGAffineTransform i = initialLayer.affineTransform; + CGAffineTransform mine = self.transformRelative; + + initialLayer.affineTransform = CGAffineTransformConcat( self.transformRelative, initialLayer.affineTransform ); + + return initialLayer; + } + else + return nil; +} + +-(void)layoutLayer:(CALayer *)layer +{ + if( [instanceRoot.correspondingElement respondsToSelector:@selector(layoutLayer:)]) + [((SVGElement*)instanceRoot.correspondingElement) layoutLayer:layer]; +} + +@end diff --git a/Source/Core/DOM classes/SVG-DOM/SVGUseElement_Mutable.h b/Source/Core/DOM classes/SVG-DOM/SVGUseElement_Mutable.h new file mode 100644 index 000000000..bd9ea8cb2 --- /dev/null +++ b/Source/Core/DOM classes/SVG-DOM/SVGUseElement_Mutable.h @@ -0,0 +1,11 @@ +#import "SVGUseElement.h" + +@interface SVGUseElement () +@property(nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* x; +@property(nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* y; +@property(nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* width; +@property(nonatomic, retain, readwrite) /*FIXME: should be SVGAnimatedLength instead*/ SVGLength* height; +@property(nonatomic, retain, readwrite) SVGElementInstance* instanceRoot; +@property(nonatomic, retain, readwrite) SVGElementInstance* animatedInstanceRoot; + +@end diff --git a/Source/Core/DOM classes/SVGDefsElement.h b/Source/Core/DOM classes/SVGDefsElement.h deleted file mode 100644 index b7badf44f..000000000 --- a/Source/Core/DOM classes/SVGDefsElement.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// SVGDefsElement.h -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGElement.h" - -@interface SVGDefsElement : SVGElement { } - -@end diff --git a/Source/Core/DOM classes/SVGDefsElement.m b/Source/Core/DOM classes/SVGDefsElement.m deleted file mode 100644 index 2ae5d1f18..000000000 --- a/Source/Core/DOM classes/SVGDefsElement.m +++ /dev/null @@ -1,12 +0,0 @@ -// -// SVGDefsElement.m -// SVGKit -// -// Copyright Matt Rajca 2010-2011. All rights reserved. -// - -#import "SVGDefsElement.h" - -@implementation SVGDefsElement - -@end diff --git a/Source/Core/Parsing/SVGKParserDefsAndUse.h b/Source/Core/Parsing/SVGKParserDefsAndUse.h new file mode 100644 index 000000000..fad28bbe6 --- /dev/null +++ b/Source/Core/Parsing/SVGKParserDefsAndUse.h @@ -0,0 +1,11 @@ +/** + Parses the "" and "" tags in SVG files. + + NB: relies upon other parsers to parse the actual CONTENTS of a "defs" or "use" tag + */ +#import +#import "SVGKParserExtension.h" + +@interface SVGKParserDefsAndUse : NSObject + +@end diff --git a/Source/Core/Parsing/SVGKParserDefsAndUse.m b/Source/Core/Parsing/SVGKParserDefsAndUse.m new file mode 100644 index 000000000..3bbfc805d --- /dev/null +++ b/Source/Core/Parsing/SVGKParserDefsAndUse.m @@ -0,0 +1,119 @@ +#import "SVGKParserDefsAndUse.h" + +#import "Node.h" +#import "SVGKSource.h" +#import "SVGKParseResult.h" + +#import "SVGDefsElement.h" +#import "SVGUseElement.h" +#import "SVGUseElement_Mutable.h" +#import "SVGElementInstance.h" +#import "SVGElementInstance_Mutable.h" +#import "SVGElementInstanceList.h" +#import "SVGElement_ForParser.h" + +@implementation SVGKParserDefsAndUse + +-(NSArray*) supportedNamespaces +{ + return [NSArray arrayWithObjects: + @"http://www.w3.org/2000/svg", + nil]; +} + +/** "tags supported" is exactly the set of all SVGElement subclasses that already exist */ +-(NSArray*) supportedTags +{ + return [NSMutableArray arrayWithObjects: @"defs", @"use", nil]; +} + +-(SVGElementInstance*) convertSVGElementToElementInstanceTree:(SVGElement*) original outermostUseElement:(SVGUseElement*) outermostUseElement +{ + SVGElementInstance* instance = [[SVGElementInstance alloc] init]; + instance.correspondingElement = original; + instance.correspondingUseElement = outermostUseElement; + + for( Node* subNode in original.childNodes ) + { + if( [subNode isKindOfClass:[SVGElement class]]) + { + SVGElement* subElement = (SVGElement*) subNode; + + SVGElementInstance *newSubInstance = [self convertSVGElementToElementInstanceTree:subElement outermostUseElement:outermostUseElement]; + + newSubInstance.parentNode = instance; // side-effect: automatically adds sub as child + } + } + + return instance; +} + +- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes parseResult:(SVGKParseResult *)parseResult parentNode:(Node*) parentNode +{ + if( [[self supportedNamespaces] containsObject:XMLNSURI] ) + { + NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; + + if( [name isEqualToString:@"defs"]) + { + /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ + SVGDefsElement *element = [[[SVGDefsElement alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributes] autorelease]; + + return element; + } + else if( [name isEqualToString:@"use"]) + { + /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ + SVGUseElement *useElement = [[[SVGUseElement alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributes] autorelease]; + + [useElement postProcessAttributesAddingErrorsTo:parseResult]; // handles "transform" and "style" + + if( [attributes valueForKey:@"x"] != nil ) + useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"x"] value]]; + if( [attributes valueForKey:@"y"] != nil ) + useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"y"] value]]; + if( [attributes valueForKey:@"width"] != nil ) + useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"width"] value]]; + if( [attributes valueForKey:@"height"] != nil ) + useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"height"] value]]; + + NSString* hrefAttribute = [useElement getAttributeNS:@"http://www.w3.org/1999/xlink" localName:@"href"]; + + NSAssert( [hrefAttribute length] > 0, @"Found an SVG tag that has no 'xlink:href' attribute. File is invalid / don't know how to parse this" ); + if( [hrefAttribute length] > 0 ) + { + NSString* linkHref = [((Attr*)[attributes valueForKey:@"xlink:href"]) value]; + + NSAssert( [linkHref hasPrefix:@"#"], @"Not supported: tags that declare an href to something that DOESN'T begin with #. Href supplied = %@", linkHref ); + + linkHref = [linkHref substringFromIndex:1]; + + /** have to find the node in the DOM tree with id = xlink:href's value */ + SVGElement* linkedElement = (SVGElement*) [parseResult.parsedDocument getElementById:linkHref]; + + NSAssert( linkedElement != nil, @"Found an SVG tag that points to a non-existent element. Missing element: id = ", linkHref ); + + + useElement.instanceRoot = [self convertSVGElementToElementInstanceTree:linkedElement outermostUseElement:useElement]; + } + + return useElement; + } + } + + return nil; +} + +-(BOOL) createdNodeShouldStoreContent:(Node*) item +{ + return false; +} + +-(void) handleStringContent:(NSMutableString*) content forNode:(Node*) node +{ + SVGElement* element = (SVGElement*) node; + + [element parseContent:content]; +} + +@end diff --git a/Source/Core/Parsing/SVGKParserSVG.m b/Source/Core/Parsing/SVGKParserSVG.m index 3126426bd..e82419794 100644 --- a/Source/Core/Parsing/SVGKParserSVG.m +++ b/Source/Core/Parsing/SVGKParserSVG.m @@ -29,7 +29,6 @@ - (id)init { elementMap = [[NSDictionary dictionaryWithObjectsAndKeys: [SVGSVGElement class], @"svg", [SVGCircleElement class], @"circle", - [SVGDefsElement class], @"defs", [SVGDescriptionElement class], @"description", [SVGEllipseElement class], @"ellipse", [SVGGroupElement class], @"g", @@ -74,7 +73,7 @@ - (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource NSLog(@"Support for '%@' element has not been implemented", name); } - id style = nil; + Attr* style = nil; if ((style = [attributes objectForKey:@"style"])) { [attributes removeObjectForKey:@"style"]; diff --git a/Source/Core/SVGKImage.m b/Source/Core/SVGKImage.m index e69788e0a..c8374ed79 100644 --- a/Source/Core/SVGKImage.m +++ b/Source/Core/SVGKImage.m @@ -5,6 +5,7 @@ #import "SVGKParser.h" #import "SVGTitleElement.h" #import "SVGPathElement.h" +#import "SVGUseElement.h" #import "SVGKParserSVG.h" @@ -357,11 +358,22 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@ frame:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), NSStringFromCGRect( layer.frame ), element.identifier); - if ( element.childNodes.length < 1 ) { + NodeList* childNodes = element.childNodes; + + /** + Special handling for tags - they have to masquerade invisibly as the node they are referring to + */ + if( [element isKindOfClass:[SVGUseElement class]] ) + { + SVGUseElement* useElement = (SVGUseElement*) element; + childNodes = useElement.instanceRoot.correspondingElement.childNodes; + } + + if ( childNodes.length < 1 ) { return layer; } - for (SVGElement *child in element.childNodes ) + for (SVGElement *child in childNodes ) { if ([child conformsToProtocol:@protocol(SVGLayeredElement)]) { CALayer *sublayer = [self newLayerWithElement:(id)child]; diff --git a/Source/Core/SVGKParser.h b/Source/Core/SVGKParser.h index ba354b67c..34be4c449 100644 --- a/Source/Core/SVGKParser.h +++ b/Source/Core/SVGKParser.h @@ -72,7 +72,7 @@ - (SVGKParseResult*) parseSynchronously; -+(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css; ++(NSDictionary *) NSDictionaryFromCSSAttributes: (Attr*) styleAttribute; diff --git a/Source/Core/SVGKParser.m b/Source/Core/SVGKParser.m index 2711c9ab2..d0b64f0d0 100644 --- a/Source/Core/SVGKParser.m +++ b/Source/Core/SVGKParser.m @@ -12,6 +12,8 @@ @class SVGKParserPatternsAndGradients; #import "SVGKParserPatternsAndGradients.h" +@class SVGKParserDefsAndUse; +#import "SVGKParserDefsAndUse.h" #import "SVGDocument_Mutable.h" // so we can modify the SVGDocuments we're parsing @@ -39,6 +41,7 @@ @implementation SVGKParser static void errorEncounteredSAX(void * ctx, const char * msg, ...); static NSString *NSStringFromLibxmlString (const xmlChar *string); +static NSMutableDictionary *NSDictionaryFromLibxmlNamespaces (const xmlChar **namespaces, int namespaces_ct); static NSMutableDictionary *NSDictionaryFromLibxmlAttributes (const xmlChar **attrs, int attr_ct); + (SVGKParseResult*) parseSourceUsingDefaultSVGKParser:(SVGKSource*) source; @@ -80,9 +83,11 @@ -(void) addDefaultSVGParserExtensions { SVGKParserSVG *subParserSVG = [[[SVGKParserSVG alloc] init] autorelease]; SVGKParserPatternsAndGradients *subParserGradients = [[[SVGKParserPatternsAndGradients alloc] init] autorelease]; + SVGKParserDefsAndUse *subParserDefsAndUse = [[[SVGKParserDefsAndUse alloc] init] autorelease]; [self addParserExtension:subParserSVG]; [self addParserExtension:subParserGradients]; + [self addParserExtension:subParserDefsAndUse]; } - (void) addParserExtension:(NSObject*) extension @@ -178,7 +183,7 @@ - (void)connection:(NSURLConnection *)connection */ -- (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributes +- (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributeObjects:(NSMutableDictionary *) attributeObjects { BOOL parsingRootTag = FALSE; @@ -199,9 +204,9 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa [_stackOfParserExtensions addObject:subParser]; /** Parser Extenstion creates a node for us */ - Node* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributes parseResult:self.currentParseRun parentNode:_parentOfCurrentNode]; + Node* subParserResult = [subParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributeObjects parseResult:self.currentParseRun parentNode:_parentOfCurrentNode]; - NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([attributes objectForKey:@"id"] != nil?[attributes objectForKey:@"id"]:@"(none)"), subParser ); + NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([((Attr*)[attributeObjects objectForKey:@"id"]) value] != nil?[((Attr*)[attributeObjects objectForKey:@"id"]) value]:@"(none)"), subParser ); /** Add the new (partially parsed) node to the parent node in tree @@ -235,7 +240,7 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ - Element *blankElement = [[[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributes] autorelease]; + Element *blankElement = [[[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributeObjects] autorelease]; [_parentOfCurrentNode appendChild:blankElement]; _parentOfCurrentNode = blankElement; @@ -251,13 +256,14 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar NSString *stringLocalName = NSStringFromLibxmlString(localname); NSString *stringPrefix = NSStringFromLibxmlString(prefix); - NSMutableDictionary *attrs = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); + NSMutableDictionary *namespacesByPrefix = NSDictionaryFromLibxmlNamespaces(namespaces, nb_namespaces); + NSMutableDictionary *attributeObjects = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); NSString *stringURI = NSStringFromLibxmlString(URI); /** Set a default Namespace for rest of this document if one is included in the attributes */ if( self.defaultXMLNamespaceForThisParseRun == nil ) { - NSString* newDefaultNamespace = [attrs objectForKey:@"xmlns"]; + NSString* newDefaultNamespace = [namespacesByPrefix valueForKey:@""]; if( newDefaultNamespace != nil ) { self.defaultXMLNamespaceForThisParseRun = newDefaultNamespace; @@ -279,6 +285,12 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar stringURI = self.defaultXMLNamespaceForThisParseRun; } + for( Attr* newAttribute in attributeObjects.allValues ) + { + if( newAttribute.namespaceURI == nil ) + newAttribute.namespaceURI = self.defaultXMLNamespaceForThisParseRun; + } + #if DEBUG_VERBOSE_LOG_EVERY_TAG NSLog(@"[%@] DEBUG_VERBOSE: <%@%@> (namespace URL:%@), attributes: %i", [self class], [NSString stringWithFormat:@"%@:",stringPrefix], name, stringURI, nb_attributes ); #endif @@ -309,7 +321,7 @@ but it keeps returning nil pointer (not always, but often). WTF? Not sure what w } #endif - [self handleStartElement:stringLocalName namePrefix:stringPrefix namespaceURI:stringURI attributes:attrs]; + [self handleStartElement:stringLocalName namePrefix:stringPrefix namespaceURI:stringURI attributeObjects:attributeObjects]; } - (void)handleEndElement:(NSString *)name { @@ -481,6 +493,26 @@ static void structuredError (void * userData, return [NSString stringWithUTF8String:(const char *) string]; } +static NSMutableDictionary *NSDictionaryFromLibxmlNamespaces (const xmlChar **namespaces, int namespaces_ct) +{ + NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; + + for (int i = 0; i < namespaces_ct * 2; i += 2) + { + NSString* prefix = NSStringFromLibxmlString(namespaces[i]); + NSString* uri = NSStringFromLibxmlString(namespaces[i+1]); + + if( prefix == nil ) + prefix = @""; // Special case: Apple dictionaries can't handle null keys + + [dict setObject:uri + forKey:prefix]; + } + + return [dict autorelease]; +} + + static NSMutableDictionary *NSDictionaryFromLibxmlAttributes (const xmlChar **attrs, int attr_ct) { NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; @@ -493,8 +525,17 @@ static void structuredError (void * userData, strncpy(val, begin, vlen); val[vlen] = '\0'; - [dict setObject:[NSString stringWithUTF8String:val] - forKey:NSStringFromLibxmlString(attrs[i])]; + NSString* localName = NSStringFromLibxmlString(attrs[i]); + NSString* prefix = NSStringFromLibxmlString(attrs[i+1]); + NSString* uri = NSStringFromLibxmlString(attrs[i+2]); + NSString* value = [NSString stringWithUTF8String:val]; + + NSString* qname = (prefix == nil) ? localName : [NSString stringWithFormat:@"%@:%@", prefix, localName]; + + Attr* newAttribute = [[Attr alloc] initWithNamespace:uri qualifiedName:qname value:value]; + + [dict setObject:newAttribute + forKey:qname]; } return [dict autorelease]; @@ -503,10 +544,10 @@ static void structuredError (void * userData, #define MAX_ACCUM 256 #define MAX_NAME 256 -+(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css { ++(NSDictionary *) NSDictionaryFromCSSAttributes: (Attr*) styleAttribute { NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; - const char *cstr = [css UTF8String]; + const char *cstr = [styleAttribute.value UTF8String]; size_t len = strlen(cstr); char name[MAX_NAME]; @@ -536,8 +577,10 @@ +(NSDictionary *) NSDictionaryFromCSSAttributes: (NSString *)css { else if (c == ';' || c == '\0') { accum[accumIdx] = '\0'; - [dict setObject:[NSString stringWithUTF8String:accum] - forKey:[NSString stringWithUTF8String:name]]; + Attr* newAttribute = [[[Attr alloc] initWithNamespace:styleAttribute.namespaceURI qualifiedName:[NSString stringWithUTF8String:name] value:[NSString stringWithUTF8String:accum]] autorelease]; + + [dict setObject:newAttribute + forKey:newAttribute.localName]; bzero(name, MAX_NAME); diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m index c4fe44170..1b8c1a0ef 100644 --- a/XCodeProjectData/iOSDemo/MasterViewController.m +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -17,7 +17,7 @@ @implementation MasterViewController - (id)init { if (self) { - self.sampleNames = [NSMutableArray arrayWithObjects: @"australia_states_blank", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", nil]; + self.sampleNames = [NSMutableArray arrayWithObjects: @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", nil]; } /** Apple really sucks. They keep randomly changing which init methods they call, BREAKING ALL EXISTING CODE */ diff --git a/iOSDemo.xcodeproj/project.pbxproj b/iOSDemo.xcodeproj/project.pbxproj index ef75bb334..67153597b 100644 --- a/iOSDemo.xcodeproj/project.pbxproj +++ b/iOSDemo.xcodeproj/project.pbxproj @@ -23,7 +23,6 @@ 661D721A16177537005899EA /* Map.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720916177537005899EA /* Map.svg */; }; 661D721B16177537005899EA /* Monkey.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720A16177537005899EA /* Monkey.svg */; }; 661D721C16177537005899EA /* Note.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720B16177537005899EA /* Note.svg */; }; - 661D721D16177537005899EA /* Reinel_compass_rose-ADAM.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720C16177537005899EA /* Reinel_compass_rose-ADAM.svg */; }; 661D721E16177537005899EA /* test-wave-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720D16177537005899EA /* test-wave-1.svg */; }; 661D721F16177537005899EA /* Text.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720E16177537005899EA /* Text.svg */; }; 661D722016177537005899EA /* uk-only.svg in Resources */ = {isa = PBXBuildFile; fileRef = 661D720F16177537005899EA /* uk-only.svg */; }; @@ -39,6 +38,7 @@ 6649E0AD1617479200AFE92A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E0AC1617479200AFE92A /* QuartzCore.framework */; }; 6649E10D1617577000AFE92A /* libSVGKit-iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10A1617574700AFE92A /* libSVGKit-iOS.a */; }; 6649E10F1617578500AFE92A /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10E1617578500AFE92A /* libxml2.dylib */; }; + 6649F5001617CF2900F1A064 /* Reinel_compass_rose.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -97,6 +97,7 @@ 6649E0AC1617479200AFE92A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "SVGKit-iOS.xcodeproj"; sourceTree = ""; }; 6649E10E1617578500AFE92A /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; + 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = Reinel_compass_rose.svg; path = Samples/SVG/Reinel_compass_rose.svg; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -119,6 +120,7 @@ 661A0DBF161727CF008D5FBE = { isa = PBXGroup; children = ( + 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */, 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */, 6649E0AC1617479200AFE92A /* QuartzCore.framework */, 6649E06716172D4200AFE92A /* iOSDemo */, @@ -285,6 +287,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 6649F5001617CF2900F1A064 /* Reinel_compass_rose.svg in Resources */, 6649E07F16172D4200AFE92A /* InfoPlist.strings in Resources */, 661D721016177537005899EA /* Monkey.png in Resources */, 661D721116177537005899EA /* Note.png in Resources */, @@ -299,7 +302,6 @@ 661D721A16177537005899EA /* Map.svg in Resources */, 661D721B16177537005899EA /* Monkey.svg in Resources */, 661D721C16177537005899EA /* Note.svg in Resources */, - 661D721D16177537005899EA /* Reinel_compass_rose-ADAM.svg in Resources */, 661D721E16177537005899EA /* test-wave-1.svg in Resources */, 661D721F16177537005899EA /* Text.svg in Resources */, 661D722016177537005899EA /* uk-only.svg in Resources */, From 609b566d2113457bdb2e69c4ced5320c542ecdea Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 20 Oct 2012 12:50:04 +0100 Subject: [PATCH 082/110] Minor tweak - making the hash define clearer --- Source/Core/SVGKImage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/SVGKImage.h b/Source/Core/SVGKImage.h index d5ea73455..1bd290f48 100644 --- a/Source/Core/SVGKImage.h +++ b/Source/Core/SVGKImage.h @@ -47,7 +47,7 @@ #import "SVGKSource.h" #import "SVGKParseResult.h" -#define ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED // if ENABLED, then ALL instances created with imageNamed: are shared, and are NEVER RELEASED +#define ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED 1 // if ENABLED, then ALL instances created with imageNamed: are shared, and are NEVER RELEASED @class SVGDefsElement; From 7d156df44347545a18c8ac07c1e6dcf518f65bf9 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 20 Oct 2012 15:45:20 +0100 Subject: [PATCH 083/110] ADDED: if no parser is found for a particular XML tag, a "default, last-resort" parser-extension is used instead. SVGKParserDOM is the default one for this - it treats every XML tag as a plain XML tag (i.e. "Element" subclass), and has no special handling. It will also spew warnings about the fact you have failed to provide parsers for one or more of your namespaces, or your default namespace is missing. FIXED: lots of minor memory leaks IMPROVED: the GUI was slightly offset, so that the horizontal scrollbar was hidden --- Default-568h@2x.png | Bin 0 -> 18594 bytes SVGKit-iOS.xcodeproj/project.pbxproj | 8 + Source/Core/DOM classes/Core DOM/Document.h | 15 +- Source/Core/DOM classes/Core DOM/Document.m | 12 +- Source/Core/DOM classes/Core DOM/Element.m | 2 +- .../Core/DOM classes/Core DOM/NamedNodeMap.h | 4 + .../Core/DOM classes/Core DOM/NamedNodeMap.m | 35 +- .../Core/DOM classes/SVG-DOM/SVGUseElement.m | 4 +- Source/Core/Parsing/SVGKParserDOM.h | 13 + Source/Core/Parsing/SVGKParserDOM.m | 92 +++++ Source/Core/Parsing/SVGKParserDefsAndUse.m | 10 +- Source/Core/SVGKImageView.m | 41 +- Source/Core/SVGKParser.m | 123 ++++-- .../iOSDemo/DetailViewController.m | 31 +- .../en.lproj/MasterViewController_iPad.xib | 91 +++- .../en.lproj/MasterViewController_iPhone.xib | 92 ++++- .../en.lproj/iPadDetailViewController.xib | 390 ------------------ .../en.lproj/iPhoneDetailViewController.xib | 376 +---------------- iOSDemo.xcodeproj/project.pbxproj | 4 + 19 files changed, 490 insertions(+), 853 deletions(-) create mode 100644 Default-568h@2x.png create mode 100644 Source/Core/Parsing/SVGKParserDOM.h create mode 100644 Source/Core/Parsing/SVGKParserDOM.m diff --git a/Default-568h@2x.png b/Default-568h@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0891b7aabfcf3422423b109c8beed2bab838c607 GIT binary patch literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u literal 0 HcmV?d00001 diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 465d1ea4f..c3d640ab4 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 661008911632E30B00DD3C38 /* SVGKParserDOM.h */; }; + 661008941632E30B00DD3C38 /* SVGKParserDOM.m in Sources */ = {isa = PBXBuildFile; fileRef = 661008921632E30B00DD3C38 /* SVGKParserDOM.m */; }; 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639619116145D0400E58CCA /* Foundation.framework */; }; 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639633F16145DDC00E58CCA /* libxml2.dylib */; }; 6639634216148CDF00E58CCA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639634116148CDF00E58CCA /* QuartzCore.framework */; }; @@ -158,6 +160,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 661008911632E30B00DD3C38 /* SVGKParserDOM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKParserDOM.h; sourceTree = ""; }; + 661008921632E30B00DD3C38 /* SVGKParserDOM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKParserDOM.m; sourceTree = ""; }; 6639618E16145D0400E58CCA /* libSVGKit-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSVGKit-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6639619116145D0400E58CCA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6639633F16145DDC00E58CCA /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; @@ -575,6 +579,8 @@ 6649DFCF16172CCC00AFE92A /* SVGKPointsAndPathsParser.m */, 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */, 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */, + 661008911632E30B00DD3C38 /* SVGKParserDOM.h */, + 661008921632E30B00DD3C38 /* SVGKParserDOM.m */, ); path = Parsing; sourceTree = ""; @@ -691,6 +697,7 @@ 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, + 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -822,6 +829,7 @@ 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */, 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */, 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */, + 661008941632E30B00DD3C38 /* SVGKParserDOM.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/Core/DOM classes/Core DOM/Document.h b/Source/Core/DOM classes/Core DOM/Document.h index c974fa87f..2bb20458c 100644 --- a/Source/Core/DOM classes/Core DOM/Document.h +++ b/Source/Core/DOM classes/Core DOM/Document.h @@ -83,13 +83,14 @@ -(Element*) createElement:(NSString*) tagName __attribute__((ns_returns_retained)); --(DocumentFragment*) createDocumentFragment; --(Text*) createTextNode:(NSString*) data; --(Comment*) createComment:(NSString*) data; --(CDATASection*) createCDATASection:(NSString*) data; --(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(NSString*) data; --(Attr*) createAttribute:(NSString*) data; --(EntityReference*) createEntityReference:(NSString*) data; +-(DocumentFragment*) createDocumentFragment __attribute__((ns_returns_retained)); +-(Text*) createTextNode:(NSString*) data __attribute__((ns_returns_retained)); +-(Comment*) createComment:(NSString*) data __attribute__((ns_returns_retained)); +-(CDATASection*) createCDATASection:(NSString*) data __attribute__((ns_returns_retained)); +-(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(NSString*) data __attribute__((ns_returns_retained)); +-(Attr*) createAttribute:(NSString*) data __attribute__((ns_returns_retained)); +-(EntityReference*) createEntityReference:(NSString*) data __attribute__((ns_returns_retained)); + -(NodeList*) getElementsByTagName:(NSString*) data; // Introduced in DOM Level 2: diff --git a/Source/Core/DOM classes/Core DOM/Document.m b/Source/Core/DOM classes/Core DOM/Document.m index e56c96f56..517e93498 100644 --- a/Source/Core/DOM classes/Core DOM/Document.m +++ b/Source/Core/DOM classes/Core DOM/Document.m @@ -27,32 +27,32 @@ -(Element*) createElement:(NSString*) tagName -(DocumentFragment*) createDocumentFragment { - return [[[DocumentFragment alloc] init] autorelease]; + return [[DocumentFragment alloc] init]; } -(Text*) createTextNode:(NSString*) data { - return [[[Text alloc] initWithValue:data] autorelease]; + return [[Text alloc] initWithValue:data]; } -(Comment*) createComment:(NSString*) data { - return [[[Comment alloc] initWithValue:data] autorelease]; + return [[Comment alloc] initWithValue:data]; } -(CDATASection*) createCDATASection:(NSString*) data { - return [[[CDATASection alloc] initWithValue:data] autorelease]; + return [[CDATASection alloc] initWithValue:data]; } -(ProcessingInstruction*) createProcessingInstruction:(NSString*) target data:(NSString*) data { - return [[[ProcessingInstruction alloc] initProcessingInstruction:target value:data] autorelease]; + return [[ProcessingInstruction alloc] initProcessingInstruction:target value:data]; } -(Attr*) createAttribute:(NSString*) n { - return [[[Attr alloc] initWithName:n value:@""] autorelease]; + return [[Attr alloc] initWithName:n value:@""]; } -(EntityReference*) createEntityReference:(NSString*) data diff --git a/Source/Core/DOM classes/Core DOM/Element.m b/Source/Core/DOM classes/Core DOM/Element.m index 1f8db54d0..d9ef2ff2c 100644 --- a/Source/Core/DOM classes/Core DOM/Element.m +++ b/Source/Core/DOM classes/Core DOM/Element.m @@ -30,7 +30,7 @@ - (id)initWithQualifiedName:(NSString*) n inNameSpaceURI:(NSString*) nsURI attri for( Attr* attribute in attributes.allValues ) { - [self.attributes setNamedItemNS:attribute]; + [self.attributes setNamedItemNS:attribute inNodeNamespace:nsURI]; } } return self; diff --git a/Source/Core/DOM classes/Core DOM/NamedNodeMap.h b/Source/Core/DOM classes/Core DOM/NamedNodeMap.h index 403f83c86..2465dda2d 100644 --- a/Source/Core/DOM classes/Core DOM/NamedNodeMap.h +++ b/Source/Core/DOM classes/Core DOM/NamedNodeMap.h @@ -48,4 +48,8 @@ // Introduced in DOM Level 2: -(Node*) removeNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName; +#pragma mark - MISSING METHOD FROM SVG Spec, without which you cannot parse documents (don't understand how they intended you to fulfil the spec without this method) + +-(Node*) setNamedItemNS:(Node*) arg inNodeNamespace:(NSString*) nodesNamespace; + @end diff --git a/Source/Core/DOM classes/Core DOM/NamedNodeMap.m b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m index 9786fff88..d4db1675c 100644 --- a/Source/Core/DOM classes/Core DOM/NamedNodeMap.m +++ b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -127,17 +127,7 @@ -(Node*) getNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localName // Introduced in DOM Level 2: -(Node*) setNamedItemNS:(Node*) arg { - NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:arg.namespaceURI]; - if( namespaceDict == nil ) - { - namespaceDict = [NSMutableDictionary dictionary]; - [self.internalDictionaryOfNamespaces setObject:namespaceDict forKey:arg.namespaceURI]; - } - Node* oldNode = [namespaceDict objectForKey:arg.localName]; - - [namespaceDict setObject:arg forKey:arg.localName]; - - return oldNode; + return [self setNamedItemNS:arg inNodeNamespace:nil]; } // Introduced in DOM Level 2: @@ -151,6 +141,29 @@ -(Node*) removeNamedItemNS:(NSString*) namespaceURI localName:(NSString*) localN return oldNode; } +#pragma mark - MISSING METHOD FROM SVG Spec, without which you cannot parse documents (don't understand how they intended you to fulfil the spec without this method) + +-(Node*) setNamedItemNS:(Node*) arg inNodeNamespace:(NSString*) nodesNamespace +{ + NSString* effectiveNamespace = arg.namespaceURI != nil ? arg.namespaceURI : nodesNamespace; + if( effectiveNamespace == nil ) + { + return [self setNamedItem:arg]; // this should never happen, but there's a lot of malformed SVG files out in the wild + } + + NSMutableDictionary* namespaceDict = [self.internalDictionaryOfNamespaces objectForKey:effectiveNamespace]; + if( namespaceDict == nil ) + { + namespaceDict = [NSMutableDictionary dictionary]; + [self.internalDictionaryOfNamespaces setObject:namespaceDict forKey:effectiveNamespace]; + } + Node* oldNode = [namespaceDict objectForKey:arg.localName]; + + [namespaceDict setObject:arg forKey:arg.localName]; + + return oldNode; +} + #pragma mark - ADDITIONAL to SVG Spec: useful debug / output / description methods -(NSString *)description diff --git a/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m b/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m index d5b37b826..5f8aa9daa 100644 --- a/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m +++ b/Source/Core/DOM classes/SVG-DOM/SVGUseElement.m @@ -19,8 +19,8 @@ -(CALayer *)newLayer if( CGRectIsEmpty( initialLayer.frame ) ) // Avoid Apple's UIKit getting upset by infinitely large/small areas due to floating point inaccuracy return initialLayer; - CGAffineTransform i = initialLayer.affineTransform; - CGAffineTransform mine = self.transformRelative; + //For Xcode's broken debugger: CGAffineTransform i = initialLayer.affineTransform; + //For Xcode's broken debugger: CGAffineTransform mine = self.transformRelative; initialLayer.affineTransform = CGAffineTransformConcat( self.transformRelative, initialLayer.affineTransform ); diff --git a/Source/Core/Parsing/SVGKParserDOM.h b/Source/Core/Parsing/SVGKParserDOM.h new file mode 100644 index 000000000..9b5cec181 --- /dev/null +++ b/Source/Core/Parsing/SVGKParserDOM.h @@ -0,0 +1,13 @@ +/** + According to the DOM spec, all nodes in an XML document must be parsed; if we lack specific information for them, + i.e. if we have no other, more specific, parser - then we must parse them as the most basic objects, i.e. Node, + Element, etc + + This is a special, magical parser that matches "no namespace" - i.e. matches what happens when no namspace was declared\ + */ +#import +#import "SVGKParserExtension.h" + +@interface SVGKParserDOM : NSObject + +@end diff --git a/Source/Core/Parsing/SVGKParserDOM.m b/Source/Core/Parsing/SVGKParserDOM.m new file mode 100644 index 000000000..bcd9b5719 --- /dev/null +++ b/Source/Core/Parsing/SVGKParserDOM.m @@ -0,0 +1,92 @@ +#import "SVGKParserDOM.h" + +#import "Node+Mutable.h" + +@implementation SVGKParserDOM + +/** + This is a special, magical parser that matches "no namespace" - i.e. matches what happens when no namespace was declared\ + */ +-(NSArray*) supportedNamespaces +{ + return [NSArray array]; +} + +/** + This is a special, magical parser that matches "all tags" + */ +-(NSArray*) supportedTags +{ + return [NSMutableArray array]; +} + +- (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource namePrefix:(NSString*)prefix namespaceURI:(NSString*) XMLNSURI attributes:(NSMutableDictionary *)attributeObjects parseResult:(SVGKParseResult *)parseResult parentNode:(Node*) parentNode +{ + if( [[self supportedNamespaces] count] == 0 + || [[self supportedNamespaces] containsObject:XMLNSURI] ) // unnecesary here, but allows safe updates to this parser's matching later + { + NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; + + /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ + // FIXME: we always return an empty Element here; for DOM spec, should we be detecting things like "comment" nodes? I dont know how libxml handles those and sends them to us. I've never seen one in action... + Element *blankElement = [[[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributeObjects] autorelease]; + + return blankElement; + } + + return nil; +} + +-(BOOL) createdNodeShouldStoreContent:(Node*) item +{ + switch( item.nodeType ) + { + case SKNodeType_ATTRIBUTE_NODE: + case SKNodeType_DOCUMENT_FRAGMENT_NODE: + case SKNodeType_DOCUMENT_NODE: + case SKNodeType_DOCUMENT_TYPE_NODE: + case SKNodeType_ELEMENT_NODE: + case SKNodeType_ENTITY_NODE: + case SKNodeType_ENTITY_REFERENCE_NODE: + case SKNodeType_NOTATION_NODE: + { + return FALSE; // do nothing, according to the table in : http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + } break; + + case SKNodeType_CDATA_SECTION_NODE: + case SKNodeType_COMMENT_NODE: + case SKNodeType_PROCESSING_INSTRUCTION_NODE: + case SKNodeType_TEXT_NODE: + { + return TRUE; + } break; + } +} + +-(void) handleStringContent:(NSMutableString*) content forNode:(Node*) node +{ + switch( node.nodeType ) + { + case SKNodeType_ATTRIBUTE_NODE: + case SKNodeType_DOCUMENT_FRAGMENT_NODE: + case SKNodeType_DOCUMENT_NODE: + case SKNodeType_DOCUMENT_TYPE_NODE: + case SKNodeType_ELEMENT_NODE: + case SKNodeType_ENTITY_NODE: + case SKNodeType_ENTITY_REFERENCE_NODE: + case SKNodeType_NOTATION_NODE: + { + // do nothing, according to the table in : http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 + } break; + + case SKNodeType_CDATA_SECTION_NODE: + case SKNodeType_COMMENT_NODE: + case SKNodeType_PROCESSING_INSTRUCTION_NODE: + case SKNodeType_TEXT_NODE: + { + node.nodeValue = content; + } break; + } +} + +@end diff --git a/Source/Core/Parsing/SVGKParserDefsAndUse.m b/Source/Core/Parsing/SVGKParserDefsAndUse.m index 3bbfc805d..b72b25a99 100644 --- a/Source/Core/Parsing/SVGKParserDefsAndUse.m +++ b/Source/Core/Parsing/SVGKParserDefsAndUse.m @@ -29,7 +29,7 @@ -(NSArray*) supportedTags -(SVGElementInstance*) convertSVGElementToElementInstanceTree:(SVGElement*) original outermostUseElement:(SVGUseElement*) outermostUseElement { - SVGElementInstance* instance = [[SVGElementInstance alloc] init]; + SVGElementInstance* instance = [[[SVGElementInstance alloc] init] autorelease]; instance.correspondingElement = original; instance.correspondingUseElement = outermostUseElement; @@ -69,13 +69,13 @@ - (Node*) handleStartElement:(NSString *)name document:(SVGKSource*) SVGKSource [useElement postProcessAttributesAddingErrorsTo:parseResult]; // handles "transform" and "style" if( [attributes valueForKey:@"x"] != nil ) - useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"x"] value]]; + useElement.x = [SVGLength svgLengthFromNSString:[((Attr*)[attributes valueForKey:@"x"]) value]]; if( [attributes valueForKey:@"y"] != nil ) - useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"y"] value]]; + useElement.x = [SVGLength svgLengthFromNSString:[((Attr*)[attributes valueForKey:@"y"]) value]]; if( [attributes valueForKey:@"width"] != nil ) - useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"width"] value]]; + useElement.x = [SVGLength svgLengthFromNSString:[((Attr*)[attributes valueForKey:@"width"]) value]]; if( [attributes valueForKey:@"height"] != nil ) - useElement.x = [SVGLength svgLengthFromNSString:[[attributes valueForKey:@"height"] value]]; + useElement.x = [SVGLength svgLengthFromNSString:[((Attr*)[attributes valueForKey:@"height"]) value]]; NSString* hrefAttribute = [useElement getAttributeNS:@"http://www.w3.org/1999/xlink" localName:@"href"]; diff --git a/Source/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m index 725bd38e8..61b2e28cf 100755 --- a/Source/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -1,6 +1,9 @@ #import "SVGKImageView.h" @implementation SVGKImageView +{ + NSString* internalContextPointerBecauseApplesDemandsIt; +} @synthesize image = _image; @synthesize scaleMultiplier = _scaleMultiplier; @@ -13,29 +16,58 @@ - (id)init return nil; } +- (id)initWithCoder:(NSCoder *)aDecoder +{ + return [self initWithSVGKImage:nil]; +} + - (id)initWithSVGKImage:(SVGKImage*) im { + if( im == nil ) + { + NSLog(@"[%@] WARNING: you have initialized an SVGKImageView with a blank image (nil). Possibly because you're using Storyboars or NIBs which Apple won't allow anyone to use with 3rd party code", [self class]); + } + self = [super init]; if (self) { + internalContextPointerBecauseApplesDemandsIt = @"Apple wrote the addObserver / KVO notification API wrong in the first place and now requires developers to pass around pointers to fake objects to make up for the API deficicineces. You have to have one of these pointers per object, and they have to be internal and private. They serve no real value."; + self.image = im; self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image self.scaleMultiplier = CGSizeMake(1.0, 1.0); self.backgroundColor = [UIColor clearColor]; - [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:nil]; - [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:nil]; - + [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"scaleMultiplier" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"tileContents" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; } return self; } +- (void)dealloc +{ + [self removeObserver:self forKeyPath:@"layer" context:internalContextPointerBecauseApplesDemandsIt]; + [self.layer removeObserver:self forKeyPath:@"transform" context:internalContextPointerBecauseApplesDemandsIt]; + + [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"scaleMultiplier" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"tileContents" context:internalContextPointerBecauseApplesDemandsIt]; + + self.image = nil; + + [super dealloc]; +} + /** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - //[self setNeedsDisplay]; + [self setNeedsDisplay]; } +#if APPLE_KVO_ISNT_WORKING /** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ -(void)setImage:(SVGKImage *)newImage @@ -64,6 +96,7 @@ -(void)setTileContents:(BOOL)newTileContents [self setNeedsDisplay]; } +#endif -(void)drawRect:(CGRect)rect { diff --git a/Source/Core/SVGKParser.m b/Source/Core/SVGKParser.m index d0b64f0d0..69f994cbc 100644 --- a/Source/Core/SVGKParser.m +++ b/Source/Core/SVGKParser.m @@ -14,6 +14,8 @@ #import "SVGKParserPatternsAndGradients.h" @class SVGKParserDefsAndUse; #import "SVGKParserDefsAndUse.h" +@class SVGKParserDOM; +#import "SVGKParserDOM.h" #import "SVGDocument_Mutable.h" // so we can modify the SVGDocuments we're parsing @@ -84,14 +86,18 @@ -(void) addDefaultSVGParserExtensions SVGKParserSVG *subParserSVG = [[[SVGKParserSVG alloc] init] autorelease]; SVGKParserPatternsAndGradients *subParserGradients = [[[SVGKParserPatternsAndGradients alloc] init] autorelease]; SVGKParserDefsAndUse *subParserDefsAndUse = [[[SVGKParserDefsAndUse alloc] init] autorelease]; + SVGKParserDOM *subParserXMLDOM = [[[SVGKParserDOM alloc] init] autorelease]; [self addParserExtension:subParserSVG]; [self addParserExtension:subParserGradients]; [self addParserExtension:subParserDefsAndUse]; + [self addParserExtension:subParserXMLDOM]; } - (void) addParserExtension:(NSObject*) extension { + // TODO: Should check for conflicts between this parser-extension and our existing parser-extensions, and issue warnings for any we find + if( self.parserExtensions == nil ) { self.parserExtensions = [NSMutableArray array]; @@ -196,8 +202,36 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa (most tags are handled by the default SVGParserSVG - but if you have other XML embedded in your SVG, you'll have custom parser extentions too) */ + NSObject* defaultParserForThisNamespace = nil; + NSObject* defaultParserForEverything = nil; for( NSObject* subParser in self.parserExtensions ) { + // TODO: rather than checking for the default parser on every node, we should stick them in a Dictionar at the start and re-use them when needed + /** + First: check if this parser is a "default" / fallback parser. If so, skip it, and only use it + AT THE VERY END after checking all other parsers + */ + BOOL shouldBreakBecauseParserIsADefault = FALSE; + + if( [[subParser supportedNamespaces] count] == 0 ) + { + defaultParserForEverything = subParser; + shouldBreakBecauseParserIsADefault = TRUE; + } + + if( [[subParser supportedNamespaces] containsObject:XMLNSURI] + && [[subParser supportedTags] count] == 0 ) + { + defaultParserForThisNamespace = subParser; + shouldBreakBecauseParserIsADefault = TRUE; + } + + if( shouldBreakBecauseParserIsADefault ) + continue; + + /** + Now we know it's a specific parser, check if it handles this particular node + */ if( [[subParser supportedNamespaces] containsObject:XMLNSURI] && [[subParser supportedTags] containsObject:name] ) { @@ -232,19 +266,49 @@ - (void)handleStartElement:(NSString *)name namePrefix:(NSString*)prefix namespa return; } - // otherwise ignore it - the parser extension didn't recognise the element } - /*! this was an unmatched tag - we have no parser for it, so we're pruning it from the tree */ - NSLog(@"[%@] WARN: found an unrecognized tag () - this will get an empty, dumb Node in the DOM", [self class], name ); + /** + IF we had a specific matching parser, we would have returned already. + + Since we haven't, it means we have to try the default parsers instead + */ + NSObject* eventualParser = defaultParserForThisNamespace != nil ? defaultParserForThisNamespace : defaultParserForEverything; + NSAssert( eventualParser != nil, @"Found a tag (prefix:%@ name:%@) that was rejected by all the parsers available. Perhaps you forgot to include a default parser (usually: SVGKParserDOM, which will handle any / all XML tags)", prefix, name ); + + NSLog(@"[%@] WARN: found a tag with no namespace parser: (), using default parser(%@)", [self class], name, eventualParser ); + + + [_stackOfParserExtensions addObject:eventualParser]; - NSString* qualifiedName = (prefix == nil) ? name : [NSString stringWithFormat:@"%@:%@", prefix, name]; - /** NB: must supply a NON-qualified name if we have no specific prefix here ! */ - Element *blankElement = [[[Element alloc] initWithQualifiedName:qualifiedName inNameSpaceURI:XMLNSURI attributes:attributeObjects] autorelease]; - [_parentOfCurrentNode appendChild:blankElement]; - _parentOfCurrentNode = blankElement; + /** Parser Extenstion creates a node for us */ + Node* subParserResult = [eventualParser handleStartElement:name document:source namePrefix:prefix namespaceURI:XMLNSURI attributes:attributeObjects parseResult:self.currentParseRun parentNode:_parentOfCurrentNode]; - [_stackOfParserExtensions addObject:[NSNull null]]; // so that we can later detect that this tag was NOT parsed + NSLog(@"[%@] tag: <%@:%@> id=%@ -- handled by subParser: %@", [self class], prefix, name, ([((Attr*)[attributeObjects objectForKey:@"id"]) value] != nil?[((Attr*)[attributeObjects objectForKey:@"id"]) value]:@"(none)"), eventualParser ); + + /** Add the new (partially parsed) node to the parent node in tree + + (need this for some of the parsing, later on, where we need to be able to read up + the tree to make decisions about the data - this is REQUIRED by the SVG Spec) + */ + [_parentOfCurrentNode appendChild:subParserResult]; // this is a DOM method: should NOT have side-effects + _parentOfCurrentNode = subParserResult; + + + if ([eventualParser createdNodeShouldStoreContent:subParserResult]) { + [_storedChars setString:@""]; + _storingChars = YES; + } + else { + _storingChars = NO; + } + + if( parsingRootTag ) + { + currentParseRun.parsedDocument.rootElement = (SVGSVGElement*) subParserResult; + } + + return; } @@ -321,6 +385,11 @@ but it keeps returning nil pointer (not always, but often). WTF? Not sure what w } #endif + if( stringURI == nil && stringPrefix == nil ) + { + NSLog(@"[%@] WARNING: Your input SVG contains tags that have no namespace, and your document doesn't define a default namespace. This is always incorrect - it means some of your SVG data will be ignored, and usually means you have a typo in there somewhere. Tag with no namespace: <%@>", [self class], stringLocalName ); + } + [self handleStartElement:stringLocalName namePrefix:stringPrefix namespaceURI:stringURI attributeObjects:attributeObjects]; } @@ -332,29 +401,21 @@ - (void)handleEndElement:(NSString *)name { [_stackOfParserExtensions removeLastObject]; - if( lastobject == [NSNull null] ) - { - /*! this was an unmatched tag - we have no parser for it, so we're pruning it from the tree */ - NSLog(@"[%@] WARN: ended non-parsed tag () - this will NOT be added to the output tree", [self class], name ); - } - else - { - NSObject* parser = (NSObject*)lastobject; - NSObject* parentParser = [_stackOfParserExtensions lastObject]; - + NSObject* parser = (NSObject*)lastobject; + NSObject* parentParser = [_stackOfParserExtensions lastObject]; - NSLog(@"[%@] DEBUG-PARSER: ended tag (), handled by parser (%@) with parent parsed by %@", [self class], name, parser, parentParser ); + + NSLog(@"[%@] DEBUG-PARSER: ended tag (), handled by parser (%@) with parent parsed by %@", [self class], name, parser, parentParser ); + + /** + At this point, the "parent of current node" is still set to the node we're + closing - because we haven't finished closing it yet + */ + if ( [parser createdNodeShouldStoreContent:_parentOfCurrentNode]) { + [parser handleStringContent:_storedChars forNode:_parentOfCurrentNode]; - /** - At this point, the "parent of current node" is still set to the node we're - closing - because we haven't finished closing it yet - */ - if ( [parser createdNodeShouldStoreContent:_parentOfCurrentNode]) { - [parser handleStringContent:_storedChars forNode:_parentOfCurrentNode]; - - [_storedChars setString:@""]; - _storingChars = NO; - } + [_storedChars setString:@""]; + _storingChars = NO; } /** Update the _parentOfCurrentNode to point to the parent of the node we just closed... @@ -532,7 +593,7 @@ static void structuredError (void * userData, NSString* qname = (prefix == nil) ? localName : [NSString stringWithFormat:@"%@:%@", prefix, localName]; - Attr* newAttribute = [[Attr alloc] initWithNamespace:uri qualifiedName:qname value:value]; + Attr* newAttribute = [[[Attr alloc] initWithNamespace:uri qualifiedName:qname value:value] autorelease]; [dict setObject:newAttribute forKey:qname]; diff --git a/XCodeProjectData/iOSDemo/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m index 38672ed1a..275c649f9 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -40,13 +40,29 @@ - (void)dealloc { self.toolbar = nil; self.detailItem = nil; + self.name = nil; + self.exportText = nil; + self.exportLog = nil; + self.layerExporter = nil; + self.scrollViewForSVG = nil; + self.contentView = nil; + self.viewActivityIndicator = nil; + [super dealloc]; } #pragma mark - CRITICAL: this method makes Apple render SVGs in sharp focus --(void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale +-(void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)finalScale { + /** NB: very important! The "finalScale" paramter to this method is SLIGHTLY DIFFERENT from the scale that Apple reports in the other delegate methods + + This is very confusing, clearly it's bit of a hack - the other methods get called + at slightly the wrong time, and so their data is slightly wrong (out-by-one animation step). + + ONLY the values passed as params to this method are correct! + */ + /** Apple's implementation of zooming is EXTREMELY poorly designed; it's a hack onto a class @@ -62,7 +78,7 @@ that was only designed to do panning (hence the name: uiSCROLLview) but that's how Apple has documented / implemented it!) */ view.transform = CGAffineTransformIdentity; // this alters view.frame! But *not* view.bounds - view.bounds = CGRectApplyAffineTransform( view.bounds, CGAffineTransformMakeScale(scale, scale)); + view.bounds = CGRectApplyAffineTransform( view.bounds, CGAffineTransformMakeScale(finalScale, finalScale)); [view setNeedsDisplay]; /** @@ -72,8 +88,8 @@ that was only designed to do panning (hence the name: uiSCROLLview) ... because they "forgot" to store it anywhere (they read your view.transform as if it were a private variable inside UIScrollView! This causes MANY bugs in applications :( ) */ - self.scrollViewForSVG.minimumZoomScale /= scale; - self.scrollViewForSVG.maximumZoomScale /= scale; + self.scrollViewForSVG.minimumZoomScale /= finalScale; + self.scrollViewForSVG.maximumZoomScale /= finalScale; } #pragma mark - rest of class @@ -83,7 +99,8 @@ - (void)setDetailItem:(id)newDetailItem { [detailItem release]; detailItem = [newDetailItem retain]; - self.view; // REQUIRED: this class is badly designed, it relies upon the view being visible before .detailedItem is set :( + // FIXME: re-write this class so that this method does NOT require self.view to exist + [self view]; // Apple's design to trigger the creation of view. Original design of THIS class is that it breaks if view isn't already existing [self loadResource:newDetailItem]; } @@ -103,7 +120,7 @@ - (void)loadResource:(NSString *)name if( document == nil ) { - [[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:@"Total failure. See console log" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [[[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:@"Total failure. See console log" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease] show]; } else { @@ -133,7 +150,7 @@ - (void)loadResource:(NSString *)name } else { - [[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:[NSString stringWithFormat:@"%i fatal errors, %i warnings. First fatal = %@",[document.parseErrorsAndWarnings.errorsFatal count],[document.parseErrorsAndWarnings.errorsRecoverable count]+[document.parseErrorsAndWarnings.warnings count], ((NSError*)[document.parseErrorsAndWarnings.errorsFatal objectAtIndex:0]).localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; + [[[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:[NSString stringWithFormat:@"%i fatal errors, %i warnings. First fatal = %@",[document.parseErrorsAndWarnings.errorsFatal count],[document.parseErrorsAndWarnings.errorsRecoverable count]+[document.parseErrorsAndWarnings.warnings count], ((NSError*)[document.parseErrorsAndWarnings.errorsFatal objectAtIndex:0]).localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease] show]; } } diff --git a/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib index 6f143d684..3374145cc 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPad.xib @@ -2,13 +2,13 @@ 1536 - 12A206j - 2519 - 1172.1 - 613.00 + 12C54 + 2840 + 1187.34 + 625.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1856 + 1926 IBProxyObject @@ -141,12 +141,87 @@ 5 - + + + + DetailViewController + UIViewController + + id + id + + + + animate: + id + + + exportLayers: + id + + + + SVGKImageView + UIScrollView + UIToolbar + UIActivityIndicatorView + + + + contentView + SVGKImageView + + + scrollViewForSVG + UIScrollView + + + toolbar + UIToolbar + + + viewActivityIndicator + UIActivityIndicatorView + + + + IBProjectSource + ./Classes/DetailViewController.h + + + + MasterViewController + UITableViewController + + detailViewController + DetailViewController + + + detailViewController + + detailViewController + DetailViewController + + + + IBProjectSource + ./Classes/MasterViewController.h + + + + SVGKImageView + UIView + + IBProjectSource + ./Classes/SVGKImageView.h + + + + 0 IBIPadFramework YES 3 - YES - 1856 + 1926 diff --git a/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib index 04c74ca2e..cf8d86b84 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/MasterViewController_iPhone.xib @@ -2,13 +2,13 @@ 1536 - 12A269 - 2835 - 1187 - 624.00 + 12C54 + 2840 + 1187.34 + 625.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1919 + 1926 IBProxyObject @@ -36,7 +36,6 @@ {{0, 20}, {320, 548}} - 3 MQA @@ -136,12 +135,87 @@ 5 - + + + + DetailViewController + UIViewController + + id + id + + + + animate: + id + + + exportLayers: + id + + + + SVGKImageView + UIScrollView + UIToolbar + UIActivityIndicatorView + + + + contentView + SVGKImageView + + + scrollViewForSVG + UIScrollView + + + toolbar + UIToolbar + + + viewActivityIndicator + UIActivityIndicatorView + + + + IBProjectSource + ./Classes/DetailViewController.h + + + + MasterViewController + UITableViewController + + detailViewController + DetailViewController + + + detailViewController + + detailViewController + DetailViewController + + + + IBProjectSource + ./Classes/MasterViewController.h + + + + SVGKImageView + UIView + + IBProjectSource + ./Classes/SVGKImageView.h + + + + 0 IBCocoaTouchFramework YES 3 - YES - 1919 + 1926 diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib index 97cc11ea9..91229b61a 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib @@ -11,7 +11,6 @@ 1926 - IBNSLayoutConstraint IBProxyObject IBUIActivityIndicatorView IBUILabel @@ -128,7 +127,6 @@ {{365, 484}, {37, 37}} - _NS:9 NO IBIPadFramework @@ -221,102 +219,6 @@ 8 - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 365 - - 1000 - - 3 - 9 - 3 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - @@ -326,274 +228,34 @@ 99 - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - 104 - - - - - 105 - - - - - 106 - - - - - 107 - - - 108 - - - 5 - 0 - - 5 - 1 - - 289 - - 1000 - - 3 - 9 - 3 - - - - 3 - 0 - - 3 - 1 - - 361 - - 1000 - - 3 - 9 - 3 - - - - 5 - 0 - - 5 - 1 - - 337 - - 1000 - - 3 - 9 - 3 - - - - 3 - 0 - - 3 - 1 - - 294 - - 1000 - - 3 - 9 - 3 - - - 115 - - - - - 116 - - - - - 117 - - - - - 118 - - - - - 119 - - - - - 120 - - - 126 - - 127 - - - - - 128 - - - 129 - - 130 - - - - - 132 - - - 141 - - 144 - - - - - 146 - - - @@ -601,56 +263,13 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin SVGKImageView com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - - @@ -706,14 +325,6 @@ ./Classes/DetailViewController.h - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - SVGKImageView UIView @@ -728,7 +339,6 @@ IBIPadFramework YES 3 - YES 1926 diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib index 6fa6ab6d0..1f9ee4c45 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib @@ -11,7 +11,6 @@ 1926 - IBNSLayoutConstraint IBProxyObject IBUIActivityIndicatorView IBUILabel @@ -52,7 +51,7 @@ {{71, 200}, {179, 21}} - + _NS:9 NO YES @@ -79,7 +78,7 @@ NO - {320, 568} + {320, 548} @@ -91,7 +90,7 @@ IBCocoaTouchFramework - {{0, -10}, {320, 568}} + {320, 548} @@ -207,102 +206,6 @@ 1 - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 6 - 24 - 2 - - - - 5 - 0 - - 5 - 1 - - 141 - - 1000 - - 3 - 9 - 3 - - - - 3 - 0 - - 3 - 1 - - -10 - - 1000 - - 3 - 9 - 3 - - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - @@ -323,172 +226,14 @@ 25 - - - 10 - 0 - - 10 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - - 8 - 29 - 3 - - - 32 - - - - - 31 - - - - - 30 - - - - - 29 - - - - - 28 - - - - - 27 - - - 26 - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - - 5 - 22 - 2 - - - - 3 - 0 - - 3 - 1 - - 200 - - 1000 - - 3 - 9 - 3 - @@ -496,76 +241,14 @@ 38 - - - - 7 - 0 - - 0 - 1 - - 179 - - 1000 - - 3 - 9 - 1 - - + - - 39 - - - - - 40 - - - - - 41 - - - - - 42 - - - 45 - - 46 - - - - - 47 - - - - - 62 - - - - - 63 - - - - - 64 - - - @@ -574,53 +257,11 @@ UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - - - - SVGKImageView com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -676,14 +317,6 @@ ./Classes/DetailViewController.h - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - SVGKImageView UIView @@ -698,7 +331,6 @@ IBCocoaTouchFramework YES 3 - YES 1926 diff --git a/iOSDemo.xcodeproj/project.pbxproj b/iOSDemo.xcodeproj/project.pbxproj index 67153597b..5bf1f859a 100644 --- a/iOSDemo.xcodeproj/project.pbxproj +++ b/iOSDemo.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 661008971632ED5B00DD3C38 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 661008961632ED5B00DD3C38 /* Default-568h@2x.png */; }; 661A0DCF161727CF008D5FBE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 661A0DCE161727CF008D5FBE /* UIKit.framework */; }; 661A0DD1161727CF008D5FBE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 661A0DD0161727CF008D5FBE /* Foundation.framework */; }; 661A0DD3161727CF008D5FBE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 661A0DD2161727CF008D5FBE /* CoreGraphics.framework */; }; @@ -59,6 +60,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 661008961632ED5B00DD3C38 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 661A0DCA161727CF008D5FBE /* iOSDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 661A0DCE161727CF008D5FBE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 661A0DD0161727CF008D5FBE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -120,6 +122,7 @@ 661A0DBF161727CF008D5FBE = { isa = PBXGroup; children = ( + 661008961632ED5B00DD3C38 /* Default-568h@2x.png */, 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */, 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */, 6649E0AC1617479200AFE92A /* QuartzCore.framework */, @@ -309,6 +312,7 @@ 661D722A16177655005899EA /* iPhoneDetailViewController.xib in Resources */, 661D722B16177655005899EA /* MasterViewController_iPad.xib in Resources */, 661D722C16177655005899EA /* MasterViewController_iPhone.xib in Resources */, + 661008971632ED5B00DD3C38 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From a02a172a0a0e03411a74346e08d68dd44e9a876a Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 20 Oct 2012 15:58:22 +0100 Subject: [PATCH 084/110] IMPROVED: SVGKImageView can now toggle the auto-redraw-on-resize behaviour. It defaults to "enabled", so that ImageViews always auto-redraw. However, for large SVG's, Apple's implementation of UIScrollView judders to a halt and renders incorrectly - so this can (and SHOULD!) be toggled to "disabled" for SVGKImageViews that are going to be placed inside a ZOOMABLE UIScrollView --- Source/Core/SVGKImageView.h | 1 + Source/Core/SVGKImageView.m | 81 ++++++++++--------- .../iOSDemo/DetailViewController.m | 2 + .../iOSDemo/MasterViewController.m | 5 ++ 4 files changed, 51 insertions(+), 38 deletions(-) diff --git a/Source/Core/SVGKImageView.h b/Source/Core/SVGKImageView.h index 3d8a297c5..35d869a4b 100755 --- a/Source/Core/SVGKImageView.h +++ b/Source/Core/SVGKImageView.h @@ -25,6 +25,7 @@ @property(nonatomic,retain) SVGKImage* image; @property(nonatomic) CGSize scaleMultiplier; @property(nonatomic) BOOL tileContents; +@property(nonatomic) BOOL disableAutoRedrawAtHighestResolution; - (id)initWithSVGKImage:(SVGKImage*) im; diff --git a/Source/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m index 61b2e28cf..f3aeaa851 100755 --- a/Source/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -38,65 +38,70 @@ - (id)initWithSVGKImage:(SVGKImage*) im self.scaleMultiplier = CGSizeMake(1.0, 1.0); self.backgroundColor = [UIColor clearColor]; - [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"scaleMultiplier" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"tileContents" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + if( self.disableAutoRedrawAtHighestResolution ) + ; + else + [self addAllInternalObservers]; } return self; } -- (void)dealloc +-(void) addAllInternalObservers +{ + [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"scaleMultiplier" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"tileContents" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; +} + +-(void) removeAllInternalObservers { - [self removeObserver:self forKeyPath:@"layer" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"layer" context:internalContextPointerBecauseApplesDemandsIt]; [self.layer removeObserver:self forKeyPath:@"transform" context:internalContextPointerBecauseApplesDemandsIt]; [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; [self removeObserver:self forKeyPath:@"scaleMultiplier" context:internalContextPointerBecauseApplesDemandsIt]; [self removeObserver:self forKeyPath:@"tileContents" context:internalContextPointerBecauseApplesDemandsIt]; - - self.image = nil; - - [super dealloc]; } -/** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ --(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +-(void)setDisableAutoRedrawAtHighestResolution:(BOOL)newValue { - [self setNeedsDisplay]; -} - -#if APPLE_KVO_ISNT_WORKING -/** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) - Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ --(void)setImage:(SVGKImage *)newImage -{ - [_image release]; - _image = newImage; - [_image retain]; - - [self setNeedsDisplay]; + if( newValue == _disableAutoRedrawAtHighestResolution ) + return; + + _disableAutoRedrawAtHighestResolution = newValue; + + if( self.disableAutoRedrawAtHighestResolution ) // disabled, so we have to remove the observers + { + [self removeAllInternalObservers]; + } + else // newly-enabled ... must add the observers + { + [self addAllInternalObservers]; + } } -/** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) - Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ --(void)setScaleMultiplier:(CGSize)newScaleMultiplier +- (void)dealloc { - _scaleMultiplier = newScaleMultiplier; + if( self.disableAutoRedrawAtHighestResolution ) + ; + else + [self removeAllInternalObservers]; - [self setNeedsDisplay]; + self.image = nil; + + [super dealloc]; } -/** Override default method purely so that it triggers a need to re-display (get Apple to call drawRect: again) - Can't use Apple's KVO because it doesn't work and they provide no way to debug it */ --(void)setTileContents:(BOOL)newTileContents +/** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ +-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - _tileContents = newTileContents; - - [self setNeedsDisplay]; + if( self.disableAutoRedrawAtHighestResolution ) + ; + else + [self setNeedsDisplay]; } -#endif -(void)drawRect:(CGRect)rect { diff --git a/XCodeProjectData/iOSDemo/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m index 275c649f9..9d0399e6e 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -130,6 +130,8 @@ - (void)loadResource:(NSString *)name self.contentView = [[[SVGKImageView alloc] initWithSVGKImage:document] autorelease]; + NSLog(@"[%@] WARNING: workaround for Apple bugs: UIScrollView spams tiny changes to the transform to the content view; currently, we have NO WAY of efficiently measuring whether or not to re-draw the SVGKImageView. As a temporary solution, we are DISABLING the SVGKImageView's auto-redraw-at-higher-resolution code - in general, you do NOT want to do this", [self class]); + if (_name) { [_name release]; _name = nil; diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m index 1b8c1a0ef..c8827110d 100644 --- a/XCodeProjectData/iOSDemo/MasterViewController.m +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -79,6 +79,11 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + if( [[_sampleNames objectAtIndex:indexPath.row] isEqualToString:@"Reinel_compass_rose"]) + { + NSLog(@"*****************\n* WARNING\n*\n* The sample 'Reinel_compass_rose' is currently unsupported;\n* it is included in this build so that people working on it can test it and see if it works yet\n*\n*\n*****************"); + } + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { if (!self.detailViewController) { self.detailViewController = [[[DetailViewController alloc] initWithNibName:@"iPhoneDetailViewController" bundle:nil] autorelease]; From 070ffc31d576a85011ce077e7ac7788387d48546 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 20 Oct 2012 20:12:31 +0100 Subject: [PATCH 085/110] ADDED: when the app has low-memory (notifcation from iOS), SVGKImage will automatically dump its cache of previously-loaded SVGKImage objects --- Source/Core/SVGKImage.h | 18 +++++++++++------- Source/Core/SVGKImage.m | 19 ++++++++++++++++++- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Source/Core/SVGKImage.h b/Source/Core/SVGKImage.h index 1bd290f48..34ca670af 100644 --- a/Source/Core/SVGKImage.h +++ b/Source/Core/SVGKImage.h @@ -86,8 +86,9 @@ - (id)initWithData:(NSData *)data; #pragma mark - UIImage methods cloned and re-implemented as SVG intelligent methods -@property(nonatomic,readonly) CGSize size; // reflects orientation setting. size is in pixels -@property(nonatomic,readonly) CGFloat scale __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); + +/** The natural / preferred size of the SVG (SVG's are infinitely scalable, by definition). This is saved in the original image by the image's author */ +@property(nonatomic,readonly) CGSize size; /** @@ -101,21 +102,24 @@ - (void)drawAtPoint:(CGPoint)point; // mode = kCGBlendModeNormal, alpha = 1.0 #pragma mark - unsupported / unimplemented UIImage methods (should add as a feature) + +/** This has no meaning for an SVGImage. + + TODO: *possibly* we could make this writeable, and say "when you request a CALayerTree, it gets scaled by this" + */ +@property(nonatomic,readonly) CGFloat scale; + - (void)drawAtPoint:(CGPoint)point blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha; - (void)drawInRect:(CGRect)rect; // mode = kCGBlendModeNormal, alpha = 1.0 - (void)drawInRect:(CGRect)rect blendMode:(CGBlendMode)blendMode alpha:(CGFloat)alpha; - (void)drawAsPatternInRect:(CGRect)rect; // draws the image as a CGPattern + // animated images. When set as UIImageView.image, animation will play in an infinite loop until removed. Drawing will render the first image #if TARGET_OS_IPHONE - - - - + (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); read sequnce of files with suffix starting at 0 or 1 + (UIImage *)animatedResizableImageNamed:(NSString *)name capInsets:(UIEdgeInsets)capInsets duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); // squence of files + (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration ;//__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0); - #endif /** diff --git a/Source/Core/SVGKImage.m b/Source/Core/SVGKImage.m index c8374ed79..bfc31e618 100644 --- a/Source/Core/SVGKImage.m +++ b/Source/Core/SVGKImage.m @@ -53,8 +53,22 @@ @implementation SVGKImage #ifdef ENABLE_GLOBAL_IMAGE_CACHE_FOR_SVGKIMAGE_IMAGE_NAMED static NSMutableDictionary* globalSVGKImageCache; + +#pragma mark - Respond to low-memory warnings by dumping the global static cache ++(void) initialize +{ + [[NSNotificationCenter defaultCenter] addObserver:[SVGKImage class] selector:@selector(didReceiveMemoryWarningNotification:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; +} + ++(void) didReceiveMemoryWarningNotification:(NSNotification*) notification +{ + NSLog(@"[%@] Low-mem; purging cache of %i SVGKImage's...", [SVGKImage class], [globalSVGKImageCache count] ); + + [globalSVGKImageCache removeAllObjects]; // once they leave the cache, if they are no longer referred to, they should automatically dealloc +} #endif +#pragma mark - Convenience initializers + (SVGKImage *)imageNamed:(NSString *)name { NSParameterAssert(name != nil); @@ -116,6 +130,9 @@ + (SVGKImage*) imageWithContentsOfFile:(NSString *)aPath { return [[[[self class] alloc] initWithContentsOfFile:aPath] autorelease]; } +/** + Designated Initializer + */ - (id)initWithParsedSVG:(SVGKParseResult *)parseResult { self = [super init]; if (self) { @@ -146,7 +163,7 @@ - (id)initWithParsedSVG:(SVGKParseResult *)parseResult { self.svgHeight = self.DOMTree.height; } } - return self; + return self; } - (id)initWithSource:(SVGKSource *)newSource { From b847c4612693b1194fb7e59a31c1a46166fc846b Mon Sep 17 00:00:00 2001 From: adamgit Date: Sat, 20 Oct 2012 20:19:37 +0100 Subject: [PATCH 086/110] Slightly cleaner impl of last commit --- Source/Core/SVGKImage.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/SVGKImage.m b/Source/Core/SVGKImage.m index bfc31e618..7877ef4c1 100644 --- a/Source/Core/SVGKImage.m +++ b/Source/Core/SVGKImage.m @@ -57,12 +57,15 @@ @implementation SVGKImage #pragma mark - Respond to low-memory warnings by dumping the global static cache +(void) initialize { - [[NSNotificationCenter defaultCenter] addObserver:[SVGKImage class] selector:@selector(didReceiveMemoryWarningNotification:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + if( self == [SVGKImage class]) // Have to protect against subclasses ADDITIONALLY calling this, as a "[super initialize] line + { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarningNotification:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + } } +(void) didReceiveMemoryWarningNotification:(NSNotification*) notification { - NSLog(@"[%@] Low-mem; purging cache of %i SVGKImage's...", [SVGKImage class], [globalSVGKImageCache count] ); + NSLog(@"[%@] Low-mem; purging cache of %i SVGKImage's...", self, [globalSVGKImageCache count] ); [globalSVGKImageCache removeAllObjects]; // once they leave the cache, if they are no longer referred to, they should automatically dealloc } From 389f7213b8b5a508a343698f524911ed54b56b12 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 21 Oct 2012 14:11:56 +0100 Subject: [PATCH 087/110] ADDED: "debug" button in top right that shows/hides extra info. Currently only shows a thin black border around the root SVGKImageView, showing you its extent --- Source/Core/DOM classes/SVGShapeElement.m | 9 ------- Source/Core/SVGKImageView.h | 1 + Source/Core/SVGKImageView.m | 8 ++++++ .../iOSDemo/DetailViewController.h | 2 ++ .../iOSDemo/DetailViewController.m | 25 +++++++++++++++++++ .../en.lproj/iPhoneDetailViewController.xib | 16 +++++++++--- 6 files changed, 48 insertions(+), 13 deletions(-) diff --git a/Source/Core/DOM classes/SVGShapeElement.m b/Source/Core/DOM classes/SVGShapeElement.m index c3acbc4b2..dfb2ccc6a 100644 --- a/Source/Core/DOM classes/SVGShapeElement.m +++ b/Source/Core/DOM classes/SVGShapeElement.m @@ -114,15 +114,6 @@ - (CALayer *) newLayer _shapeLayer.name = self.identifier; [_shapeLayer setValue:self.identifier forKey:kSVGElementIdentifier]; _shapeLayer.opacity = _opacity; - -#if OUTLINE_SHAPES - -#if TARGET_OS_IPHONE - _shapeLayer.borderColor = [UIColor redColor].CGColor; -#endif - - _shapeLayer.borderWidth = 1.0f; -#endif /** transform our LOCAL path into ABSOLUTE space */ CGAffineTransform transformAbsolute = [self transformAbsolute]; diff --git a/Source/Core/SVGKImageView.h b/Source/Core/SVGKImageView.h index 35d869a4b..8ed2c75cf 100755 --- a/Source/Core/SVGKImageView.h +++ b/Source/Core/SVGKImageView.h @@ -26,6 +26,7 @@ @property(nonatomic) CGSize scaleMultiplier; @property(nonatomic) BOOL tileContents; @property(nonatomic) BOOL disableAutoRedrawAtHighestResolution; +@property(nonatomic) BOOL showBorder; /*< mostly for debugging - adds a coloured 1-pixel border around the image */ - (id)initWithSVGKImage:(SVGKImage*) im; diff --git a/Source/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m index f3aeaa851..4face04c7 100755 --- a/Source/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -53,6 +53,7 @@ -(void) addAllInternalObservers [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; [self addObserver:self forKeyPath:@"scaleMultiplier" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; [self addObserver:self forKeyPath:@"tileContents" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; } -(void) removeAllInternalObservers @@ -63,6 +64,7 @@ -(void) removeAllInternalObservers [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; [self removeObserver:self forKeyPath:@"scaleMultiplier" context:internalContextPointerBecauseApplesDemandsIt]; [self removeObserver:self forKeyPath:@"tileContents" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; } -(void)setDisableAutoRedrawAtHighestResolution:(BOOL)newValue @@ -133,6 +135,12 @@ -(void)drawRect:(CGRect)rect CGContextRestoreGState(context); } + + if( self.showBorder ) + { + [[UIColor blackColor] set]; + CGContextStrokeRect(context, rect); + } } @end diff --git a/XCodeProjectData/iOSDemo/DetailViewController.h b/XCodeProjectData/iOSDemo/DetailViewController.h index ec61aba1b..e8029caba 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.h +++ b/XCodeProjectData/iOSDemo/DetailViewController.h @@ -29,4 +29,6 @@ - (IBAction)animate:(id)sender; - (IBAction)exportLayers:(id)sender; +- (IBAction) showHideBorder:(id)sender; + @end diff --git a/XCodeProjectData/iOSDemo/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m index 9d0399e6e..dfe0ca81c 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -51,6 +51,11 @@ - (void)dealloc { [super dealloc]; } +-(void)viewDidLoad +{ + self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Debug" style:UIBarButtonItemStyleBordered target:self action:@selector(showHideBorder:)] autorelease]; +} + #pragma mark - CRITICAL: this method makes Apple render SVGs in sharp focus -(void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)finalScale @@ -132,6 +137,10 @@ - (void)loadResource:(NSString *)name NSLog(@"[%@] WARNING: workaround for Apple bugs: UIScrollView spams tiny changes to the transform to the content view; currently, we have NO WAY of efficiently measuring whether or not to re-draw the SVGKImageView. As a temporary solution, we are DISABLING the SVGKImageView's auto-redraw-at-higher-resolution code - in general, you do NOT want to do this", [self class]); + self.contentView.disableAutoRedrawAtHighestResolution = TRUE; + + self.contentView.showBorder = FALSE; + if (_name) { [_name release]; _name = nil; @@ -179,6 +188,22 @@ - (void)shakeHead { [layer addAnimation:animation forKey:@"shakingHead"]; } +- (IBAction) showHideBorder:(id)sender +{ + self.contentView.showBorder = ! self.contentView.showBorder; + + /** + NB: normally, the following would NOT be needed - the SVGKImageView would automatically + detect it needs to be re-drawn. + + But ... because we're doing zooming in this class, and Apple's zooming causes huge performance problems, + we disabled the auto-redraw in the loadResource: method above. + + So, now, we have to manually tell the SVGKImageView to redraw + */ + [self.contentView setNeedsDisplay]; +} + - (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib index 1f9ee4c45..3acc483bd 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib @@ -78,7 +78,7 @@ NO - {320, 548} + {320, 504} @@ -90,7 +90,7 @@ IBCocoaTouchFramework - {320, 548} + {320, 504} @@ -135,7 +135,7 @@ - {{0, 20}, {320, 548}} + {{0, 64}, {320, 504}} @@ -147,6 +147,9 @@ + + NO + IBCocoaTouchFramework @@ -267,7 +270,7 @@ - 65 + 68 @@ -277,6 +280,7 @@ id id + id @@ -287,6 +291,10 @@ exportLayers: id + + showHideBorder: + id + SVGKImageView From 12cded05545af5c76a60ac15100192ebed5447a2 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 21 Oct 2012 15:17:58 +0100 Subject: [PATCH 088/110] FIXED/IMPROVED: SVGKImageView now has a much simpler, easier to use tiling-system. It also CORRECTLY scales images to fit its own frame (previously it was double-scaling, incorrectly) --- Source/Core/SVGKImageView.h | 7 ++--- Source/Core/SVGKImageView.m | 60 +++++++++++++++++++++++++++++-------- 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/Source/Core/SVGKImageView.h b/Source/Core/SVGKImageView.h index 8ed2c75cf..a4fd7cc1b 100755 --- a/Source/Core/SVGKImageView.h +++ b/Source/Core/SVGKImageView.h @@ -11,9 +11,9 @@ - [self.view addSubview: skv]; Advanced usage: - - to make the contents shrink to half their actual size, set self.scaleMultiplier = CGSizeMake( 0.5f, 0.5f ); + - to make the contents shrink to half their actual size, and tile to fill, set self.tileRatio = CGSizeMake( 2.0f, 2.0f ); NOTE: I'd prefer to do this view UIViewContentMode, but Apple didn't make it extensible - - to make the contents "tile" to fill the frame of the ImageView, set self.tileContents = TRUE; + - to disable tiling completely (might help with draw performance), set self.tileRatio = CGSizeZero Performance: - NOTE: the way this works - calling Apple's renderInContext: method - MAY BE artificially slow, because of Apple's implementation @@ -23,8 +23,7 @@ @interface SVGKImageView : UIView @property(nonatomic,retain) SVGKImage* image; -@property(nonatomic) CGSize scaleMultiplier; -@property(nonatomic) BOOL tileContents; +@property(nonatomic) CGSize tileRatio; @property(nonatomic) BOOL disableAutoRedrawAtHighestResolution; @property(nonatomic) BOOL showBorder; /*< mostly for debugging - adds a coloured 1-pixel border around the image */ diff --git a/Source/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m index 4face04c7..58b11182b 100755 --- a/Source/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -6,8 +6,7 @@ @implementation SVGKImageView } @synthesize image = _image; -@synthesize scaleMultiplier = _scaleMultiplier; -@synthesize tileContents = _tileContents; +@synthesize tileRatio = _tileRatio; - (id)init { @@ -35,7 +34,7 @@ - (id)initWithSVGKImage:(SVGKImage*) im self.image = im; self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image - self.scaleMultiplier = CGSizeMake(1.0, 1.0); + self.tileRatio = CGSizeZero; self.backgroundColor = [UIColor clearColor]; if( self.disableAutoRedrawAtHighestResolution ) @@ -107,20 +106,54 @@ -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NS -(void)drawRect:(CGRect)rect { - CGRect imageFrameAtZero = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); + /** + view.bounds == width and height of the view + imageBounds == natural width and height of the SVGKImage + */ + CGRect imageBounds = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); - CGSize multiplierFromImageToView = CGSizeMake( self.frame.size.width / imageFrameAtZero.size.width, self.frame.size.height / imageFrameAtZero.size.height ); - CGSize finalScaleMultiplier = CGSizeMake( multiplierFromImageToView.width * self.scaleMultiplier.width, multiplierFromImageToView.height * self.scaleMultiplier.height ); + /** Check if tiling is enabled in either direction + + We have to do this FIRST, because we cannot extend Apple's enum they use for UIViewContentMode + (objective-C is a weak language). + + If we find ANY tiling, we will be forced to skip the UIViewContentMode handling + + TODO: it would be nice to combine the two - e.g. if contentMode=BottomRight, then do the tiling with + the bottom right corners aligned. If = TopLeft, then tile with the top left corners aligned, + etc. + */ + int cols = ceil(self.tileRatio.width); + int rows = ceil(self.tileRatio.height); - CGRect scaledImageFrame = CGRectApplyAffineTransform( imageFrameAtZero, CGAffineTransformMakeScale( finalScaleMultiplier.width, finalScaleMultiplier.height)); + if( cols < 1 ) // It's meaningless to have "fewer than 1" tiles; this lets us ALSO handle special case of "CGSizeZero == disable tiling" + cols = 1; + if( rows < 1 ) // It's meaningless to have "fewer than 1" tiles; this lets us ALSO handle special case of "CGSizeZero == disable tiling" + rows = 1; - int cols = 1 + self.bounds.size.width / scaledImageFrame.size.width; - int rows = 1 + self.bounds.size.height / scaledImageFrame.size.height; - if( ! self.tileContents ) - cols = rows = 1; + CGSize scaleConvertImageToView; + CGSize tileSize; + if( cols == 1 && rows == 1 ) // if we are NOT tiling, then obey the UIViewContentMode as best we can! + { + tileSize = CGSizeMake( 1.0f, 1.0f ); + switch( self.contentMode ) + { + case UIViewContentModeScaleToFill: + default: + { + scaleConvertImageToView = CGSizeMake( self.bounds.size.width / imageBounds.size.width, self.bounds.size.height / imageBounds.size.height ); + }break; + } + } + else + { + scaleConvertImageToView = CGSizeMake( self.bounds.size.width / (self.tileRatio.width * imageBounds.size.width), self.bounds.size.height / ( self.tileRatio.height * imageBounds.size.height) ); + tileSize = CGSizeMake( self.bounds.size.width / self.tileRatio.width, self.bounds.size.height / self.tileRatio.height ); + } + NSLog(@"cols, rows: %i, %i ... scaleConvert: %@ ... tilesize: %@", cols, rows, NSStringFromCGSize(scaleConvertImageToView), NSStringFromCGSize(tileSize) ); /** To support tiling, and to allow internal shrinking, we use renderInContext */ CGContextRef context = UIGraphicsGetCurrentContext(); for( int k=0; k Date: Sun, 21 Oct 2012 15:33:45 +0100 Subject: [PATCH 089/110] UPDATED: the readme, since this is master, not the branch --- README.mdown | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.mdown b/README.mdown index 2c4a64eb2..e262a647c 100644 --- a/README.mdown +++ b/README.mdown @@ -3,9 +3,6 @@ SVGKit SVGKit is a Cocoa framework for rendering SVG files as Core Animation layers. All shapes are represented by instances of the `CAShapeLayer` class, and are, by design, animatable. SVGKit is compatible with the latest iOS SDK's. -BRANCH: "transforms" -====== - This specific branch contains a MASSIVE re-factor of the original SVGKit, aiming to make it easier to use in your apps. Please read the "usage" instructions carefully - they have changed from previous SVGKit versions! From 5abaf9304510255868b1c13aafb87fcac2a837ce Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 21 Oct 2012 15:42:21 +0100 Subject: [PATCH 090/110] UPDATED: Readme --- README.mdown | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/README.mdown b/README.mdown index 2c4a64eb2..9d0e05e46 100644 --- a/README.mdown +++ b/README.mdown @@ -12,14 +12,14 @@ This specific branch contains a MASSIVE re-factor of the original SVGKit, aiming Usage - Basic (iPhone/iPad) ----- -To use this, you must: - 1. Load an SVG file - 2. EITHER: - 2a. Convert the document to CALayer's which Apple can render - 2b. Read the SVG data directly by looking at the tree of SVGElement subclasses +Instantiate an SVGKImageView using the filename of an SVG file, and add it to your view with [UIView addSubview:] + [self.view addSubview: [[SVGKImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"mySVGfile.svg"]]]; -2a: The easiest way to do this is: +Usage - Intermediate (iPhone/iPad) +----- + +OPTION 1: Load an SVG file, and convert the document to CALayer's which Apple can render 1. SVGKImage *im = [SVGKImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object 2. [self.view.layer addSublayer:im.CALayerTree]; // SVGKImage can export itself as Apple's CALayer's @@ -27,7 +27,7 @@ To use this, you must: 3. [self.view.layer addSublayer:[im newCALayerTree]; // Creates a clone of the CALayers, you can edit without affecting originals -2b: The easiest way to do this is: +OPTION 2: Load an SVG file, and read the SVG data directly by looking at the tree of SVGElement subclasses 1. SVGKImage *im = [SVGKImage imageNamed:@"my_svg_file"]; //this loads the file, parses the SVG, and outputs an SVGImage object 2. SVGSVGElement* rootOfTree = im.DOMTree; // NB: this is a partial implementation of the official "SVG DOM" standard. See the header file for this class and its superclass to see what you can do with it @@ -35,7 +35,17 @@ To use this, you must: Advanced Features (this branch/fork only!) (iPhone/iPad) ===== -FEATURE 1: load SVG from web, or from disk +FEATURE 1: use an SVG just like it's a normal PNG file: use SVGKImageView like it's UIImageView: +----- + + - SVGKImage = equivalent of UIImage (same methods and properties - some not implemented, but all core items implemented) + - SVGKImageView = equivalent of UIImageView (same methods, with extra properties to support the features of SVG that plain bitmaps lack - e.g. resolution independent rendering) + +...NB: by default, if you change the "frame" property of an SVGKImageView, it automatically re-renders the SVG at the new resolution. +...NB: bugs in Apple's UIScrollView mean you MUST disable the above feature before allowing user's pinch-zoom: a property on SVGKImageView lets you turn this on/off + + +FEATURE 2: load SVG from web, or from disk ----- - [SVGKParser parse: (SVGKSource*)]; // anything that's an "SVGKSource" can be parsed @@ -43,30 +53,30 @@ FEATURE 1: load SVG from web, or from disk - [SVGKSource sourceWithURL:@"http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg"]; // create a source from disk... -FEATURE 2: search an SVG file for particular tags / nodes / elements: +FEATURE 3: search an SVG file for particular tags / nodes / elements: ----- - Find all and tags: NodeList* gElements = [svgImage.DOMDocument getElementsByTagName:@"g"]; - Find ALL tags (from root of SVG down): NodeList* allElements = [svgImage.DOMDocument getElementsByTagName:@"*"]; -FEATURE 3: resize your SVG file to any size: +FEATURE 4: resize your SVG file to any size: ----- - COMPLICATED: c.f. this thread: https://github.com/adamgit/SVGKit/issues/7 -FEATURE 4: automatic scaling of your SVG to fit in memory +FEATURE 5: automatic scaling of your SVG to fit in memory ----- - AUTOMATIC: SVG files are scaled to fit the co-ordinate system as required/intended by spec - ...many files that ran out of memory in previous versions of SVGKit now render OK -FEATURE 5: Access to the DOM Document Object Model +FEATURE 6: Access to the DOM Document Object Model ----- - PARTIALLY IMPLEMENTED: SVGKImage.DOMDocument is a true DOMDocument, but many of the methods aren't fully implemented -FEATURE 6: Retrieve any part of your SVG document positioned correctly in space +FEATURE 7: Retrieve any part of your SVG document positioned correctly in space ----- - [((SVGKImage*) image).newCopyPositionedAbsoluteLayerWithIdentifier:@"id of the SVG tag / node /element"]; - NB: this MUST return a copy, because it's moving your layer out of the tree and into a fresh CALayer of its own -FEATURE X: detailed information on whether and WHY parsing failed: +FEATURE 8: detailed information on whether and WHY parsing failed: ----- - (SVGKParser*).currentParseRun.warnings; // array of NSError objects, each one a "WARNING" from the parser - (SVGKParser*).currentParseRun.errorsFatal; // array of NSError objects, each one a "FATAL ERROR" from the parser - if your SVG didn't render at all, this is why! From f978ad909180d2c83d9fbbd1a5fdf79eee4895f1 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 21 Oct 2012 16:21:57 +0100 Subject: [PATCH 091/110] FIXED: loading an SVGKImage from a URL now works correctly --- SVGKit-iOS.xcodeproj/project.pbxproj | 58 ------------------- Samples/Sample Licenses.txt | 12 ++++ Source/Core/SVGKSource.m | 2 +- .../iOSDemo/DetailViewController.m | 11 +++- .../iOSDemo/MasterViewController.m | 2 +- 5 files changed, 24 insertions(+), 61 deletions(-) diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index c3d640ab4..1e55ff641 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -167,22 +167,6 @@ 6639633F16145DDC00E58CCA /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 6639634116148CDF00E58CCA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 6639634616148DEC00E58CCA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6649DF5916172CCC00AFE92A /* Monkey.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Monkey.png; sourceTree = ""; }; - 6649DF5A16172CCC00AFE92A /* Note.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Note.png; sourceTree = ""; }; - 6649DF5B16172CCC00AFE92A /* Sample Licenses.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Sample Licenses.txt"; sourceTree = ""; }; - 6649DF5D16172CCC00AFE92A /* australia_states_blank.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = australia_states_blank.svg; sourceTree = ""; }; - 6649DF5E16172CCC00AFE92A /* Blank_Map-Africa.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Blank_Map-Africa.svg"; sourceTree = ""; }; - 6649DF5F16172CCC00AFE92A /* breaking-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "breaking-1.svg"; sourceTree = ""; }; - 6649DF6016172CCC00AFE92A /* CurvedDiamond.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = CurvedDiamond.svg; sourceTree = ""; }; - 6649DF6116172CCC00AFE92A /* Europe_states_reduced.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Europe_states_reduced.svg; sourceTree = ""; }; - 6649DF6216172CCC00AFE92A /* Lion.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Lion.svg; sourceTree = ""; }; - 6649DF6316172CCC00AFE92A /* Location_European_nation_states.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Location_European_nation_states.svg; sourceTree = ""; }; - 6649DF6416172CCC00AFE92A /* Map.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Map.svg; sourceTree = ""; }; - 6649DF6516172CCC00AFE92A /* Monkey.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Monkey.svg; sourceTree = ""; }; - 6649DF6616172CCC00AFE92A /* Note.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Note.svg; sourceTree = ""; }; - 6649DF6816172CCC00AFE92A /* test-wave-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-wave-1.svg"; sourceTree = ""; }; - 6649DF6916172CCC00AFE92A /* Text.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Text.svg; sourceTree = ""; }; - 6649DF6A16172CCC00AFE92A /* uk-only.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "uk-only.svg"; sourceTree = ""; }; 6649DF6D16172CCC00AFE92A /* CGPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPathAdditions.h; sourceTree = ""; }; 6649DF6E16172CCC00AFE92A /* CGPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPathAdditions.m; sourceTree = ""; }; 6649DF7116172CCC00AFE92A /* AppleSucksDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleSucksDOMImplementation.h; sourceTree = ""; }; @@ -302,7 +286,6 @@ 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; 6649E0921617432700AFE92A /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CALayerExporter.h; path = "calayer-exporter/CALayerExporter.h"; sourceTree = SOURCE_ROOT; }; 6649E0931617432700AFE92A /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; - 6649F4F51617CECA00F1A064 /* Reinel_compass_rose.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Reinel_compass_rose.svg; sourceTree = ""; }; 66C0132C16179DCC00359714 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; 66C0132D16179DCC00359714 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; 66C0133016179E6F00359714 /* SVGUseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUseElement.h; sourceTree = ""; }; @@ -366,52 +349,11 @@ isa = PBXGroup; children = ( 6649E0911617432700AFE92A /* calayer-exporter */, - 6649DF5716172CCC00AFE92A /* Samples */, 6649DF6B16172CCC00AFE92A /* Source */, ); name = "EXTERNAL REFERENCES"; sourceTree = ""; }; - 6649DF5716172CCC00AFE92A /* Samples */ = { - isa = PBXGroup; - children = ( - 6649DF5816172CCC00AFE92A /* Bitmap */, - 6649DF5B16172CCC00AFE92A /* Sample Licenses.txt */, - 6649DF5C16172CCC00AFE92A /* SVG */, - ); - path = Samples; - sourceTree = ""; - }; - 6649DF5816172CCC00AFE92A /* Bitmap */ = { - isa = PBXGroup; - children = ( - 6649DF5916172CCC00AFE92A /* Monkey.png */, - 6649DF5A16172CCC00AFE92A /* Note.png */, - ); - path = Bitmap; - sourceTree = ""; - }; - 6649DF5C16172CCC00AFE92A /* SVG */ = { - isa = PBXGroup; - children = ( - 6649DF5D16172CCC00AFE92A /* australia_states_blank.svg */, - 6649DF5E16172CCC00AFE92A /* Blank_Map-Africa.svg */, - 6649DF5F16172CCC00AFE92A /* breaking-1.svg */, - 6649DF6016172CCC00AFE92A /* CurvedDiamond.svg */, - 6649DF6116172CCC00AFE92A /* Europe_states_reduced.svg */, - 6649DF6216172CCC00AFE92A /* Lion.svg */, - 6649DF6316172CCC00AFE92A /* Location_European_nation_states.svg */, - 6649DF6416172CCC00AFE92A /* Map.svg */, - 6649DF6516172CCC00AFE92A /* Monkey.svg */, - 6649F4F51617CECA00F1A064 /* Reinel_compass_rose.svg */, - 6649DF6616172CCC00AFE92A /* Note.svg */, - 6649DF6816172CCC00AFE92A /* test-wave-1.svg */, - 6649DF6916172CCC00AFE92A /* Text.svg */, - 6649DF6A16172CCC00AFE92A /* uk-only.svg */, - ); - path = SVG; - sourceTree = ""; - }; 6649DF6B16172CCC00AFE92A /* Source */ = { isa = PBXGroup; children = ( diff --git a/Samples/Sample Licenses.txt b/Samples/Sample Licenses.txt index afd2c114c..bdb92af10 100644 --- a/Samples/Sample Licenses.txt +++ b/Samples/Sample Licenses.txt @@ -2,6 +2,18 @@ This file exists to document where each sample file came from, in case anyone ne Also, it's helpful to know which SVG-editing software created / exported each file - helps us to check compatibility with particular editors. +URL'S INCLUDED IN SVGKit: +----------- + - NB: we are NOT embedding these, so we do NOT have to license them, but FYI here are the original sources: + +http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg + -- Public Domain, author: http://commons.wikimedia.org/wiki/User:Lokal_Profil + -- http://commons.wikimedia.org/w/index.php?title=File:BlankMap-Africa.svg&page=1 + + +FILES INCLUDED IN SVGKit: +----------- + australia_states_blank.svg -- Creative Commons -- http://commons.wikimedia.org/wiki/File:Australia_states_blank.svg diff --git a/Source/Core/SVGKSource.m b/Source/Core/SVGKSource.m index 5f9ab2d23..ee18da9c8 100644 --- a/Source/Core/SVGKSource.m +++ b/Source/Core/SVGKSource.m @@ -69,7 +69,7 @@ +(SVGKSource*) sourceFromURL:(NSURL*) u httpData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error]; - if( error != nil ) + if( httpData == nil ) { NSLog( @"[%@] ERROR: failed to parse SVG from URL, because failed to download file at URL = %@, error = %@", [self class], self.URL, *error ); return nil; diff --git a/XCodeProjectData/iOSDemo/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m index dfe0ca81c..ec7f39da6 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -121,7 +121,16 @@ - (void)loadResource:(NSString *)name [self.contentView removeFromSuperview]; - SVGKImage *document = [SVGKImage imageNamed:[name stringByAppendingPathExtension:@"svg"]]; + SVGKImage *document = nil; + /** Detect URL vs file */ + if( [name hasPrefix:@"http://"]) + { + document = [SVGKImage imageWithContentsOfURL:[NSURL URLWithString:name]]; + } + else + document = [SVGKImage imageNamed:[name stringByAppendingPathExtension:@"svg"]]; + + if( document == nil ) { diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m index c8827110d..185a484a1 100644 --- a/XCodeProjectData/iOSDemo/MasterViewController.m +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -17,7 +17,7 @@ @implementation MasterViewController - (id)init { if (self) { - self.sampleNames = [NSMutableArray arrayWithObjects: @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", nil]; + self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", nil]; } /** Apple really sucks. They keep randomly changing which init methods they call, BREAKING ALL EXISTING CODE */ From 514c5d930eb317fa05436aed28d9339ce50acce5 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 21 Oct 2012 17:02:26 +0100 Subject: [PATCH 092/110] FIXED: some SVG's having some paths slightly offset in a seemingly random fashion (due to strange bugs in Apple's maths libraries) --- Samples/SVG/Monkey.svg | 2 +- Source/Core/DOM classes/SVGShapeElement.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Samples/SVG/Monkey.svg b/Samples/SVG/Monkey.svg index 70581da8f..3edb5b430 100644 --- a/Samples/SVG/Monkey.svg +++ b/Samples/SVG/Monkey.svg @@ -19,7 +19,7 @@ - + diff --git a/Source/Core/DOM classes/SVGShapeElement.m b/Source/Core/DOM classes/SVGShapeElement.m index dfb2ccc6a..812647625 100644 --- a/Source/Core/DOM classes/SVGShapeElement.m +++ b/Source/Core/DOM classes/SVGShapeElement.m @@ -121,7 +121,7 @@ - (CALayer *) newLayer CGPathAddPath( pathToPlaceInLayer, &transformAbsolute, _pathRelative); /** find out the ABSOLUTE BOUNDING BOX of our transformed path */ - CGRect localPathBB = CGPathGetPathBoundingBox( _pathRelative ); + //BIZARRE: Apple sometimes gives a different value for this even when transformAbsolute == identity! : CGRect localPathBB = CGPathGetPathBoundingBox( _pathRelative ); //DEBUG ONLY: CGRect unTransformedPathBB = CGPathGetBoundingBox( _pathRelative ); CGRect transformedPathBB = CGPathGetBoundingBox( pathToPlaceInLayer ); @@ -140,7 +140,7 @@ - (CALayer *) newLayer NB: this line, by changing the FRAME of the layer, has the side effect of also changing the CGPATH's position in absolute space! This is why we needed the "CGPathRef finalPath =" line a few lines above... */ - _shapeLayer.frame = CGRectApplyAffineTransform( localPathBB, transformAbsolute ); + _shapeLayer.frame = transformedPathBB; //DEBUG ONLY: CGRect shapeLayerFrame = _shapeLayer.frame; From 64d2c103bc95c923fb3e86724c97652d6e16b79e Mon Sep 17 00:00:00 2001 From: adamgit Date: Mon, 22 Oct 2012 11:51:16 +0100 Subject: [PATCH 093/110] ADDED: extra test sample - a file that contains a path that has only a single point (this broke some earlier versions of SVGKit) --- Samples/SVG/imageWithASinglePointPath.svg | 14 ++++++++++++++ Samples/Sample Licenses.txt | 3 +++ XCodeProjectData/iOSDemo/MasterViewController.m | 2 +- iOSDemo.xcodeproj/project.pbxproj | 4 ++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Samples/SVG/imageWithASinglePointPath.svg diff --git a/Samples/SVG/imageWithASinglePointPath.svg b/Samples/SVG/imageWithASinglePointPath.svg new file mode 100644 index 000000000..bf350f2a3 --- /dev/null +++ b/Samples/SVG/imageWithASinglePointPath.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Samples/Sample Licenses.txt b/Samples/Sample Licenses.txt index bdb92af10..52707a389 100644 --- a/Samples/Sample Licenses.txt +++ b/Samples/Sample Licenses.txt @@ -25,6 +25,9 @@ CurvedDiamond.svg -- Public Domain, author: Adam Martin (http://t-machine.org) -- Created by: Inkscape +imageWithASinglePointPath.svg + -- Public Domain, author: Eric Shapiro (https://github.com/EricShapiro) + Lion.svg -- ??? Unknown, probably Public Domain. Same file as this one on Mozilla.org: http://www-archive.mozilla.org/projects/svg/lion.svg diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m index 185a484a1..bbda640e3 100644 --- a/XCodeProjectData/iOSDemo/MasterViewController.m +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -17,7 +17,7 @@ @implementation MasterViewController - (id)init { if (self) { - self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", nil]; + self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"imageWithASinglePointPath", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", nil]; } /** Apple really sucks. They keep randomly changing which init methods they call, BREAKING ALL EXISTING CODE */ diff --git a/iOSDemo.xcodeproj/project.pbxproj b/iOSDemo.xcodeproj/project.pbxproj index 5bf1f859a..1e9e1d6b7 100644 --- a/iOSDemo.xcodeproj/project.pbxproj +++ b/iOSDemo.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ 6649E10D1617577000AFE92A /* libSVGKit-iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10A1617574700AFE92A /* libSVGKit-iOS.a */; }; 6649E10F1617578500AFE92A /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10E1617578500AFE92A /* libxml2.dylib */; }; 6649F5001617CF2900F1A064 /* Reinel_compass_rose.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */; }; + 665E4A7F16355C4000DDA751 /* imageWithASinglePointPath.svg in Resources */ = {isa = PBXBuildFile; fileRef = 665E4A7E16355C4000DDA751 /* imageWithASinglePointPath.svg */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -100,6 +101,7 @@ 6649E1021617574600AFE92A /* SVGKit-iOS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "SVGKit-iOS.xcodeproj"; sourceTree = ""; }; 6649E10E1617578500AFE92A /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = Reinel_compass_rose.svg; path = Samples/SVG/Reinel_compass_rose.svg; sourceTree = ""; }; + 665E4A7E16355C4000DDA751 /* imageWithASinglePointPath.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = imageWithASinglePointPath.svg; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -179,6 +181,7 @@ 661D720416177537005899EA /* breaking-1.svg */, 661D720516177537005899EA /* CurvedDiamond.svg */, 661D720616177537005899EA /* Europe_states_reduced.svg */, + 665E4A7E16355C4000DDA751 /* imageWithASinglePointPath.svg */, 661D720716177537005899EA /* Lion.svg */, 661D720816177537005899EA /* Location_European_nation_states.svg */, 661D720916177537005899EA /* Map.svg */, @@ -313,6 +316,7 @@ 661D722B16177655005899EA /* MasterViewController_iPad.xib in Resources */, 661D722C16177655005899EA /* MasterViewController_iPhone.xib in Resources */, 661008971632ED5B00DD3C38 /* Default-568h@2x.png in Resources */, + 665E4A7F16355C4000DDA751 /* imageWithASinglePointPath.svg in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 5e409fa2f62f06198210291d5487adbdfb166af1 Mon Sep 17 00:00:00 2001 From: adamgit Date: Thu, 1 Nov 2012 08:44:55 +0000 Subject: [PATCH 094/110] UPDATED: workaround for Xcode 4 bugs where header files are "protected" by default --- SVGKit-iOS.xcodeproj/project.pbxproj | 34 +++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 465d1ea4f..7048ef09f 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -127,22 +127,21 @@ 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */; }; 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE616172CCC00AFE92A /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE716172CCC00AFE92A /* SVGPathView.m */; }; - 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */; }; 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649E0921617432700AFE92A /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0931617432700AFE92A /* CALayerExporter.m */; }; - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0132C16179DCC00359714 /* SVGDefsElement.h */; }; + 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0132C16179DCC00359714 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0132D16179DCC00359714 /* SVGDefsElement.m */; }; - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133016179E6F00359714 /* SVGUseElement.h */; }; + 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133016179E6F00359714 /* SVGUseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133116179E6F00359714 /* SVGUseElement.m */; }; - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133416179F4400359714 /* SVGElementInstance.h */; }; + 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133416179F4400359714 /* SVGElementInstance.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133516179F4400359714 /* SVGElementInstance.m */; }; - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133816179FD700359714 /* SVGElementInstanceList.h */; }; + 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133816179FD700359714 /* SVGElementInstanceList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133916179FD700359714 /* SVGElementInstanceList.m */; }; - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */; }; + 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */; }; - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013401617A52600359714 /* SVGUseElement_Mutable.h */; }; - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */; }; - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */; }; + 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013401617A52600359714 /* SVGUseElement_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -648,6 +647,14 @@ 6649E01916172CCC00AFE92A /* SVGTransform.h in Headers */, 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */, 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */, + 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, + 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, + 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, + 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, + 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, + 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, + 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, + 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */, 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */, 6649E02416172CCC00AFE92A /* SVGElement_ForParser.h in Headers */, @@ -682,15 +689,6 @@ 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */, 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */, 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */, - 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */, - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; From 6138fd8bb064d00c408acc9cdd686419fdd69420 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 11 Nov 2012 15:51:38 +0000 Subject: [PATCH 095/110] CHANGING: SVGKImageView fundamentally changing from layers to non-layers and back again - c.f. next commit --- Source/Core/SVGKImage.m | 3 +- Source/Core/SVGKImageView.h | 2 + Source/Core/SVGKImageView.m | 79 +++++++++++++------ .../iOSDemo/DetailViewController.m | 5 +- 4 files changed, 64 insertions(+), 25 deletions(-) diff --git a/Source/Core/SVGKImage.m b/Source/Core/SVGKImage.m index 7877ef4c1..a54a589f1 100644 --- a/Source/Core/SVGKImage.m +++ b/Source/Core/SVGKImage.m @@ -376,7 +376,7 @@ - (CALayer *)newLayerWithElement:(SVGElement *)element { CALayer *layer = [element newLayer]; - NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@ frame:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), NSStringFromCGRect( layer.frame ), element.identifier); + NSLog(@"[%@] DEBUG: converted SVG element (class:%@) to CALayer (class:%@ frame:%@ pointer:%@) for id = %@", [self class], NSStringFromClass([element class]), NSStringFromClass([layer class]), NSStringFromCGRect( layer.frame ), layer, element.identifier); NodeList* childNodes = element.childNodes; @@ -427,6 +427,7 @@ -(CALayer *)CALayerTree { if( CALayerTree == nil ) { + NSLog(@"[%@] WARNING: no CALayer tree found, creating a new one (will cache it once generated)", [self class] ); self.CALayerTree = [[self newCALayerTree] autorelease]; } diff --git a/Source/Core/SVGKImageView.h b/Source/Core/SVGKImageView.h index a4fd7cc1b..cdfc8b5ce 100755 --- a/Source/Core/SVGKImageView.h +++ b/Source/Core/SVGKImageView.h @@ -2,6 +2,8 @@ #import "SVGKit.h" +//#define USE_SUBLAYERS_INSTEAD_OF_BLIT // completely changes how this class works + /** * ADAM: SVGKit's version of UIImageView - with some improvements over Apple's design diff --git a/Source/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m index 58b11182b..a796d44c4 100755 --- a/Source/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -24,7 +24,7 @@ - (id)initWithSVGKImage:(SVGKImage*) im { if( im == nil ) { - NSLog(@"[%@] WARNING: you have initialized an SVGKImageView with a blank image (nil). Possibly because you're using Storyboars or NIBs which Apple won't allow anyone to use with 3rd party code", [self class]); + NSLog(@"[%@] WARNING: you have initialized an SVGKImageView with a blank image (nil). Possibly because you're using Storyboards or NIBs which Apple won't allow us to decorate. Make sure you assign an SVGKImage to the .image property!", [self class]); } self = [super init]; @@ -37,33 +37,38 @@ - (id)initWithSVGKImage:(SVGKImage*) im self.tileRatio = CGSizeZero; self.backgroundColor = [UIColor clearColor]; +#ifdef USE_SUBLAYERS_INSTEAD_OF_BLIT + if( im != nil ) + [self.layer addSublayer:im.CALayerTree]; +#endif + + /** redraw-observers */ if( self.disableAutoRedrawAtHighestResolution ) ; else - [self addAllInternalObservers]; + [self addInternalRedrawOnResizeObservers]; + + /** other obeservers */ + [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"tileRatio" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; } return self; } --(void) addAllInternalObservers +-(void) addInternalRedrawOnResizeObservers { [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"scaleMultiplier" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"tileContents" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + + + } --(void) removeAllInternalObservers +-(void) removeInternalRedrawOnResizeObservers { [self removeObserver:self forKeyPath:@"layer" context:internalContextPointerBecauseApplesDemandsIt]; [self.layer removeObserver:self forKeyPath:@"transform" context:internalContextPointerBecauseApplesDemandsIt]; - - [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; - [self removeObserver:self forKeyPath:@"scaleMultiplier" context:internalContextPointerBecauseApplesDemandsIt]; - [self removeObserver:self forKeyPath:@"tileContents" context:internalContextPointerBecauseApplesDemandsIt]; - [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; } -(void)setDisableAutoRedrawAtHighestResolution:(BOOL)newValue @@ -75,11 +80,11 @@ -(void)setDisableAutoRedrawAtHighestResolution:(BOOL)newValue if( self.disableAutoRedrawAtHighestResolution ) // disabled, so we have to remove the observers { - [self removeAllInternalObservers]; + [self removeInternalRedrawOnResizeObservers]; } else // newly-enabled ... must add the observers { - [self addAllInternalObservers]; + [self addInternalRedrawOnResizeObservers]; } } @@ -88,7 +93,11 @@ - (void)dealloc if( self.disableAutoRedrawAtHighestResolution ) ; else - [self removeAllInternalObservers]; + [self removeInternalRedrawOnResizeObservers]; + + [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"tileRatio" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; self.image = nil; @@ -98,12 +107,30 @@ - (void)dealloc /** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if( [keyPath isEqualToString:@"transform"] && CGSizeEqualToSize( CGSizeZero, self.tileRatio ) ) + { + /*NSLog(@"transform changed. Setting layer scale: %2.2f --> %2.2f", self.layer.contentsScale, self.transform.a); + self.layer.contentsScale = self.transform.a;*/ + [self.image.CALayerTree removeFromSuperlayer]; // force apple to redraw? + [self setNeedsDisplay]; + } + else + { + if( self.disableAutoRedrawAtHighestResolution ) ; else + { [self setNeedsDisplay]; + } + } } +/** + NB: this implementation is a bit tricky, because we're extending Apple's concept of a UIView to add "tiling" + and "automatic rescaling" + + */ -(void)drawRect:(CGRect)rect { /** @@ -137,15 +164,21 @@ -(void)drawRect:(CGRect)rect CGSize tileSize; if( cols == 1 && rows == 1 ) // if we are NOT tiling, then obey the UIViewContentMode as best we can! { - tileSize = CGSizeMake( 1.0f, 1.0f ); - switch( self.contentMode ) +#ifdef USE_SUBLAYERS_INSTEAD_OF_BLIT + if( self.image.CALayerTree.superlayer == self.layer ) + { + [super drawRect:rect]; + return; // TODO: Apple's bugs - they ignore all attempts to force a redraw + } + else { - case UIViewContentModeScaleToFill: - default: - { - scaleConvertImageToView = CGSizeMake( self.bounds.size.width / imageBounds.size.width, self.bounds.size.height / imageBounds.size.height ); - }break; + [self.layer addSublayer:self.image.CALayerTree]; + return; // we've added the layer - let Apple take care of the rest! } +#else + scaleConvertImageToView = CGSizeMake( self.bounds.size.width / imageBounds.size.width, self.bounds.size.height / imageBounds.size.height ); + tileSize = self.bounds.size; +#endif } else { diff --git a/XCodeProjectData/iOSDemo/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m index ec7f39da6..9904a3677 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -53,7 +53,10 @@ - (void)dealloc { -(void)viewDidLoad { - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Debug" style:UIBarButtonItemStyleBordered target:self action:@selector(showHideBorder:)] autorelease]; + self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects: + [[[UIBarButtonItem alloc] initWithTitle:@"Debug" style:UIBarButtonItemStyleBordered target:self action:@selector(showHideBorder:)] autorelease], + [[[UIBarButtonItem alloc] initWithTitle:@"Animate" style:UIBarButtonItemStyleBordered target:self action:@selector(animate:)] autorelease], + nil]; } #pragma mark - CRITICAL: this method makes Apple render SVGs in sharp focus From 75a1bae454fb49e12d56fa2657f00d43d284b1a7 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 11 Nov 2012 18:12:04 +0000 Subject: [PATCH 096/110] FIXED/ADDED: Major improvement: SVGKImageView is now an abstract class, and has two subclasses: one that is fast and easy to use, the other that supports Apple's CoreAnimations on EACH INDIVIDUAL SVG ELEMENT (NB: these two classes are separate because supporting CoreAnimation at a fine level of detail prevents some major features such as auto-redraw-at-highest-resolution) --- SVGKit-iOS.xcodeproj/project.pbxproj | 69 +++--- Source/Core/SVGKFastImageView.h | 37 ++++ Source/Core/SVGKFastImageView.m | 205 +++++++++++++++++ Source/Core/SVGKImageView.h | 27 +-- Source/Core/SVGKImageView.m | 207 ++---------------- Source/Core/SVGKLayer.h | 35 +++ Source/Core/SVGKLayer.m | 82 +++++++ Source/Core/SVGKLayeredImageView.h | 27 +++ Source/Core/SVGKLayeredImageView.m | 76 +++++++ Source/Core/SVGKView.h | 14 -- Source/Core/SVGKView.m | 63 ------ Source/Core/SVGKit.h | 38 +--- Source/iOS/SVGPathView.h | 65 ------ Source/iOS/SVGPathView.m | 109 --------- .../iOSDemo/DetailViewController.m | 84 ++++--- .../en.lproj/iPadDetailViewController.xib | 22 +- .../en.lproj/iPhoneDetailViewController.xib | 78 +------ 17 files changed, 596 insertions(+), 642 deletions(-) create mode 100644 Source/Core/SVGKFastImageView.h create mode 100644 Source/Core/SVGKFastImageView.m create mode 100644 Source/Core/SVGKLayer.h create mode 100644 Source/Core/SVGKLayer.m create mode 100644 Source/Core/SVGKLayeredImageView.h create mode 100644 Source/Core/SVGKLayeredImageView.m delete mode 100644 Source/Core/SVGKView.h delete mode 100644 Source/Core/SVGKView.m delete mode 100644 Source/iOS/SVGPathView.h delete mode 100755 Source/iOS/SVGPathView.m diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 449c257de..38bce8668 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 661008911632E30B00DD3C38 /* SVGKParserDOM.h */; }; + 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 661008911632E30B00DD3C38 /* SVGKParserDOM.h */; settings = {ATTRIBUTES = (Public, ); }; }; 661008941632E30B00DD3C38 /* SVGKParserDOM.m in Sources */ = {isa = PBXBuildFile; fileRef = 661008921632E30B00DD3C38 /* SVGKParserDOM.m */; }; 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639619116145D0400E58CCA /* Foundation.framework */; }; 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639633F16145DDC00E58CCA /* libxml2.dylib */; }; @@ -119,31 +119,25 @@ 6649E05116172CCC00AFE92A /* SVGKPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFDA16172CCC00AFE92A /* SVGKPattern.m */; }; 6649E05216172CCC00AFE92A /* SVGKSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFDB16172CCC00AFE92A /* SVGKSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E05316172CCC00AFE92A /* SVGKSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFDC16172CCC00AFE92A /* SVGKSource.m */; }; - 6649E05416172CCC00AFE92A /* SVGKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFDD16172CCC00AFE92A /* SVGKView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6649E05516172CCC00AFE92A /* SVGKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFDE16172CCC00AFE92A /* SVGKView.m */; }; 6649E05616172CCC00AFE92A /* SVGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFDF16172CCC00AFE92A /* SVGUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E05716172CCC00AFE92A /* SVGUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE016172CCC00AFE92A /* SVGUtils.m */; }; 6649E05816172CCC00AFE92A /* CALayerWithChildHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE216172CCC00AFE92A /* CALayerWithChildHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E05916172CCC00AFE92A /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */; }; 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */; }; - 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE616172CCC00AFE92A /* SVGPathView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE716172CCC00AFE92A /* SVGPathView.m */; }; 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649E0921617432700AFE92A /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0931617432700AFE92A /* CALayerExporter.m */; }; - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0132C16179DCC00359714 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666053231650184000B3B493 /* SVGKFastImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 666053211650184000B3B493 /* SVGKFastImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666053241650184000B3B493 /* SVGKFastImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 666053221650184000B3B493 /* SVGKFastImageView.m */; }; + 666414C0165006F80051A356 /* SVGKLayeredImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 666414BE165006F80051A356 /* SVGKLayeredImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666414C1165006F80051A356 /* SVGKLayeredImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 666414BF165006F80051A356 /* SVGKLayeredImageView.m */; }; + 666414C416500D900051A356 /* SVGKLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 666414C216500D900051A356 /* SVGKLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 666414C516500D900051A356 /* SVGKLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 666414C316500D900051A356 /* SVGKLayer.m */; }; 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0132D16179DCC00359714 /* SVGDefsElement.m */; }; - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133016179E6F00359714 /* SVGUseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133116179E6F00359714 /* SVGUseElement.m */; }; - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133416179F4400359714 /* SVGElementInstance.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133516179F4400359714 /* SVGElementInstance.m */; }; - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133816179FD700359714 /* SVGElementInstanceList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133916179FD700359714 /* SVGElementInstanceList.m */; }; - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */; }; - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013401617A52600359714 /* SVGUseElement_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -272,19 +266,21 @@ 6649DFDA16172CCC00AFE92A /* SVGKPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKPattern.m; sourceTree = ""; }; 6649DFDB16172CCC00AFE92A /* SVGKSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKSource.h; sourceTree = ""; }; 6649DFDC16172CCC00AFE92A /* SVGKSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKSource.m; sourceTree = ""; }; - 6649DFDD16172CCC00AFE92A /* SVGKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKView.h; sourceTree = ""; }; - 6649DFDE16172CCC00AFE92A /* SVGKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKView.m; sourceTree = ""; }; 6649DFDF16172CCC00AFE92A /* SVGUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUtils.h; sourceTree = ""; }; 6649DFE016172CCC00AFE92A /* SVGUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGUtils.m; sourceTree = ""; }; 6649DFE216172CCC00AFE92A /* CALayerWithChildHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWithChildHitTest.h; sourceTree = ""; }; 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerWithChildHitTest.m; sourceTree = ""; }; 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; - 6649DFE616172CCC00AFE92A /* SVGPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathView.h; sourceTree = ""; }; - 6649DFE716172CCC00AFE92A /* SVGPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGPathView.m; sourceTree = ""; }; 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; 6649E0921617432700AFE92A /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CALayerExporter.h; path = "calayer-exporter/CALayerExporter.h"; sourceTree = SOURCE_ROOT; }; 6649E0931617432700AFE92A /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; + 666053211650184000B3B493 /* SVGKFastImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKFastImageView.h; sourceTree = ""; }; + 666053221650184000B3B493 /* SVGKFastImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKFastImageView.m; sourceTree = ""; }; + 666414BE165006F80051A356 /* SVGKLayeredImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKLayeredImageView.h; sourceTree = ""; }; + 666414BF165006F80051A356 /* SVGKLayeredImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKLayeredImageView.m; sourceTree = ""; }; + 666414C216500D900051A356 /* SVGKLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKLayer.h; sourceTree = ""; }; + 666414C316500D900051A356 /* SVGKLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKLayer.m; sourceTree = ""; }; 66C0132C16179DCC00359714 /* SVGDefsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGDefsElement.h; sourceTree = ""; }; 66C0132D16179DCC00359714 /* SVGDefsElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGDefsElement.m; sourceTree = ""; }; 66C0133016179E6F00359714 /* SVGUseElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUseElement.h; sourceTree = ""; }; @@ -373,8 +369,14 @@ 6649DFD116172CCC00AFE92A /* SVGKImage+SVGPathView.m */, 6649DFD216172CCC00AFE92A /* SVGKImage.h */, 6649DFD316172CCC00AFE92A /* SVGKImage.m */, + 666053211650184000B3B493 /* SVGKFastImageView.h */, + 666053221650184000B3B493 /* SVGKFastImageView.m */, 6649DFD416172CCC00AFE92A /* SVGKImageView.h */, 6649DFD516172CCC00AFE92A /* SVGKImageView.m */, + 666414C216500D900051A356 /* SVGKLayer.h */, + 666414C316500D900051A356 /* SVGKLayer.m */, + 666414BE165006F80051A356 /* SVGKLayeredImageView.h */, + 666414BF165006F80051A356 /* SVGKLayeredImageView.m */, 6649DFD616172CCC00AFE92A /* SVGKit.h */, 6649DFD716172CCC00AFE92A /* SVGKParser.h */, 6649DFD816172CCC00AFE92A /* SVGKParser.m */, @@ -382,8 +384,6 @@ 6649DFDA16172CCC00AFE92A /* SVGKPattern.m */, 6649DFDB16172CCC00AFE92A /* SVGKSource.h */, 6649DFDC16172CCC00AFE92A /* SVGKSource.m */, - 6649DFDD16172CCC00AFE92A /* SVGKView.h */, - 6649DFDE16172CCC00AFE92A /* SVGKView.m */, 6649DFDF16172CCC00AFE92A /* SVGUtils.h */, 6649DFE016172CCC00AFE92A /* SVGUtils.m */, ); @@ -533,8 +533,6 @@ 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */, 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */, 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */, - 6649DFE616172CCC00AFE92A /* SVGPathView.h */, - 6649DFE716172CCC00AFE92A /* SVGPathView.m */, ); path = iOS; sourceTree = ""; @@ -595,14 +593,6 @@ 6649E01916172CCC00AFE92A /* SVGTransform.h in Headers */, 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */, 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */, - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */, 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */, 6649E02416172CCC00AFE92A /* SVGElement_ForParser.h in Headers */, @@ -626,27 +616,19 @@ 6649E04516172CCC00AFE92A /* SVGKPointsAndPathsParser.h in Headers */, 6649E04716172CCC00AFE92A /* SVGKImage+SVGPathView.h in Headers */, 6649E04916172CCC00AFE92A /* SVGKImage.h in Headers */, - 6649E04B16172CCC00AFE92A /* SVGKImageView.h in Headers */, 6649E04D16172CCC00AFE92A /* SVGKit.h in Headers */, 6649E04E16172CCC00AFE92A /* SVGKParser.h in Headers */, 6649E05016172CCC00AFE92A /* SVGKPattern.h in Headers */, 6649E05216172CCC00AFE92A /* SVGKSource.h in Headers */, - 6649E05416172CCC00AFE92A /* SVGKView.h in Headers */, 6649E05616172CCC00AFE92A /* SVGUtils.h in Headers */, 6649E05816172CCC00AFE92A /* CALayerWithChildHitTest.h in Headers */, 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */, - 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */, 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */, - 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */, - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */, + 6649E04B16172CCC00AFE92A /* SVGKImageView.h in Headers */, + 666053231650184000B3B493 /* SVGKFastImageView.h in Headers */, + 666414C0165006F80051A356 /* SVGKLayeredImageView.h in Headers */, + 666414C416500D900051A356 /* SVGKLayer.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -767,11 +749,9 @@ 6649E04F16172CCC00AFE92A /* SVGKParser.m in Sources */, 6649E05116172CCC00AFE92A /* SVGKPattern.m in Sources */, 6649E05316172CCC00AFE92A /* SVGKSource.m in Sources */, - 6649E05516172CCC00AFE92A /* SVGKView.m in Sources */, 6649E05716172CCC00AFE92A /* SVGUtils.m in Sources */, 6649E05916172CCC00AFE92A /* CALayerWithChildHitTest.m in Sources */, 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */, - 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */, 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */, 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */, 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */, @@ -779,6 +759,9 @@ 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */, 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */, 661008941632E30B00DD3C38 /* SVGKParserDOM.m in Sources */, + 666414C1165006F80051A356 /* SVGKLayeredImageView.m in Sources */, + 666414C516500D900051A356 /* SVGKLayer.m in Sources */, + 666053241650184000B3B493 /* SVGKFastImageView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/Core/SVGKFastImageView.h b/Source/Core/SVGKFastImageView.h new file mode 100644 index 000000000..aac94d4c1 --- /dev/null +++ b/Source/Core/SVGKFastImageView.h @@ -0,0 +1,37 @@ +#import + +#import "SVGKImageView.h" +#import "SVGKit.h" + +/** + * SVGKit's version of UIImageView - with some improvements over Apple's design + + WARNING 1: CAAnimations are NOT supported + - because of the way this class works, any animations you add to the SVGKImage's CALayerTree *will be ignored*. If you need to animate the elements of an SVG file, use SVGKLayer instead (although that class is missing some of the features of this class, and is a little harder to use) + + WARNING 2: UIScrollView requires special-case code + - Apple's implementation of UIScrollView is badly broken for zooming. To workaround this, you MUST disable the auto-redraw on this class BEFORE zooming a UIScrollView. You can re-enable it after the zoom has finished. You MUST ALSO make a manual call to "fix" the transform of the view each time Apple sends you the "didFinishZooming:atScale" method. There is an example of this in the demo project (currently named "iOS-Demo.xcodeproj") showing exactly how to do this. It only requires 2 lines of code, but Apple's documentation makes it clear that this is the only way to work in harmony with UIScrollView's internal hacks. + - to disable auto-redraw-on-resize, set the BOOL: disableAutoRedrawAtHighestResolution to FALSE + + Basic usage: + - as per UIImageView, simpy: + - SVGKImageView *skv = [[SVGKImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"image.svg"]]; + - [self.view addSubview: skv]; + + Advanced usage: + - to make the contents shrink to half their actual size, and tile to fill, set self.tileRatio = CGSizeMake( 2.0f, 2.0f ); + NOTE: I'd prefer to do this view UIViewContentMode, but Apple didn't make it extensible + - to disable tiling (by default, it's disabled), set self.tileRatio = CGSizeZero, and all the tiling will be side-stepped + - FOR VERY ADVANCED USAGE: instead of this class, use the lower-level "SVGKLayeredImageView" class, which lets you modify every individual layer + + Performance: + - NOTE: the way this works - calling Apple's renderInContext: method - MAY BE artificially slow, because of Apple's implementation + - NOTE: you MUST NOT call SVGKImage.CALayerTree.transform - that will have unexpected side-effects, because of Apple's implementation + (hence: we currently use renderInContext:, even though we'd prefer not to :( ) + */ +@interface SVGKFastImageView : SVGKImageView + +@property(nonatomic) CGSize tileRatio; +@property(nonatomic) BOOL disableAutoRedrawAtHighestResolution; + +@end diff --git a/Source/Core/SVGKFastImageView.m b/Source/Core/SVGKFastImageView.m new file mode 100644 index 000000000..7c6d05d1f --- /dev/null +++ b/Source/Core/SVGKFastImageView.m @@ -0,0 +1,205 @@ +#import "SVGKFastImageView.h" + +@implementation SVGKFastImageView +{ + NSString* internalContextPointerBecauseApplesDemandsIt; +} + +@synthesize image = _image; +@synthesize tileRatio = _tileRatio; + +- (id)init +{ + NSAssert(false, @"init not supported, use initWithSVGKImage:"); + + return nil; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + return [self initWithSVGKImage:nil]; +} + +- (id)initWithSVGKImage:(SVGKImage*) im +{ + if( im == nil ) + { + NSLog(@"[%@] WARNING: you have initialized an SVGKImageView with a blank image (nil). Possibly because you're using Storyboards or NIBs which Apple won't allow us to decorate. Make sure you assign an SVGKImage to the .image property!", [self class]); + } + + self = [super init]; + if (self) + { + internalContextPointerBecauseApplesDemandsIt = @"Apple wrote the addObserver / KVO notification API wrong in the first place and now requires developers to pass around pointers to fake objects to make up for the API deficicineces. You have to have one of these pointers per object, and they have to be internal and private. They serve no real value."; + + self.image = im; + self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image + self.tileRatio = CGSizeZero; + self.backgroundColor = [UIColor clearColor]; + + /** redraw-observers */ + if( self.disableAutoRedrawAtHighestResolution ) + ; + else + [self addInternalRedrawOnResizeObservers]; + + /** other obeservers */ + [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"tileRatio" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + } + return self; +} + +-(void) addInternalRedrawOnResizeObservers +{ + [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; +} + +-(void) removeInternalRedrawOnResizeObservers +{ + [self removeObserver:self forKeyPath:@"layer" context:internalContextPointerBecauseApplesDemandsIt]; + [self.layer removeObserver:self forKeyPath:@"transform" context:internalContextPointerBecauseApplesDemandsIt]; +} + +-(void)setDisableAutoRedrawAtHighestResolution:(BOOL)newValue +{ + if( newValue == _disableAutoRedrawAtHighestResolution ) + return; + + _disableAutoRedrawAtHighestResolution = newValue; + + if( self.disableAutoRedrawAtHighestResolution ) // disabled, so we have to remove the observers + { + [self removeInternalRedrawOnResizeObservers]; + } + else // newly-enabled ... must add the observers + { + [self addInternalRedrawOnResizeObservers]; + } +} + +- (void)dealloc +{ + if( self.disableAutoRedrawAtHighestResolution ) + ; + else + [self removeInternalRedrawOnResizeObservers]; + + [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"tileRatio" context:internalContextPointerBecauseApplesDemandsIt]; + [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; + + self.image = nil; + + [super dealloc]; +} + +/** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ +-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if( [keyPath isEqualToString:@"transform"] && CGSizeEqualToSize( CGSizeZero, self.tileRatio ) ) + { + /*NSLog(@"transform changed. Setting layer scale: %2.2f --> %2.2f", self.layer.contentsScale, self.transform.a); + self.layer.contentsScale = self.transform.a;*/ + [self.image.CALayerTree removeFromSuperlayer]; // force apple to redraw? + [self setNeedsDisplay]; + } + else + { + + if( self.disableAutoRedrawAtHighestResolution ) + ; + else + { + [self setNeedsDisplay]; + } + } +} + +/** + NB: this implementation is a bit tricky, because we're extending Apple's concept of a UIView to add "tiling" + and "automatic rescaling" + + */ +-(void)drawRect:(CGRect)rect +{ + /** + view.bounds == width and height of the view + imageBounds == natural width and height of the SVGKImage + */ + CGRect imageBounds = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); + + + /** Check if tiling is enabled in either direction + + We have to do this FIRST, because we cannot extend Apple's enum they use for UIViewContentMode + (objective-C is a weak language). + + If we find ANY tiling, we will be forced to skip the UIViewContentMode handling + + TODO: it would be nice to combine the two - e.g. if contentMode=BottomRight, then do the tiling with + the bottom right corners aligned. If = TopLeft, then tile with the top left corners aligned, + etc. + */ + int cols = ceil(self.tileRatio.width); + int rows = ceil(self.tileRatio.height); + + if( cols < 1 ) // It's meaningless to have "fewer than 1" tiles; this lets us ALSO handle special case of "CGSizeZero == disable tiling" + cols = 1; + if( rows < 1 ) // It's meaningless to have "fewer than 1" tiles; this lets us ALSO handle special case of "CGSizeZero == disable tiling" + rows = 1; + + + CGSize scaleConvertImageToView; + CGSize tileSize; + if( cols == 1 && rows == 1 ) // if we are NOT tiling, then obey the UIViewContentMode as best we can! + { +#ifdef USE_SUBLAYERS_INSTEAD_OF_BLIT + if( self.image.CALayerTree.superlayer == self.layer ) + { + [super drawRect:rect]; + return; // TODO: Apple's bugs - they ignore all attempts to force a redraw + } + else + { + [self.layer addSublayer:self.image.CALayerTree]; + return; // we've added the layer - let Apple take care of the rest! + } +#else + scaleConvertImageToView = CGSizeMake( self.bounds.size.width / imageBounds.size.width, self.bounds.size.height / imageBounds.size.height ); + tileSize = self.bounds.size; +#endif + } + else + { + scaleConvertImageToView = CGSizeMake( self.bounds.size.width / (self.tileRatio.width * imageBounds.size.width), self.bounds.size.height / ( self.tileRatio.height * imageBounds.size.height) ); + tileSize = CGSizeMake( self.bounds.size.width / self.tileRatio.width, self.bounds.size.height / self.tileRatio.height ); + } + + NSLog(@"cols, rows: %i, %i ... scaleConvert: %@ ... tilesize: %@", cols, rows, NSStringFromCGSize(scaleConvertImageToView), NSStringFromCGSize(tileSize) ); + /** To support tiling, and to allow internal shrinking, we use renderInContext */ + CGContextRef context = UIGraphicsGetCurrentContext(); + for( int k=0; k -#import "SVGKit.h" - -//#define USE_SUBLAYERS_INSTEAD_OF_BLIT // completely changes how this class works +#import +#import "SVGKImage.h" // cannot import "SVGKit.h" because that would cause ciruclar imports /** - * ADAM: SVGKit's version of UIImageView - with some improvements over Apple's design + * SVGKit's version of UIImageView - with some improvements over Apple's design. There are multiple versions of this class, for different use cases. + + STANDARD USAGE: + - SVGKImageView *myImageView = [[SVGKFastImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"image.svg"]]; + - [self.view addSubview: myImageView]; - Basic usage: - - as per UIImageView, simpy: - - SVGKImageView *skv = [[SVGKImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"image.svg"]]; - - [self.view addSubview: skv]; + NB: the "SVGKFastImageView" is the one you want 9 times in 10. The alternative classes (e.g. SVGKLayeredImageView) are for advanced usage. - Advanced usage: - - to make the contents shrink to half their actual size, and tile to fill, set self.tileRatio = CGSizeMake( 2.0f, 2.0f ); - NOTE: I'd prefer to do this view UIViewContentMode, but Apple didn't make it extensible - - to disable tiling completely (might help with draw performance), set self.tileRatio = CGSizeZero + NB: read the class-comment for each subclass carefully before deciding what to use. - Performance: - - NOTE: the way this works - calling Apple's renderInContext: method - MAY BE artificially slow, because of Apple's implementation - - NOTE: you MUST NOT call SVGKImage.CALayerTree.transform - that will have unexpected side-effects, because of Apple's implementation - (hence: we currently use renderInContext:, even though we'd prefer not to :( ) */ @interface SVGKImageView : UIView @property(nonatomic,retain) SVGKImage* image; -@property(nonatomic) CGSize tileRatio; -@property(nonatomic) BOOL disableAutoRedrawAtHighestResolution; @property(nonatomic) BOOL showBorder; /*< mostly for debugging - adds a coloured 1-pixel border around the image */ - (id)initWithSVGKImage:(SVGKImage*) im; diff --git a/Source/Core/SVGKImageView.m b/Source/Core/SVGKImageView.m index a796d44c4..1cd089da7 100755 --- a/Source/Core/SVGKImageView.m +++ b/Source/Core/SVGKImageView.m @@ -1,213 +1,44 @@ #import "SVGKImageView.h" @implementation SVGKImageView -{ - NSString* internalContextPointerBecauseApplesDemandsIt; -} @synthesize image = _image; -@synthesize tileRatio = _tileRatio; +@synthesize showBorder = _showBorder; - (id)init { - NSAssert(false, @"init not supported, use initWithSVGKImage:"); - - return nil; -} - -- (id)initWithCoder:(NSCoder *)aDecoder -{ - return [self initWithSVGKImage:nil]; -} - -- (id)initWithSVGKImage:(SVGKImage*) im -{ - if( im == nil ) - { - NSLog(@"[%@] WARNING: you have initialized an SVGKImageView with a blank image (nil). Possibly because you're using Storyboards or NIBs which Apple won't allow us to decorate. Make sure you assign an SVGKImage to the .image property!", [self class]); - } - - self = [super init]; - if (self) + if( [self class] == [SVGKImageView class ]) { - internalContextPointerBecauseApplesDemandsIt = @"Apple wrote the addObserver / KVO notification API wrong in the first place and now requires developers to pass around pointers to fake objects to make up for the API deficicineces. You have to have one of these pointers per object, and they have to be internal and private. They serve no real value."; + NSAssert(false, @"You cannot init this class directly. Instead, use a subclass e.g. SVGKFastImageView"); - self.image = im; - self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image - self.tileRatio = CGSizeZero; - self.backgroundColor = [UIColor clearColor]; - -#ifdef USE_SUBLAYERS_INSTEAD_OF_BLIT - if( im != nil ) - [self.layer addSublayer:im.CALayerTree]; -#endif - - /** redraw-observers */ - if( self.disableAutoRedrawAtHighestResolution ) - ; - else - [self addInternalRedrawOnResizeObservers]; - - /** other obeservers */ - [self addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"tileRatio" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - } - return self; -} - --(void) addInternalRedrawOnResizeObservers -{ - [self addObserver:self forKeyPath:@"layer" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - [self.layer addObserver:self forKeyPath:@"transform" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; - - - -} - --(void) removeInternalRedrawOnResizeObservers -{ - [self removeObserver:self forKeyPath:@"layer" context:internalContextPointerBecauseApplesDemandsIt]; - [self.layer removeObserver:self forKeyPath:@"transform" context:internalContextPointerBecauseApplesDemandsIt]; + return nil; + } + else + return [super init]; } --(void)setDisableAutoRedrawAtHighestResolution:(BOOL)newValue +- (id)initWithCoder:(NSCoder *)aDecoder { - if( newValue == _disableAutoRedrawAtHighestResolution ) - return; - - _disableAutoRedrawAtHighestResolution = newValue; - - if( self.disableAutoRedrawAtHighestResolution ) // disabled, so we have to remove the observers + if( [self class] == [SVGKImageView class ]) { - [self removeInternalRedrawOnResizeObservers]; - } - else // newly-enabled ... must add the observers - { - [self addInternalRedrawOnResizeObservers]; + NSAssert(false, @"You cannot init this class directly. Instead, use a subclass e.g. SVGKFastImageView"); + + return nil; } -} - -- (void)dealloc -{ - if( self.disableAutoRedrawAtHighestResolution ) - ; else - [self removeInternalRedrawOnResizeObservers]; - - [self removeObserver:self forKeyPath:@"image" context:internalContextPointerBecauseApplesDemandsIt]; - [self removeObserver:self forKeyPath:@"tileRatio" context:internalContextPointerBecauseApplesDemandsIt]; - [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; - - self.image = nil; - - [super dealloc]; + return [super initWithCoder:aDecoder]; } -/** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ --(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +- (id)initWithSVGKImage:(SVGKImage*) im { - if( [keyPath isEqualToString:@"transform"] && CGSizeEqualToSize( CGSizeZero, self.tileRatio ) ) - { - /*NSLog(@"transform changed. Setting layer scale: %2.2f --> %2.2f", self.layer.contentsScale, self.transform.a); - self.layer.contentsScale = self.transform.a;*/ - [self.image.CALayerTree removeFromSuperlayer]; // force apple to redraw? - [self setNeedsDisplay]; - } - else - { - - if( self.disableAutoRedrawAtHighestResolution ) - ; - else - { - [self setNeedsDisplay]; - } - } + NSAssert(false, @"Your subclass implementation is broken, it should be calling [super init] not [super initWithSVGKImage:]. Instead, use a subclass e.g. SVGKFastImageView"); + + return nil; } -/** - NB: this implementation is a bit tricky, because we're extending Apple's concept of a UIView to add "tiling" - and "automatic rescaling" - - */ --(void)drawRect:(CGRect)rect +- (void)dealloc { - /** - view.bounds == width and height of the view - imageBounds == natural width and height of the SVGKImage - */ - CGRect imageBounds = CGRectMake( 0,0, self.image.CALayerTree.frame.size.width, self.image.CALayerTree.frame.size.height ); - - - /** Check if tiling is enabled in either direction - - We have to do this FIRST, because we cannot extend Apple's enum they use for UIViewContentMode - (objective-C is a weak language). - - If we find ANY tiling, we will be forced to skip the UIViewContentMode handling - - TODO: it would be nice to combine the two - e.g. if contentMode=BottomRight, then do the tiling with - the bottom right corners aligned. If = TopLeft, then tile with the top left corners aligned, - etc. - */ - int cols = ceil(self.tileRatio.width); - int rows = ceil(self.tileRatio.height); - - if( cols < 1 ) // It's meaningless to have "fewer than 1" tiles; this lets us ALSO handle special case of "CGSizeZero == disable tiling" - cols = 1; - if( rows < 1 ) // It's meaningless to have "fewer than 1" tiles; this lets us ALSO handle special case of "CGSizeZero == disable tiling" - rows = 1; - - - CGSize scaleConvertImageToView; - CGSize tileSize; - if( cols == 1 && rows == 1 ) // if we are NOT tiling, then obey the UIViewContentMode as best we can! - { -#ifdef USE_SUBLAYERS_INSTEAD_OF_BLIT - if( self.image.CALayerTree.superlayer == self.layer ) - { - [super drawRect:rect]; - return; // TODO: Apple's bugs - they ignore all attempts to force a redraw - } - else - { - [self.layer addSublayer:self.image.CALayerTree]; - return; // we've added the layer - let Apple take care of the rest! - } -#else - scaleConvertImageToView = CGSizeMake( self.bounds.size.width / imageBounds.size.width, self.bounds.size.height / imageBounds.size.height ); - tileSize = self.bounds.size; -#endif - } - else - { - scaleConvertImageToView = CGSizeMake( self.bounds.size.width / (self.tileRatio.width * imageBounds.size.width), self.bounds.size.height / ( self.tileRatio.height * imageBounds.size.height) ); - tileSize = CGSizeMake( self.bounds.size.width / self.tileRatio.width, self.bounds.size.height / self.tileRatio.height ); - } - - NSLog(@"cols, rows: %i, %i ... scaleConvert: %@ ... tilesize: %@", cols, rows, NSStringFromCGSize(scaleConvertImageToView), NSStringFromCGSize(tileSize) ); - /** To support tiling, and to allow internal shrinking, we use renderInContext */ - CGContextRef context = UIGraphicsGetCurrentContext(); - for( int k=0; k + +#import "SVGKit.h" + +/** + * SVGKLayer: this is the "low level" equivalent of SVGKImageView, and allows you to perform e.g. CoreAnimation on the individual elemetns / layers + within an SVG Image. + + NB: this class is MORE COMPLEX than SVGKImageView, and requires you to DO MORE WORK. It is also LOWER PERFORMANCE for basic usage - it expects + YOU to do the work if you want caching, OpenGL acceration, etc. To give you total access to the rendering, we have to disable all the performance + optimizations coded into SVGKImageView + + Basic usage: + - NOTE: most of the time, you DO NOT WANT this class, you instead want to use SVGKImageView, which does lots more work for you. + - Usage as per CALayer: + - SVGKLayer *skl = [[SVGKLayer alloc] init]; + - skl.SVGImage = [SVGKImage imageNamed:@"image.svg"]; + - [self.view.layer addSublayer: skl]; + + Advanced usage: + - Note that EVERY ELEMENT in the original SVG is rendered as a SEPARATE CALayer - you can access all the layers by name, and animate them + - ...c.f. the demo project (currently "iOS-Demo.xcodeproj" and how we animate the Monkey.svg file, wobbling its head + + Performance: + - NOTE: to give you full control of the layers, I had to delete the "auto-re-rasterize at highest pixel detail". I cannot find a way to make that work with Apple's hierarchy of CALayers (it only works when manually blitting). If anyone can figure this out, we'd all be extermely grateful! + - NOTE: the way this works - adding all layers individually - can have complex effects on performance. Some SVG files will render surprisingly fast, others surpisingly slow. + ... you MUST understand Apple's complete rendering system in detail to undertand what's going on (not recommended for beginners!) + - NOTE: you MUST NOT call SVGKImage.CALayerTree.transform - that will have unexpected side-effects, because of Apple's implementation + */ +@interface SVGKLayer : CALayer + +@property(nonatomic,retain) SVGKImage* SVGImage; +@property(nonatomic) BOOL showBorder; /*< mostly for debugging - adds a coloured 1-pixel border around the image */ + +@end diff --git a/Source/Core/SVGKLayer.m b/Source/Core/SVGKLayer.m new file mode 100644 index 000000000..c338ce64c --- /dev/null +++ b/Source/Core/SVGKLayer.m @@ -0,0 +1,82 @@ +#import "SVGKLayer.h" + +@implementation SVGKLayer +{ + NSString* internalContextPointerBecauseApplesDemandsIt; +} + +@synthesize SVGImage = _SVGImage; + +//self.backgroundColor = [UIColor clearColor]; + +/** Apple requires this to be implemented by CALayer subclasses */ ++(id)layer +{ + SVGKLayer* layer = [[SVGKLayer alloc] init]; + return layer; +} + +- (id)init +{ + self = [super init]; + if (self) + { + internalContextPointerBecauseApplesDemandsIt = [NSString stringWithFormat: @"%@: Apple wrote the addObserver / KVO notification API wrong in the first place and now requires developers to pass around pointers to fake objects to make up for the API deficicineces. You have to have one of these pointers per object, and they have to be internal and private. They serve no real value.", [self class]]; + + self.borderColor = [UIColor blackColor].CGColor; + + [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + } + return self; +} +-(void)setSVGImage:(SVGKImage *) newImage +{ + if( newImage == _SVGImage ) + return; + + /** 1: remove old */ + if( _SVGImage != nil ) + { + [_SVGImage.CALayerTree removeFromSuperlayer]; + [_SVGImage release]; + } + + /** 2: update pointer */ + _SVGImage = newImage; + + /** 3: add new */ + if( _SVGImage != nil ) + { + [_SVGImage retain]; + [self addSublayer:_SVGImage.CALayerTree]; + } +} + +- (void)dealloc +{ + [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; + + self.SVGImage = nil; + + [super dealloc]; +} + +/** Trigger a call to re-display (at higher or lower draw-resolution) (get Apple to call drawRect: again) */ +-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if( [keyPath isEqualToString:@"showBorder"] ) + { + if( self.showBorder ) + { + self.borderWidth = 1.0f; + } + else + { + self.borderWidth = 0.0f; + } + + [self setNeedsDisplay]; + } +} + +@end diff --git a/Source/Core/SVGKLayeredImageView.h b/Source/Core/SVGKLayeredImageView.h new file mode 100644 index 000000000..50fe1e55d --- /dev/null +++ b/Source/Core/SVGKLayeredImageView.h @@ -0,0 +1,27 @@ +#import + +#import "SVGKImageView.h" +#import "SVGKit.h" + +/** + * SVGKit's ADVANCED version of UIImageView - for most cases, you want to use the simple version instead (SVGKImageView) + + This class is similar to SVGKImageView, but it DOES NOT HAVE the performance optimizations, and it WILL NOT AUTO-DRAW AT FULL RESOLUTION. + + However, it DOES SUPPORT CORE ANIMATION (which SVGKImageView cannot do), and in some cases that's more important. + + Basic usage: + - as per SVGKImageView: + - SVGKLayeredImageView *skv = [[SVGKLayeredImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"image.svg"]]; + - [self.view addSubview: skv]; + + Advanced usage: + - to access the underlying layers, typecast the .layer property: + - SVGKLayeredImageView *skv = [[SVGKLayeredImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"image.svg"]]; + - SVGKLayer* layer = (SVGKLayer*) skv.layer; + + */ + +@interface SVGKLayeredImageView : SVGKImageView + +@end diff --git a/Source/Core/SVGKLayeredImageView.m b/Source/Core/SVGKLayeredImageView.m new file mode 100644 index 000000000..18f88aed8 --- /dev/null +++ b/Source/Core/SVGKLayeredImageView.m @@ -0,0 +1,76 @@ +#import "SVGKLayeredImageView.h" + +#import + +@interface SVGKLayeredImageView() +@property(nonatomic,retain) CAShapeLayer* internalBorderLayer; +@end + +@implementation SVGKLayeredImageView + +/** uses the custom SVGKLayer instead of a default CALayer */ ++(Class)layerClass +{ + return NSClassFromString(@"SVGKLayer"); +} + +- (id)init +{ + NSAssert(false, @"init not supported, use initWithSVGKImage:"); + + return nil; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + return [self initWithSVGKImage:nil]; +} + +- (id)initWithSVGKImage:(SVGKImage*) im +{ + if( im == nil ) + { + NSLog(@"[%@] WARNING: you have initialized an [%@] with a blank image (nil). Possibly because you're using Storyboards or NIBs which Apple won't allow us to decorate. Make sure you assign an SVGKImage to the .image property!", [self class], [self class]); + } + + self = [super init]; + if (self) + { + self.frame = CGRectMake( 0,0, im.CALayerTree.frame.size.width, im.CALayerTree.frame.size.height ); // default: 0,0 to width x height of original image + self.backgroundColor = [UIColor clearColor]; + + ((SVGKLayer*) self.layer).SVGImage = im; + + } + return self; +} + +/** Delegate the call to the internal layer that's coded to handle this stuff automatically */ +-(SVGKImage *)image +{ + return ((SVGKLayer*)self.layer).SVGImage; +} +/** Delegate the call to the internal layer that's coded to handle this stuff automatically */ +-(void)setImage:(SVGKImage *)image +{ + ((SVGKLayer*)self.layer).SVGImage = image; +} + +/** Delegate the call to the internal layer that's coded to handle this stuff automatically */ +-(BOOL)showBorder +{ + return ((SVGKLayer*)self.layer).showBorder; +} +/** Delegate the call to the internal layer that's coded to handle this stuff automatically */ +-(void)setShowBorder:(BOOL)showBorder +{ + ((SVGKLayer*)self.layer).showBorder = showBorder; +} + +- (void)dealloc +{ + + [super dealloc]; +} + +@end diff --git a/Source/Core/SVGKView.h b/Source/Core/SVGKView.h deleted file mode 100644 index d7ca5f876..000000000 --- a/Source/Core/SVGKView.h +++ /dev/null @@ -1,14 +0,0 @@ -@class SVGKImage; - -#if TARGET_OS_IPHONE -#import -@interface SVGKView :UIView { } -#else -@interface SVGKView : NSView { } -#endif - -@property (nonatomic, retain) SVGKImage *image; - -- (id)initWithImage:(SVGKImage *)image; // set frame to position - -@end diff --git a/Source/Core/SVGKView.m b/Source/Core/SVGKView.m deleted file mode 100644 index 8ffdfb340..000000000 --- a/Source/Core/SVGKView.m +++ /dev/null @@ -1,63 +0,0 @@ -// -// SVGView.m -// SVGKit -// -// - -#import "SVGKView.h" - -#import "SVGKImage.h" - -@implementation SVGKView - -@synthesize image = _image; - -- (id)initWithImage:(SVGKImage *) im { - NSAssert( im != nil, @"Cannot init with a nil SVGKImage; this class requires a pre-loaded SVGKImage instance" ); - - self = [self initWithFrame:CGRectMake(0.0f, 0.0f, im.size.width, im.size.height)]; - if (self) { - self.image = im; - } - return self; -} - -- (void)dealloc { - [_image release]; - - [super dealloc]; -} - -#if TARGET_OS_IPHONE -#else -/*! Mac only: Mac uses a flipped render system */ -- (BOOL)isFlipped { - return YES; -} -#endif - - -- (void)setImage:(SVGKImage *) newImage { - if (_image != newImage) { - [_image release]; - _image = [newImage retain]; - - /** - ADAM: this old code seems pointless. It looks like someone's trying to do a minor compiler - optimization by doing a reverse loop, but ... that would be massive overkill? - - REMOVED for now, replaced with the obvious normal loop (below) - - for (NSInteger i = [self.layer.sublayers count] - 1; i >= 0; i--) { - CALayer *sublayer = [self.layer.sublayers objectAtIndex:i]; - [sublayer removeFromSuperlayer]; - }*/ - for (CALayer *sublayer in [self.layer sublayers]) { - [sublayer removeFromSuperlayer]; - } - - [self.layer addSublayer:_image.CALayerTree]; - } -} - -@end \ No newline at end of file diff --git a/Source/Core/SVGKit.h b/Source/Core/SVGKit.h index 231a590eb..8b6b2cdda 100644 --- a/Source/Core/SVGKit.h +++ b/Source/Core/SVGKit.h @@ -5,24 +5,18 @@ THE MOST IMPORTANT ELEMENTS YOU'LL INTERACT WITH: 1. SVGKImage = contains most of the convenience methods for loading / reading / displaying SVG files + 2. SVGKImageView = the easiest / fastest way to display an SVGKImage on screen + 3. SVGKLayer = the low-level way of getting an SVG as a bunch of layers SVGKImage makes heavy use of the following classes - you'll often use these classes (most of them given to you by an SVGKImage): - 2. SVGKSource = the "file" or "URL" for loading the SVG data - 3. SVGKParseResult = contains the parsed SVG file AND/OR the list of errors during parsing - 4. SVGSVGElement = the parsed SVG file, stored as a tree of SVGElement's. The root element is an SVGSVGElement - 5. SVGDocument = OPTIONAL: only exists for *SOME* SVG FILES (it's very confusing - c.f. the official SVG spec!) - - NB: previous versions of SVGKit assumed that "every SVG file has an SVGDocument". This is not true, the spec - specifically states otherwise. In practice, most SVG files you encounter have an SVGDocument - but some have more than - one! And others have zero! So ... VERY LITTLE of SVGKit relies upon having an SVGDocument, we try to avoid using - it where possible. + 4. SVGKSource = the "file" or "URL" for loading the SVG data + 5. SVGKParseResult = contains the parsed SVG file AND/OR the list of errors during parsing */ #include "TargetConditionals.h" -#if TARGET_OS_IPHONE #import "SVGCircleElement.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" @@ -40,27 +34,7 @@ #import "SVGKSource.h" #import "SVGTitleElement.h" #import "SVGUtils.h" - #import "SVGKView.h" - #import "SVGPathView.h" #import "SVGKPattern.h" #import "SVGKImageView.h" -#else - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import -#endif + #import "SVGKLayeredImageView.h" + #import "SVGKLayer.h" diff --git a/Source/iOS/SVGPathView.h b/Source/iOS/SVGPathView.h deleted file mode 100644 index 1b0a6b292..000000000 --- a/Source/iOS/SVGPathView.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - SVGPathView - - NB: currently disabled, needs minor updating, but we don't have unit tests to check the changes still work - - Purpose: load an SVG full of paths, then be able to select a path and peel that off into a new view. - - - SVGPathView works nicely for that one purpose, it re-orients the path from a document such that it can be displayed properly on it's lonesome rather than whatever other world coords it used to be. - */ - -#import -#import - -#import "SVGKView.h" - -#define ENABLE_SVGPATHVIEW_CLASS 0 - -#if ENABLE_SVGPATHVIEW_CLASS - -#if NS_BLOCKS_AVAILABLE - -typedef void (^layerTreeEnumerator)(CALayer* child); - -#endif - -@class SVGPathElement; - -@protocol SVGPathViewDelegate; - -@interface SVGPathView : SKSvgView -{ - -} - -/** Initializes the view with a copy of the path element selected. - @param pathElement a path element either manually created or extracted from another document - @param shouldTranslate if YES, will translate the path existing in the other document to match toward the origin so that the drawing will have an origin at 0,0 rather than where it was in the original document - */ -- (id)initWithPathElement:(SVGPathElement*)pathElement translateTowardOrigin:(BOOL)shouldTranslate; - -- (CAShapeLayer*) pathElementLayer; - -@property (readwrite,nonatomic,assign) id delegate; -@property (readonly) SVGPathElement* pathElement; - -#if NS_BLOCKS_AVAILABLE - -- (void) enumerateChildLayersUsingBlock:(layerTreeEnumerator)callback; - -#endif - - -@end - - -@protocol SVGPathViewDelegate - -@optional - -- (void) pathView:(SVGPathView*)v path:(SVGPathElement*)path touch:(UITouch*)touch; - -@end - -#endif \ No newline at end of file diff --git a/Source/iOS/SVGPathView.m b/Source/iOS/SVGPathView.m deleted file mode 100755 index f36bbf980..000000000 --- a/Source/iOS/SVGPathView.m +++ /dev/null @@ -1,109 +0,0 @@ -// -// SVGPathView.m -// SVGKit -// - -#import "SVGPathView.h" - -#import "SVGKImage+SVGPathView.h" -#import "SVGKImage.h" -#import "SVGPathElement.h" -#import "CGPathAdditions.h" - -#if ENABLE_SVGPATHVIEW_CLASS - -@implementation SVGPathView - -@synthesize delegate; -@synthesize pathElement=_pathElement; - -- (id)initWithPathElement:(SVGPathElement*)pathElement translateTowardOrigin:(BOOL)shouldTranslate -{ - CGPathRef originalPath = [pathElement path]; - CGRect pathRect = CGRectIntegral(CGPathGetBoundingBox(originalPath)); - CGRect viewRect = CGRectMake(0, 0, CGRectGetWidth(pathRect), CGRectGetHeight(pathRect)); - - self = [super initWithFrame:viewRect]; - if (self) { - SVGPathElement* newPathElement = [[SVGPathElement alloc] init]; - - if (!shouldTranslate) { - [newPathElement loadPath:originalPath]; - } else { - CGPathRef translatedPath = CGPathCreateByOffsettingPath(originalPath, pathRect.origin.x, pathRect.origin.y); - [newPathElement loadPath:translatedPath]; - CGPathRelease(translatedPath); - } - - [newPathElement setIdentifier:pathElement.identifier]; - [newPathElement setOpacity:pathElement.opacity]; - [newPathElement setStrokeColor:pathElement.strokeColor]; - [newPathElement setStrokeWidth:pathElement.strokeWidth]; - [newPathElement setFillType:pathElement.fillType]; - [newPathElement setFillColor:pathElement.fillColor]; - [newPathElement setFillPattern:pathElement.fillPattern]; - - _pathElement = newPathElement; - - SVGKImage* doc = [[SVGKImage alloc] initWithFrame:viewRect]; - [doc addChild:newPathElement]; - - [self setDocument:doc]; - - [newPathElement release]; // retained by doc - [doc release]; // retained by super - } - return self; -} - -- (void) handleElement:(SVGPathElement*)pathElem touched:(UITouch*)touch -{ - if ([self.delegate respondsToSelector:@selector(pathView:path:touch:)]) { - [self.delegate pathView:self path:pathElem touch:touch]; - } -} - -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event -{ - UITouch* t = [touches anyObject]; - CGPoint touchPoint = [t locationInView:self]; - - [self.document applyAggregator:^(SVGElement *e) { - if ([e isKindOfClass:[SVGPathElement class]]) { - SVGPathElement* pathElem = (SVGPathElement*)e; - CGPathRef path = pathElem.path; - if (CGPathContainsPoint(path, NULL, touchPoint, NO)) { - [self handleElement:pathElem touched:t]; - } - } - }]; -} - -- (CAShapeLayer*) pathElementLayer -{ - return (CAShapeLayer*) [[self document] layerWithIdentifier:self.pathElement.identifier]; -} - - -#if NS_BLOCKS_AVAILABLE - -- (void) enumerateChildLayersUsingBlock:(layerTreeEnumerator)callback givenParent:(CALayer*)parentLayer -{ - callback(parentLayer); - - for (CALayer* sublayer in [parentLayer sublayers]) { - [self enumerateChildLayersUsingBlock:callback - givenParent:sublayer]; - } -} - -- (void)enumerateChildLayersUsingBlock:(layerTreeEnumerator)callback -{ - [self enumerateChildLayersUsingBlock:callback - givenParent:self.layer]; -} - -#endif - -@end -#endif diff --git a/XCodeProjectData/iOSDemo/DetailViewController.m b/XCodeProjectData/iOSDemo/DetailViewController.m index 9904a3677..de111ebad 100644 --- a/XCodeProjectData/iOSDemo/DetailViewController.m +++ b/XCodeProjectData/iOSDemo/DetailViewController.m @@ -11,6 +11,8 @@ #import "NodeList+Mutable.h" +#import "SVGKFastImageView.h" + @interface DetailViewController () @property (nonatomic, retain) UIPopoverController *popoverController; @@ -141,40 +143,56 @@ - (void)loadResource:(NSString *)name } else { - if( document.parseErrorsAndWarnings.rootOfSVGTree != nil ) - { - NSLog(@"[%@] Freshly loaded document (name = %@) has size = %@", [self class], name, NSStringFromCGSize(document.size) ); - - self.contentView = [[[SVGKImageView alloc] initWithSVGKImage:document] autorelease]; - - NSLog(@"[%@] WARNING: workaround for Apple bugs: UIScrollView spams tiny changes to the transform to the content view; currently, we have NO WAY of efficiently measuring whether or not to re-draw the SVGKImageView. As a temporary solution, we are DISABLING the SVGKImageView's auto-redraw-at-higher-resolution code - in general, you do NOT want to do this", [self class]); - - self.contentView.disableAutoRedrawAtHighestResolution = TRUE; - - self.contentView.showBorder = FALSE; - - if (_name) { - [_name release]; - _name = nil; - } - - _name = [name copy]; - - [self.scrollViewForSVG addSubview:self.contentView]; - [self.scrollViewForSVG setContentSize: self.contentView.frame.size]; - - float screenToDocumentSizeRatio = self.scrollViewForSVG.frame.size.width / self.contentView.frame.size.width; - - self.scrollViewForSVG.minimumZoomScale = MIN( 1, screenToDocumentSizeRatio ); - self.scrollViewForSVG.maximumZoomScale = MAX( 1, screenToDocumentSizeRatio ); + if( document.parseErrorsAndWarnings.rootOfSVGTree != nil ) + { + NSLog(@"[%@] Freshly loaded document (name = %@) has size = %@", [self class], name, NSStringFromCGSize(document.size) ); + + if( [name isEqualToString:@"Monkey"]) + { + /** + + NB: very special-case handling here -- this is included AS AN EXAMPLE so you can see the differences. + + The problem: Apple's code doesn't allow us to support CoreAnimation *and* make image loading easy. + The solution: there are two versions of SVGKImageView - a "normal" one, and a "weaker one that supports CoreAnimation" + + In this demo, we setup the Monkey.SVG to allow layer-based animation... + */ - NodeList* elementsUsingTagG = [document.DOMDocument getElementsByTagName:@"g"]; - NSLog( @"[%@] checking for SVG standard set of elements with XML tag/node of : %@", [self class], elementsUsingTagG.internalArray ); - } - else - { - [[[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:[NSString stringWithFormat:@"%i fatal errors, %i warnings. First fatal = %@",[document.parseErrorsAndWarnings.errorsFatal count],[document.parseErrorsAndWarnings.errorsRecoverable count]+[document.parseErrorsAndWarnings.warnings count], ((NSError*)[document.parseErrorsAndWarnings.errorsFatal objectAtIndex:0]).localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease] show]; - } + self.contentView = [[[SVGKLayeredImageView alloc] initWithSVGKImage:document] autorelease]; + } + else + { + self.contentView = [[[SVGKFastImageView alloc] initWithSVGKImage:document] autorelease]; + + NSLog(@"[%@] WARNING: workaround for Apple bugs: UIScrollView spams tiny changes to the transform to the content view; currently, we have NO WAY of efficiently measuring whether or not to re-draw the SVGKImageView. As a temporary solution, we are DISABLING the SVGKImageView's auto-redraw-at-higher-resolution code - in general, you do NOT want to do this", [self class]); + + ((SVGKFastImageView*)self.contentView).disableAutoRedrawAtHighestResolution = TRUE; + } + self.contentView.showBorder = FALSE; + + if (_name) { + [_name release]; + _name = nil; + } + + _name = [name copy]; + + [self.scrollViewForSVG addSubview:self.contentView]; + [self.scrollViewForSVG setContentSize: self.contentView.frame.size]; + + float screenToDocumentSizeRatio = self.scrollViewForSVG.frame.size.width / self.contentView.frame.size.width; + + self.scrollViewForSVG.minimumZoomScale = MIN( 1, screenToDocumentSizeRatio ); + self.scrollViewForSVG.maximumZoomScale = MAX( 1, screenToDocumentSizeRatio ); + + NodeList* elementsUsingTagG = [document.DOMDocument getElementsByTagName:@"g"]; + NSLog( @"[%@] checking for SVG standard set of elements with XML tag/node of : %@", [self class], elementsUsingTagG.internalArray ); + } + else + { + [[[[UIAlertView alloc] initWithTitle:@"SVG parse failed" message:[NSString stringWithFormat:@"%i fatal errors, %i warnings. First fatal = %@",[document.parseErrorsAndWarnings.errorsFatal count],[document.parseErrorsAndWarnings.errorsRecoverable count]+[document.parseErrorsAndWarnings.warnings count], ((NSError*)[document.parseErrorsAndWarnings.errorsFatal objectAtIndex:0]).localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease] show]; + } } [self.viewActivityIndicator stopAnimating]; diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib index 91229b61a..a87e44950 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/iPadDetailViewController.xib @@ -2,10 +2,10 @@ 1536 - 12C54 + 12B19 2840 - 1187.34 - 625.00 + 1187 + 624.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin 1926 @@ -127,6 +127,7 @@ {{365, 484}, {37, 37}} + _NS:9 NO IBIPadFramework @@ -263,7 +264,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin - SVGKImageView + SVGKFastImageView com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -285,6 +286,7 @@ id id + id @@ -295,6 +297,10 @@ exportLayers: id + + showHideBorder: + id + SVGKImageView @@ -325,6 +331,14 @@ ./Classes/DetailViewController.h + + SVGKFastImageView + SVGKImageView + + IBProjectSource + ./Classes/SVGKFastImageView.h + + SVGKImageView UIView diff --git a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib index 3acc483bd..8c546c33a 100644 --- a/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib +++ b/XCodeProjectData/iOSDemo/en.lproj/iPhoneDetailViewController.xib @@ -2,10 +2,10 @@ 1536 - 12C54 + 12B19 2840 - 1187.34 - 625.00 + 1187 + 624.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin 1926 @@ -50,7 +50,6 @@ 292 {{71, 200}, {179, 21}} - _NS:9 NO @@ -80,7 +79,6 @@ {320, 504} - _NS:9 @@ -92,7 +90,6 @@ {320, 504} - _NS:9 YES @@ -122,8 +119,6 @@ 292 {{141, 256}, {37, 37}} - - _NS:9 NO IBCocoaTouchFramework @@ -137,7 +132,6 @@ {{0, 64}, {320, 504}} - 3 @@ -261,7 +255,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - SVGKImageView + SVGKFastImageView com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -272,69 +266,7 @@ 68 - - - - DetailViewController - UIViewController - - id - id - id - - - - animate: - id - - - exportLayers: - id - - - showHideBorder: - id - - - - SVGKImageView - UIScrollView - UIToolbar - UIActivityIndicatorView - - - - contentView - SVGKImageView - - - scrollViewForSVG - UIScrollView - - - toolbar - UIToolbar - - - viewActivityIndicator - UIActivityIndicatorView - - - - IBProjectSource - ./Classes/DetailViewController.h - - - - SVGKImageView - UIView - - IBProjectSource - ./Classes/SVGKImageView.h - - - - + 0 IBCocoaTouchFramework YES From 5a9463c3b62f6feed8d59d8df65e8dd62cdf4908 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 18 Nov 2012 13:26:57 +0000 Subject: [PATCH 097/110] MODIFIED: remvoed duplicate headers from xcodeproj (Xcode keeps breaking this!) --- SVGKit-iOS.xcodeproj/project.pbxproj | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 449c257de..647105ba3 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 661008911632E30B00DD3C38 /* SVGKParserDOM.h */; }; + 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = 661008911632E30B00DD3C38 /* SVGKParserDOM.h */; settings = {ATTRIBUTES = (Public, ); }; }; 661008941632E30B00DD3C38 /* SVGKParserDOM.m in Sources */ = {isa = PBXBuildFile; fileRef = 661008921632E30B00DD3C38 /* SVGKParserDOM.m */; }; 6639619216145D0400E58CCA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639619116145D0400E58CCA /* Foundation.framework */; }; 6639634016145DDC00E58CCA /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6639633F16145DDC00E58CCA /* libxml2.dylib */; }; @@ -131,19 +131,11 @@ 6649E05D16172CCC00AFE92A /* SVGPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE716172CCC00AFE92A /* SVGPathView.m */; }; 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649E0921617432700AFE92A /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0931617432700AFE92A /* CALayerExporter.m */; }; - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0132C16179DCC00359714 /* SVGDefsElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0132D16179DCC00359714 /* SVGDefsElement.m */; }; - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133016179E6F00359714 /* SVGUseElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133116179E6F00359714 /* SVGUseElement.m */; }; - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133416179F4400359714 /* SVGElementInstance.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133516179F4400359714 /* SVGElementInstance.m */; }; - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133816179FD700359714 /* SVGElementInstanceList.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133916179FD700359714 /* SVGElementInstanceList.m */; }; - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C0133C1617A33000359714 /* SVGKParserDefsAndUse.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */; }; - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013401617A52600359714 /* SVGUseElement_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -595,14 +587,6 @@ 6649E01916172CCC00AFE92A /* SVGTransform.h in Headers */, 6649E01B16172CCC00AFE92A /* SVGViewSpec.h in Headers */, 6649E01C16172CCC00AFE92A /* SVGCircleElement.h in Headers */, - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, 6649E02016172CCC00AFE92A /* SVGDescriptionElement.h in Headers */, 6649E02216172CCC00AFE92A /* SVGElement.h in Headers */, 6649E02416172CCC00AFE92A /* SVGElement_ForParser.h in Headers */, @@ -637,15 +621,6 @@ 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */, 6649E05C16172CCC00AFE92A /* SVGPathView.h in Headers */, 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */, - 6649E06016172CE200AFE92A /* SVGKit-iOS-Prefix.pch in Headers */, - 66C0132E16179DCC00359714 /* SVGDefsElement.h in Headers */, - 66C0133216179E6F00359714 /* SVGUseElement.h in Headers */, - 66C0133616179F4400359714 /* SVGElementInstance.h in Headers */, - 66C0133A16179FD700359714 /* SVGElementInstanceList.h in Headers */, - 66C0133E1617A33000359714 /* SVGKParserDefsAndUse.h in Headers */, - 66C013411617A52600359714 /* SVGUseElement_Mutable.h in Headers */, - 66C013431617A8FF00359714 /* SVGElementInstance_Mutable.h in Headers */, - 66C013451617AA8700359714 /* SVGElementInstanceList_Internal.h in Headers */, 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; From 870194d0a72d030ddb56f2121ddb96045739b54f Mon Sep 17 00:00:00 2001 From: adamgit Date: Fri, 23 Nov 2012 15:14:53 +0000 Subject: [PATCH 098/110] ADDED: more DOM methods (e.g. Element getNamedItemNS:localName:) ADDED: parser now records "all the XML namespaces I found while parsing, and their prefixes / tags" (useful for debugging, and you can use it for some DOM-manipulation) CREATED: a helper class for shared methods that DOM specification implicitly requires, but which they didn't define --- SVGKit-iOS.xcodeproj/project.pbxproj | 8 +++ .../DOM classes/Core DOM/DOMHelperUtilities.h | 23 ++++++++ .../DOM classes/Core DOM/DOMHelperUtilities.m | 57 +++++++++++++++++++ Source/Core/DOM classes/Core DOM/Document.m | 54 ++---------------- Source/Core/DOM classes/Core DOM/Element.m | 13 +++-- .../Core/DOM classes/Core DOM/NamedNodeMap.m | 7 ++- Source/Core/Parsing/SVGKParseResult.h | 2 + Source/Core/Parsing/SVGKParseResult.m | 2 + Source/Core/SVGKParser.h | 1 + Source/Core/SVGKParser.m | 38 ++++++++++++- Source/Core/SVGKit.h | 1 + 11 files changed, 150 insertions(+), 56 deletions(-) create mode 100644 Source/Core/DOM classes/Core DOM/DOMHelperUtilities.h create mode 100644 Source/Core/DOM classes/Core DOM/DOMHelperUtilities.m diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 38bce8668..483237ec3 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -138,6 +138,8 @@ 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133516179F4400359714 /* SVGElementInstance.m */; }; 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133916179FD700359714 /* SVGElementInstanceList.m */; }; 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */; }; + 66FED67C165FB9C6006A43F6 /* DOMHelperUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 66FED67A165FB9C6006A43F6 /* DOMHelperUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66FED67D165FB9C6006A43F6 /* DOMHelperUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FED67B165FB9C6006A43F6 /* DOMHelperUtilities.m */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -294,6 +296,8 @@ 66C013401617A52600359714 /* SVGUseElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUseElement_Mutable.h; sourceTree = ""; }; 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstance_Mutable.h; sourceTree = ""; }; 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstanceList_Internal.h; sourceTree = ""; }; + 66FED67A165FB9C6006A43F6 /* DOMHelperUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHelperUtilities.h; sourceTree = ""; }; + 66FED67B165FB9C6006A43F6 /* DOMHelperUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMHelperUtilities.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -467,6 +471,8 @@ 6649DF8F16172CCC00AFE92A /* ProcessingInstruction.m */, 6649DF9016172CCC00AFE92A /* Text.h */, 6649DF9116172CCC00AFE92A /* Text.m */, + 66FED67A165FB9C6006A43F6 /* DOMHelperUtilities.h */, + 66FED67B165FB9C6006A43F6 /* DOMHelperUtilities.m */, ); path = "Core DOM"; sourceTree = ""; @@ -629,6 +635,7 @@ 666053231650184000B3B493 /* SVGKFastImageView.h in Headers */, 666414C0165006F80051A356 /* SVGKLayeredImageView.h in Headers */, 666414C416500D900051A356 /* SVGKLayer.h in Headers */, + 66FED67C165FB9C6006A43F6 /* DOMHelperUtilities.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -762,6 +769,7 @@ 666414C1165006F80051A356 /* SVGKLayeredImageView.m in Sources */, 666414C516500D900051A356 /* SVGKLayer.m in Sources */, 666053241650184000B3B493 /* SVGKFastImageView.m in Sources */, + 66FED67D165FB9C6006A43F6 /* DOMHelperUtilities.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/Core/DOM classes/Core DOM/DOMHelperUtilities.h b/Source/Core/DOM classes/Core DOM/DOMHelperUtilities.h new file mode 100644 index 000000000..d5b10f229 --- /dev/null +++ b/Source/Core/DOM classes/Core DOM/DOMHelperUtilities.h @@ -0,0 +1,23 @@ +/** + There are some shared methods in DOM specification, where two classes have the same method, but + are NOT subclass/superclass of each other. This is very bad from OOP design POV, because it means + we end up with copy/paste duplicated code, very VERY likely to gain long term bugs. + + Also, those methods REQUIRE a second, recursive, method or else you can't implement them easily. + + So, we move their implementations into this helper class, so they can share implementation. + + (c.f. Element vs Document - identical methods for getElementsByName) + */ +#import + +@class Node, NodeList; // avoiding #import here, to avoid C header loop problems. + +@interface DOMHelperUtilities : NSObject + +/*! This useful method provides both the DOM level 1 and the DOM level 2 implementations of searching the tree for a node - because THEY ARE DIFFERENT + yet very similar + */ ++(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; + +@end diff --git a/Source/Core/DOM classes/Core DOM/DOMHelperUtilities.m b/Source/Core/DOM classes/Core DOM/DOMHelperUtilities.m new file mode 100644 index 000000000..05ec12afb --- /dev/null +++ b/Source/Core/DOM classes/Core DOM/DOMHelperUtilities.m @@ -0,0 +1,57 @@ +#import "DOMHelperUtilities.h" + +#import "Element.h" +#import "NodeList.h" +#import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt specify how lists are made mutable + +@implementation DOMHelperUtilities + +/*! This useful method provides both the DOM level 1 and the DOM level 2 implementations of searching the tree for a node - because THEY ARE DIFFERENT + yet very similar + */ ++(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator +{ + /** According to spec, this is only valid for ELEMENT nodes */ + if( [parent isKindOfClass:[Element class]] ) + { + if( namespaceURI != nil && ! [parent.namespaceURI isEqualToString:namespaceURI] ) + { + // skip + } + else + { + Element* parentAsElement = (Element*) parent; + + /** According to spec, "tag name" for an Element is the value of its .nodeName property; that means SOMETIMES its a qualified name! */ + BOOL includeThisNode = FALSE; + + + if( [name isEqualToString:@"*"] ) + includeThisNode = TRUE; + + if( !includeThisNode ) + { + if( namespaceURI == nil ) // No namespace? then do a qualified compare + { + includeThisNode = [parentAsElement.tagName isEqualToString:name]; + } + else // namespace? then do an UNqualified compare + { + includeThisNode = [parentAsElement.localName isEqualToString:name]; + } + } + + if( includeThisNode ) + { + [accumulator.internalArray addObject:parent]; + } + } + } + + for( Node* childNode in parent.childNodes ) + { + [self privateGetElementsByName:name inNamespace:namespaceURI childrenOfElement:childNode addToList:accumulator]; + } +} + +@end diff --git a/Source/Core/DOM classes/Core DOM/Document.m b/Source/Core/DOM classes/Core DOM/Document.m index 517e93498..fb6519f0a 100644 --- a/Source/Core/DOM classes/Core DOM/Document.m +++ b/Source/Core/DOM classes/Core DOM/Document.m @@ -1,6 +1,8 @@ #import "Document.h" #import "Document+Mutable.h" +#import "DOMHelperUtilities.h" + #import "NodeList+Mutable.h" // needed for access to underlying array, because SVG doesnt specify how lists are made mutable @interface Document() @@ -64,7 +66,7 @@ -(EntityReference*) createEntityReference:(NSString*) data -(NodeList*) getElementsByTagName:(NSString*) data { NodeList* accumulator = [[[NodeList alloc] init] autorelease]; - [self privateGetElementsByName:data inNamespace:nil childrenOfElement:self.documentElement addToList:accumulator]; + [DOMHelperUtilities privateGetElementsByName:data inNamespace:nil childrenOfElement:self.documentElement addToList:accumulator]; return accumulator; } @@ -98,7 +100,7 @@ -(Attr*) createAttributeNS:(NSString*) namespaceURI qualifiedName:(NSString*) qu -(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName { NodeList* accumulator = [[[NodeList alloc] init] autorelease]; - [self privateGetElementsByName:localName inNamespace:namespaceURI childrenOfElement:self.documentElement addToList:accumulator]; + [DOMHelperUtilities privateGetElementsByName:localName inNamespace:namespaceURI childrenOfElement:self.documentElement addToList:accumulator]; return accumulator; } @@ -134,52 +136,4 @@ -(Element*) privateGetElementById:(NSString*) idValue childrenOfElement:(Node*) } -/*! This useful method provides both the DOM level 1 and the DOM level 2 implementations of searching the tree for a node - because THEY ARE DIFFERENT - yet very similar - */ --(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator -{ - /** According to spec, this is only valid for ELEMENT nodes */ - if( [parent isKindOfClass:[Element class]] ) - { - if( namespaceURI != nil && ! [parent.namespaceURI isEqualToString:namespaceURI] ) - { - // skip - } - else - { - Element* parentAsElement = (Element*) parent; - - /** According to spec, "tag name" for an Element is the value of its .nodeName property; that means SOMETIMES its a qualified name! */ - BOOL includeThisNode = FALSE; - - - if( [name isEqualToString:@"*"] ) - includeThisNode = TRUE; - - if( !includeThisNode ) - { - if( namespaceURI == nil ) // No namespace? then do a qualified compare - { - includeThisNode = [parentAsElement.tagName isEqualToString:name]; - } - else // namespace? then do an UNqualified compare - { - includeThisNode = [parentAsElement.localName isEqualToString:name]; - } - } - - if( includeThisNode ) - { - [accumulator.internalArray addObject:parent]; - } - } - } - - for( Node* childNode in parent.childNodes ) - { - [self privateGetElementsByName:name inNamespace:namespaceURI childrenOfElement:childNode addToList:accumulator]; - } -} - @end diff --git a/Source/Core/DOM classes/Core DOM/Element.m b/Source/Core/DOM classes/Core DOM/Element.m index d9ef2ff2c..1205026a6 100644 --- a/Source/Core/DOM classes/Core DOM/Element.m +++ b/Source/Core/DOM classes/Core DOM/Element.m @@ -1,6 +1,7 @@ #import "Element.h" #import "NamedNodeMap.h" +#import "DOMHelperUtilities.h" @interface Element() @property(nonatomic,retain,readwrite) NSString* tagName; @@ -95,8 +96,10 @@ -(Attr*) removeAttributeNode:(Attr*) oldAttr -(NodeList*) getElementsByTagName:(NSString*) name { - NSAssert( FALSE, @"Not implemented yet" ); - return nil; + NodeList* accumulator = [[[NodeList alloc] init] autorelease]; + [DOMHelperUtilities privateGetElementsByName:name inNamespace:nil childrenOfElement:self addToList:accumulator]; + + return accumulator; } // Introduced in DOM Level 2: @@ -142,8 +145,10 @@ -(Attr*) setAttributeNodeNS:(Attr*) newAttr // Introduced in DOM Level 2: -(NodeList*) getElementsByTagNameNS:(NSString*) namespaceURI localName:(NSString*) localName { - NSAssert( FALSE, @"Not implemented yet" ); - return nil; + NodeList* accumulator = [[[NodeList alloc] init] autorelease]; + [DOMHelperUtilities privateGetElementsByName:localName inNamespace:namespaceURI childrenOfElement:self addToList:accumulator]; + + return accumulator; } // Introduced in DOM Level 2: diff --git a/Source/Core/DOM classes/Core DOM/NamedNodeMap.m b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m index d4db1675c..acc8745e5 100644 --- a/Source/Core/DOM classes/Core DOM/NamedNodeMap.m +++ b/Source/Core/DOM classes/Core DOM/NamedNodeMap.m @@ -168,7 +168,12 @@ -(Node*) setNamedItemNS:(Node*) arg inNodeNamespace:(NSString*) nodesNamespace -(NSString *)description { - return [NSString stringWithFormat:@"NamedNodeMap: NSDictionary(%@)", self.internalDictionary]; + /** test (and output) both the "DOM 1" and "DOM 2" dictionaries, if they're non-empty */ + + NSString* dom1 = self.internalDictionary.count > 0 ? [NSString stringWithFormat:@"DOM-v1(%@)", self.internalDictionary] : nil; + NSString* dom2 = self.internalDictionaryOfNamespaces.count > 0 ? [NSString stringWithFormat:@"DOM-v2(%@)", self.internalDictionaryOfNamespaces] : nil; + + return [NSString stringWithFormat:@"NamedNodeMap: %@%@%@", dom1, dom1 != nil && dom2 != nil ? @"\n" : @"", dom2 ]; } diff --git a/Source/Core/Parsing/SVGKParseResult.h b/Source/Core/Parsing/SVGKParseResult.h index 9f12b23a0..2d239623b 100644 --- a/Source/Core/Parsing/SVGKParseResult.h +++ b/Source/Core/Parsing/SVGKParseResult.h @@ -18,6 +18,8 @@ @property(nonatomic,retain) SVGSVGElement* rootOfSVGTree; /*< both are needed, see spec */ @property(nonatomic,retain) SVGDocument* parsedDocument; /*< both are needed, see spec */ +@property(nonatomic,retain) NSMutableDictionary* namespacesEncountered; /**< maps "prefix" to "uri" */ + -(void) addSourceError:(NSError*) fatalError; -(void) addParseWarning:(NSError*) warning; -(void) addParseErrorRecoverable:(NSError*) recoverableError; diff --git a/Source/Core/Parsing/SVGKParseResult.m b/Source/Core/Parsing/SVGKParseResult.m index 948aff708..5268872db 100644 --- a/Source/Core/Parsing/SVGKParseResult.m +++ b/Source/Core/Parsing/SVGKParseResult.m @@ -18,6 +18,8 @@ - (id)init self.errorsRecoverable = [NSMutableArray array]; self.errorsFatal = [NSMutableArray array]; + self.namespacesEncountered = [NSMutableDictionary dictionary]; + #if ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA self.extensionsData = [NSMutableDictionary dictionary]; #endif diff --git a/Source/Core/SVGKParser.h b/Source/Core/SVGKParser.h index 34be4c449..595e34d05 100644 --- a/Source/Core/SVGKParser.h +++ b/Source/Core/SVGKParser.h @@ -65,6 +65,7 @@ @property(nonatomic,retain) NSMutableArray* parserExtensions; +@property(nonatomic,retain) NSMutableDictionary* parserKnownNamespaces; /**< maps "uri" to "array of parser-extensions" */ #pragma mark - NEW diff --git a/Source/Core/SVGKParser.m b/Source/Core/SVGKParser.m index 69f994cbc..50f1850a8 100644 --- a/Source/Core/SVGKParser.m +++ b/Source/Core/SVGKParser.m @@ -103,7 +103,29 @@ - (void) addParserExtension:(NSObject*) extension self.parserExtensions = [NSMutableArray array]; } + if( [self.parserExtensions containsObject:extension]) + { + NSLog(@"[%@] WARNING: attempted to add a ParserExtension that was already added = %@", [self class], extension); + return; + } + [self.parserExtensions addObject:extension]; + + if( self.parserKnownNamespaces == nil ) + { + self.parserKnownNamespaces = [NSMutableDictionary dictionary]; + } + for( NSString* parserNamespace in extension.supportedNamespaces ) + { + NSMutableArray* extensionsForNamespace = [self.parserKnownNamespaces objectForKey:parserNamespace]; + if( extensionsForNamespace == nil ) + { + extensionsForNamespace = [NSMutableArray array]; + [self.parserKnownNamespaces setObject:extensionsForNamespace forKey:parserNamespace]; + } + + [extensionsForNamespace addObject:extension]; + } } - (SVGKParseResult*) parseSynchronously @@ -320,7 +342,7 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar NSString *stringLocalName = NSStringFromLibxmlString(localname); NSString *stringPrefix = NSStringFromLibxmlString(prefix); - NSMutableDictionary *namespacesByPrefix = NSDictionaryFromLibxmlNamespaces(namespaces, nb_namespaces); + NSMutableDictionary *namespacesByPrefix = NSDictionaryFromLibxmlNamespaces(namespaces, nb_namespaces); // TODO: need to do something with this; this is the ONLY point at which we discover the "xml:ns" definitions in the SVG doc! See below for a temp fix NSMutableDictionary *attributeObjects = NSDictionaryFromLibxmlAttributes(attributes, nb_attributes); NSString *stringURI = NSStringFromLibxmlString(URI); @@ -355,6 +377,20 @@ static void startElementSAX (void *ctx, const xmlChar *localname, const xmlChar newAttribute.namespaceURI = self.defaultXMLNamespaceForThisParseRun; } + /** + TODO: temporary workaround to PRETEND that all namespaces are always defined; + this is INCORRECT: namespaces should be UNdefined once you close the parent tag that defined them (I think?) + */ + for( NSString* prefix in namespacesByPrefix ) + { + NSString* uri = [namespacesByPrefix objectForKey:prefix]; + + if( prefix != nil ) + [self.currentParseRun.namespacesEncountered setObject:uri forKey:prefix]; + else + [self.currentParseRun.namespacesEncountered setObject:uri forKey:[NSNull null]]; + } + #if DEBUG_VERBOSE_LOG_EVERY_TAG NSLog(@"[%@] DEBUG_VERBOSE: <%@%@> (namespace URL:%@), attributes: %i", [self class], [NSString stringWithFormat:@"%@:",stringPrefix], name, stringURI, nb_attributes ); #endif diff --git a/Source/Core/SVGKit.h b/Source/Core/SVGKit.h index 8b6b2cdda..c420e5f4a 100644 --- a/Source/Core/SVGKit.h +++ b/Source/Core/SVGKit.h @@ -17,6 +17,7 @@ #include "TargetConditionals.h" +#import "DOMHelperUtilities.h" #import "SVGCircleElement.h" #import "SVGDefsElement.h" #import "SVGDescriptionElement.h" From c5617757716e5c8090dc0b1dd9b515aa929fa67c Mon Sep 17 00:00:00 2001 From: David Date: Tue, 4 Dec 2012 17:02:18 +0100 Subject: [PATCH 099/110] Added support for 'Q' path elements. Fixed bug with concatenated path commands. --- Source/Core/DOM classes/SVGPathElement.m | 26 ++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Source/Core/DOM classes/SVGPathElement.m b/Source/Core/DOM classes/SVGPathElement.m index 2e88faac6..4c4158650 100644 --- a/Source/Core/DOM classes/SVGPathElement.m +++ b/Source/Core/DOM classes/SVGPathElement.m @@ -35,11 +35,21 @@ - (void)parseData:(NSString *)data SVGCurve lastCurve = SVGCurveZero; BOOL foundCmd; + NSCharacterSet *knownCommands = [NSCharacterSet characterSetWithCharactersInString:@"MmLlCcVvHhAaSsQqTtZz"]; + NSString* command; + do { - NSCharacterSet* knownCommands = [NSCharacterSet characterSetWithCharactersInString:@"MmLlCcVvHhAaSsQqTtZz"]; - NSString* command = nil; + + command = nil; foundCmd = [dataScanner scanCharactersFromSet:knownCommands intoString:&command]; + if (command.length > 1) { + // Take only one char (it can happen that multiple commands are consecutive, as "ZM" - so we only want to get the "Z") + const int tooManyChars = command.length-1; + command = [command substringToIndex:1]; + [dataScanner setScanLocation:([dataScanner scanLocation] - tooManyChars)]; + } + if (foundCmd) { if ([@"z" isEqualToString:command] || [@"Z" isEqualToString:command]) { lastCoordinate = [SVGKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:command] @@ -122,6 +132,18 @@ - (void)parseData:(NSString *)data relativeTo:CGPointZero withPrevCurve:lastCurve]; lastCoordinate = lastCurve.p; + } else if ([@"q" isEqualToString:command]) { + lastCurve = [SVGKPointsAndPathsParser readQuadraticCurvetoCommand:commandScanner + path:path + relativeTo:lastCoordinate + isRelative:TRUE]; + lastCoordinate = lastCurve.p; + } else if ([@"Q" isEqualToString:command]) { + lastCurve = [SVGKPointsAndPathsParser readQuadraticCurvetoCommand:commandScanner + path:path + relativeTo:CGPointZero + isRelative:FALSE]; + lastCoordinate = lastCurve.p; } else { NSLog(@"unsupported command %@", command); } From 53121d0f7271075f32be2644af7fe230f8c19870 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 4 Dec 2012 17:02:18 +0100 Subject: [PATCH 100/110] Added support for 'Q' path elements. Fixed bug with concatenated path commands. --- Source/Core/DOM classes/SVGPathElement.m | 26 ++++++++- .../Core/Parsing/SVGKPointsAndPathsParser.h | 4 ++ .../Core/Parsing/SVGKPointsAndPathsParser.m | 56 +++++++++++++++++++ 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/Source/Core/DOM classes/SVGPathElement.m b/Source/Core/DOM classes/SVGPathElement.m index 2e88faac6..4c4158650 100644 --- a/Source/Core/DOM classes/SVGPathElement.m +++ b/Source/Core/DOM classes/SVGPathElement.m @@ -35,11 +35,21 @@ - (void)parseData:(NSString *)data SVGCurve lastCurve = SVGCurveZero; BOOL foundCmd; + NSCharacterSet *knownCommands = [NSCharacterSet characterSetWithCharactersInString:@"MmLlCcVvHhAaSsQqTtZz"]; + NSString* command; + do { - NSCharacterSet* knownCommands = [NSCharacterSet characterSetWithCharactersInString:@"MmLlCcVvHhAaSsQqTtZz"]; - NSString* command = nil; + + command = nil; foundCmd = [dataScanner scanCharactersFromSet:knownCommands intoString:&command]; + if (command.length > 1) { + // Take only one char (it can happen that multiple commands are consecutive, as "ZM" - so we only want to get the "Z") + const int tooManyChars = command.length-1; + command = [command substringToIndex:1]; + [dataScanner setScanLocation:([dataScanner scanLocation] - tooManyChars)]; + } + if (foundCmd) { if ([@"z" isEqualToString:command] || [@"Z" isEqualToString:command]) { lastCoordinate = [SVGKPointsAndPathsParser readCloseCommand:[NSScanner scannerWithString:command] @@ -122,6 +132,18 @@ - (void)parseData:(NSString *)data relativeTo:CGPointZero withPrevCurve:lastCurve]; lastCoordinate = lastCurve.p; + } else if ([@"q" isEqualToString:command]) { + lastCurve = [SVGKPointsAndPathsParser readQuadraticCurvetoCommand:commandScanner + path:path + relativeTo:lastCoordinate + isRelative:TRUE]; + lastCoordinate = lastCurve.p; + } else if ([@"Q" isEqualToString:command]) { + lastCurve = [SVGKPointsAndPathsParser readQuadraticCurvetoCommand:commandScanner + path:path + relativeTo:CGPointZero + isRelative:FALSE]; + lastCoordinate = lastCurve.p; } else { NSLog(@"unsupported command %@", command); } diff --git a/Source/Core/Parsing/SVGKPointsAndPathsParser.h b/Source/Core/Parsing/SVGKPointsAndPathsParser.h index a6c33e544..40de87640 100644 --- a/Source/Core/Parsing/SVGKPointsAndPathsParser.h +++ b/Source/Core/Parsing/SVGKPointsAndPathsParser.h @@ -53,6 +53,10 @@ BOOL SVGCurveEqualToCurve(SVGCurve curve1, SVGCurve curve2); + (CGPoint) readHorizontalLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; + (CGPoint) readHorizontalLinetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; ++ (SVGCurve) readQuadraticCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (SVGCurve) readQuadraticCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; ++ (SVGCurve) readQuadraticCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; + + (SVGCurve) readCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; + (SVGCurve) readCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative; + (SVGCurve) readCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin; diff --git a/Source/Core/Parsing/SVGKPointsAndPathsParser.m b/Source/Core/Parsing/SVGKPointsAndPathsParser.m index 140953522..d77ea0b06 100644 --- a/Source/Core/Parsing/SVGKPointsAndPathsParser.m +++ b/Source/Core/Parsing/SVGKPointsAndPathsParser.m @@ -359,6 +359,62 @@ + (CGPoint) readLinetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRe return coord; } +/** + quadratic-bezier-curveto: + ( "Q" | "q" ) wsp* quadratic-bezier-curveto-argument-sequence +*/ ++ (SVGCurve) readQuadraticCurvetoCommand:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + NSString* cmd = nil; + NSCharacterSet* cmdFormat = [NSCharacterSet characterSetWithCharactersInString:@"Qq"]; + BOOL ok = [scanner scanCharactersFromSet:cmdFormat intoString:&cmd]; + + NSAssert(ok, @"failed to scan quadratic curve to command"); + if (!ok) return SVGCurveZero; + + [SVGKPointsAndPathsParser readWhitespace:scanner]; + + SVGCurve lastCurve = [SVGKPointsAndPathsParser readQuadraticCurvetoArgumentSequence:scanner path:path relativeTo:origin isRelative:isRelative]; + return lastCurve; +} +/** + quadratic-bezier-curveto-argument-sequence: + quadratic-bezier-curveto-argument + | quadratic-bezier-curveto-argument comma-wsp? quadratic-bezier-curveto-argument-sequence +*/ ++ (SVGCurve) readQuadraticCurvetoArgumentSequence:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin isRelative:(BOOL) isRelative +{ + SVGCurve curve = [SVGKPointsAndPathsParser readQuadraticCurvetoArgument:scanner path:path relativeTo:origin]; + + if (![scanner isAtEnd]) { + curve = [SVGKPointsAndPathsParser readQuadraticCurvetoArgumentSequence:scanner path:path relativeTo:(isRelative ? curve.p : origin) isRelative:isRelative]; + } + + return curve; +} + +/** + quadratic-bezier-curveto-argument: + coordinate-pair comma-wsp? coordinate-pair + */ ++ (SVGCurve) readQuadraticCurvetoArgument:(NSScanner*)scanner path:(CGMutablePathRef)path relativeTo:(CGPoint)origin +{ + CGPoint p1 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord1 = CGPointMake(p1.x+origin.x, p1.y+origin.y); + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + CGPoint p2 = [SVGKPointsAndPathsParser readCoordinatePair:scanner]; + CGPoint coord2 = CGPointMake(p2.x+origin.x, p2.y+origin.y); + [SVGKPointsAndPathsParser readCommaAndWhitespace:scanner]; + + CGPathAddQuadCurveToPoint(path, NULL, coord1.x, coord1.y, coord2.x, coord2.y); +#if DEBUG_PATH_CREATION + NSLog(@"[%@] PATH: QUADRATIC CURVE to (%2.2f, %2.2f)..(%2.2f, %2.2f)", [SVGKPointsAndPathsParser class], coord1.x, coord1.y, coord2.x, coord2.y ); +#endif + + return SVGCurveMake(coord1.x, coord1.y, 0.0f, 0.0f, coord2.x, coord2.y); +} + /** curveto: ( "C" | "c" ) wsp* curveto-argument-sequence From 6bcffc386bbc300815baa3322208a8f07489c124 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 5 Dec 2012 14:55:43 +0000 Subject: [PATCH 101/110] Corrected install instructions --- README.mdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.mdown b/README.mdown index b1a969f79..20ce391ad 100644 --- a/README.mdown +++ b/README.mdown @@ -11,7 +11,7 @@ Usage - Basic (iPhone/iPad) Instantiate an SVGKImageView using the filename of an SVG file, and add it to your view with [UIView addSubview:] - [self.view addSubview: [[SVGKImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"mySVGfile.svg"]]]; + [self.view addSubview: [[SVGKFastImageView alloc] initWithSVGKImage: [SVGKImage imageNamed:@"mySVGfile.svg"]]]; Usage - Intermediate (iPhone/iPad) ----- @@ -32,14 +32,14 @@ OPTION 2: Load an SVG file, and read the SVG data directly by looking at the tre Advanced Features (this branch/fork only!) (iPhone/iPad) ===== -FEATURE 1: use an SVG just like it's a normal PNG file: use SVGKImageView like it's UIImageView: +FEATURE 1: use an SVG just like it's a normal PNG file: use SVGKFastImageView like it's UIImageView: ----- - SVGKImage = equivalent of UIImage (same methods and properties - some not implemented, but all core items implemented) - - SVGKImageView = equivalent of UIImageView (same methods, with extra properties to support the features of SVG that plain bitmaps lack - e.g. resolution independent rendering) + - SVGKFastImageView = equivalent of UIImageView (same methods, with extra properties to support the features of SVG that plain bitmaps lack - e.g. resolution independent rendering) -...NB: by default, if you change the "frame" property of an SVGKImageView, it automatically re-renders the SVG at the new resolution. -...NB: bugs in Apple's UIScrollView mean you MUST disable the above feature before allowing user's pinch-zoom: a property on SVGKImageView lets you turn this on/off +...NB: by default, if you change the "frame" property of an SVGKFastImageView, it automatically re-renders the SVG at the new resolution. +...NB: bugs in Apple's UIScrollView mean you MUST disable the above feature before allowing user's pinch-zoom: a property on SVGKFastImageView lets you turn this on/off FEATURE 2: load SVG from web, or from disk From 164ecfd609f743af3e2c7fab23180a440f0fa2aa Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 5 Dec 2012 16:01:17 +0000 Subject: [PATCH 102/110] CHANGED: SVGKLayer was crashing in Apple code - appears to be an iOS 5 bug - I've removed the "removeObserver" line even though it SHOULD NOT be removed --- Source/Core/DOM classes/Core DOM/Document.m | 2 -- Source/Core/SVGKLayer.m | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/Core/DOM classes/Core DOM/Document.m b/Source/Core/DOM classes/Core DOM/Document.m index fb6519f0a..a0e239c8e 100644 --- a/Source/Core/DOM classes/Core DOM/Document.m +++ b/Source/Core/DOM classes/Core DOM/Document.m @@ -7,8 +7,6 @@ @interface Document() -(Element*) privateGetElementById:(NSString*) idValue childrenOfElement:(Node*) parent; -/*! private method used in implementation of the MULTIPLE getElementsByTagName methods */ --(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; @end @implementation Document diff --git a/Source/Core/SVGKLayer.m b/Source/Core/SVGKLayer.m index c338ce64c..be900f3e2 100644 --- a/Source/Core/SVGKLayer.m +++ b/Source/Core/SVGKLayer.m @@ -2,7 +2,7 @@ @implementation SVGKLayer { - NSString* internalContextPointerBecauseApplesDemandsIt; + } @synthesize SVGImage = _SVGImage; @@ -21,11 +21,9 @@ - (id)init self = [super init]; if (self) { - internalContextPointerBecauseApplesDemandsIt = [NSString stringWithFormat: @"%@: Apple wrote the addObserver / KVO notification API wrong in the first place and now requires developers to pass around pointers to fake objects to make up for the API deficicineces. You have to have one of these pointers per object, and they have to be internal and private. They serve no real value.", [self class]]; - - self.borderColor = [UIColor blackColor].CGColor; + self.borderColor = [UIColor blackColor].CGColor; - [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:internalContextPointerBecauseApplesDemandsIt]; + [self addObserver:self forKeyPath:@"showBorder" options:NSKeyValueObservingOptionNew context:NULL]; } return self; } @@ -54,7 +52,7 @@ -(void)setSVGImage:(SVGKImage *) newImage - (void)dealloc { - [self removeObserver:self forKeyPath:@"showBorder" context:internalContextPointerBecauseApplesDemandsIt]; + //FIXME: Apple crashes on this line, even though BY DEFINITION Apple should not be crashing: [self removeObserver:self forKeyPath:@"showBorder"]; self.SVGImage = nil; From a5d75a94f4c28144e51db5325dd59c816154c6d5 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 6 Dec 2012 11:39:00 +0100 Subject: [PATCH 103/110] Merged with adamgit --- Samples/SVG/MathCurve.svg | 17 +++++++++++++++++ XCodeProjectData/iOSDemo/MasterViewController.m | 2 +- iOSDemo.xcodeproj/project.pbxproj | 4 ++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Samples/SVG/MathCurve.svg diff --git a/Samples/SVG/MathCurve.svg b/Samples/SVG/MathCurve.svg new file mode 100644 index 000000000..ac8ad2bdb --- /dev/null +++ b/Samples/SVG/MathCurve.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m index bbda640e3..202a4cc13 100644 --- a/XCodeProjectData/iOSDemo/MasterViewController.m +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -17,7 +17,7 @@ @implementation MasterViewController - (id)init { if (self) { - self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"imageWithASinglePointPath", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", nil]; + self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"imageWithASinglePointPath", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", @"MathCurve", nil]; } /** Apple really sucks. They keep randomly changing which init methods they call, BREAKING ALL EXISTING CODE */ diff --git a/iOSDemo.xcodeproj/project.pbxproj b/iOSDemo.xcodeproj/project.pbxproj index 1e9e1d6b7..18a291665 100644 --- a/iOSDemo.xcodeproj/project.pbxproj +++ b/iOSDemo.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 6649E10F1617578500AFE92A /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6649E10E1617578500AFE92A /* libxml2.dylib */; }; 6649F5001617CF2900F1A064 /* Reinel_compass_rose.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */; }; 665E4A7F16355C4000DDA751 /* imageWithASinglePointPath.svg in Resources */ = {isa = PBXBuildFile; fileRef = 665E4A7E16355C4000DDA751 /* imageWithASinglePointPath.svg */; }; + 88BD39131670A9270055678F /* MathCurve.svg in Resources */ = {isa = PBXBuildFile; fileRef = 88BD39121670A9270055678F /* MathCurve.svg */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -102,6 +103,7 @@ 6649E10E1617578500AFE92A /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 6649F4FF1617CF2900F1A064 /* Reinel_compass_rose.svg */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = Reinel_compass_rose.svg; path = Samples/SVG/Reinel_compass_rose.svg; sourceTree = ""; }; 665E4A7E16355C4000DDA751 /* imageWithASinglePointPath.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = imageWithASinglePointPath.svg; sourceTree = ""; }; + 88BD39121670A9270055678F /* MathCurve.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = MathCurve.svg; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -176,6 +178,7 @@ 661D720116177537005899EA /* SVG */ = { isa = PBXGroup; children = ( + 88BD39121670A9270055678F /* MathCurve.svg */, 661D720216177537005899EA /* australia_states_blank.svg */, 661D720316177537005899EA /* Blank_Map-Africa.svg */, 661D720416177537005899EA /* breaking-1.svg */, @@ -317,6 +320,7 @@ 661D722C16177655005899EA /* MasterViewController_iPhone.xib in Resources */, 661008971632ED5B00DD3C38 /* Default-568h@2x.png in Resources */, 665E4A7F16355C4000DDA751 /* imageWithASinglePointPath.svg in Resources */, + 88BD39131670A9270055678F /* MathCurve.svg in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From d66f20d2a775540ada1b06d8144032abab0bba02 Mon Sep 17 00:00:00 2001 From: adamgit Date: Wed, 12 Dec 2012 16:32:46 +0000 Subject: [PATCH 104/110] FIXED: Polyline parser ADDED: sample SVG that tests the Polyline parsing --- SVGKit-iOS.xcodeproj/project.pbxproj | 8 ++ Samples/SVG/voies.svg | 103 ++++++++++++++++++ Source/Core/SVGUtils.m | 2 +- .../iOSDemo/MasterViewController.m | 2 +- iOSDemo.xcodeproj/project.pbxproj | 4 + 5 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 Samples/SVG/voies.svg diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 483237ec3..b1e66d77e 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -828,6 +828,10 @@ GCC_PREFIX_HEADER = "XCodeProjectData/SVGKit-iOS/SVGKit-iOS-Prefix.pch"; HEADER_SEARCH_PATHS = /usr/include/libxml2; IPHONEOS_DEPLOYMENT_TARGET = 4.3; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/Source/Core\"", + ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -842,6 +846,10 @@ GCC_PREFIX_HEADER = "XCodeProjectData/SVGKit-iOS/SVGKit-iOS-Prefix.pch"; HEADER_SEARCH_PATHS = /usr/include/libxml2; IPHONEOS_DEPLOYMENT_TARGET = 4.3; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/Source/Core\"", + ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/Samples/SVG/voies.svg b/Samples/SVG/voies.svg new file mode 100644 index 000000000..783b89e77 --- /dev/null +++ b/Samples/SVG/voies.svg @@ -0,0 +1,103 @@ + + + +image/svg+xml + + + + + + \ No newline at end of file diff --git a/Source/Core/SVGUtils.m b/Source/Core/SVGUtils.m index 496cb35af..36e4444e2 100644 --- a/Source/Core/SVGUtils.m +++ b/Source/Core/SVGUtils.m @@ -399,7 +399,7 @@ CGMutablePathRef createPathFromPointsInString (const char *string, boolean_t clo bzero(accum, MAX_ACCUM); accumIdx = 0; } - else if (isdigit(c) || c == '.') { // is digit or decimal separator? + else if (isdigit(c) || c == '-' || c == '.') { // is digit or decimal separator OR A MINUS SIGN!!! ? accum[accumIdx++] = c; } } diff --git a/XCodeProjectData/iOSDemo/MasterViewController.m b/XCodeProjectData/iOSDemo/MasterViewController.m index 202a4cc13..94b17bbcf 100644 --- a/XCodeProjectData/iOSDemo/MasterViewController.m +++ b/XCodeProjectData/iOSDemo/MasterViewController.m @@ -17,7 +17,7 @@ @implementation MasterViewController - (id)init { if (self) { - self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"imageWithASinglePointPath", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", @"MathCurve", nil]; + self.sampleNames = [NSMutableArray arrayWithObjects: @"http://upload.wikimedia.org/wikipedia/commons/f/f9/BlankMap-Africa.svg", @"australia_states_blank", @"Reinel_compass_rose", @"Monkey", @"Blank_Map-Africa", @"Note", @"imageWithASinglePointPath", @"Lion", @"Map", @"CurvedDiamond", @"Text", @"Location_European_nation_states", @"uk-only", @"Europe_states_reduced", @"Compass_rose_pale", @"MathCurve", @"voies", nil]; } /** Apple really sucks. They keep randomly changing which init methods they call, BREAKING ALL EXISTING CODE */ diff --git a/iOSDemo.xcodeproj/project.pbxproj b/iOSDemo.xcodeproj/project.pbxproj index 18a291665..6fb72caec 100644 --- a/iOSDemo.xcodeproj/project.pbxproj +++ b/iOSDemo.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ 661D722A16177655005899EA /* iPhoneDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722316177655005899EA /* iPhoneDetailViewController.xib */; }; 661D722B16177655005899EA /* MasterViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722516177655005899EA /* MasterViewController_iPad.xib */; }; 661D722C16177655005899EA /* MasterViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 661D722716177655005899EA /* MasterViewController_iPhone.xib */; }; + 6623D29A1678DEAC002D37AB /* voies.svg in Resources */ = {isa = PBXBuildFile; fileRef = 6623D2991678DEAC002D37AB /* voies.svg */; }; 6649E07B16172D4200AFE92A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E06916172D4200AFE92A /* AppDelegate.m */; }; 6649E07C16172D4200AFE92A /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E06B16172D4200AFE92A /* DetailViewController.m */; }; 6649E07F16172D4200AFE92A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6649E07016172D4200AFE92A /* InfoPlist.strings */; }; @@ -88,6 +89,7 @@ 661D722416177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/iPhoneDetailViewController.xib; sourceTree = ""; }; 661D722616177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController_iPad.xib; sourceTree = ""; }; 661D722816177655005899EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MasterViewController_iPhone.xib; sourceTree = ""; }; + 6623D2991678DEAC002D37AB /* voies.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = voies.svg; sourceTree = ""; }; 6649E06816172D4200AFE92A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 6649E06916172D4200AFE92A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 6649E06A16172D4200AFE92A /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; @@ -178,6 +180,7 @@ 661D720116177537005899EA /* SVG */ = { isa = PBXGroup; children = ( + 6623D2991678DEAC002D37AB /* voies.svg */, 88BD39121670A9270055678F /* MathCurve.svg */, 661D720216177537005899EA /* australia_states_blank.svg */, 661D720316177537005899EA /* Blank_Map-Africa.svg */, @@ -321,6 +324,7 @@ 661008971632ED5B00DD3C38 /* Default-568h@2x.png in Resources */, 665E4A7F16355C4000DDA751 /* imageWithASinglePointPath.svg in Resources */, 88BD39131670A9270055678F /* MathCurve.svg in Resources */, + 6623D29A1678DEAC002D37AB /* voies.svg in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 972e8268e533a18bebc46b078e057ea36ae84e21 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Dec 2012 18:12:25 +0000 Subject: [PATCH 105/110] ADDED: implementation of SVGKImage.UIImage - UNTESTED, but will probably work --- Source/Core/DOM classes/Core DOM/Document.m | 2 -- Source/Core/SVGKImage.m | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Source/Core/DOM classes/Core DOM/Document.m b/Source/Core/DOM classes/Core DOM/Document.m index fb6519f0a..a0e239c8e 100644 --- a/Source/Core/DOM classes/Core DOM/Document.m +++ b/Source/Core/DOM classes/Core DOM/Document.m @@ -7,8 +7,6 @@ @interface Document() -(Element*) privateGetElementById:(NSString*) idValue childrenOfElement:(Node*) parent; -/*! private method used in implementation of the MULTIPLE getElementsByTagName methods */ --(void) privateGetElementsByName:(NSString*) name inNamespace:(NSString*) namespaceURI childrenOfElement:(Node*) parent addToList:(NodeList*) accumulator; @end @implementation Document diff --git a/Source/Core/SVGKImage.m b/Source/Core/SVGKImage.m index a54a589f1..fd903b980 100644 --- a/Source/Core/SVGKImage.m +++ b/Source/Core/SVGKImage.m @@ -253,8 +253,15 @@ -(CGFloat)scale #if TARGET_OS_IPHONE -(UIImage *)UIImage { - NSAssert( FALSE, @"Auto-converting SVGKImage to a rasterized UIImage is not yet implemented by SVGKit" ); - return nil; + NSAssert( self.DOMTree != nil, @"You cannot request a .UIImage for an SVG that you haven't parsed yet! There's no data to return!"); + + UIGraphicsBeginImageContextWithOptions(self.size, FALSE, [UIScreen mainScreen].scale ); + CGContextRef context = UIGraphicsGetCurrentContext(); + [self.CALayerTree renderInContext:context]; + UIImage* result = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + return result; } #endif From 75f19de0329e2c0ce79842ff71fcd36040d82b4a Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Dec 2012 18:32:32 +0000 Subject: [PATCH 106/110] Removing the annoying submodule --- calayer-exporter | 1 - 1 file changed, 1 deletion(-) delete mode 160000 calayer-exporter diff --git a/calayer-exporter b/calayer-exporter deleted file mode 160000 index 6d029ac06..000000000 --- a/calayer-exporter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6d029ac06080bee403c3a97bddd9569e4ecb6b51 From 770c89cb88447ec51faf9c531a2a8d3e1aa20fd9 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Dec 2012 18:34:04 +0000 Subject: [PATCH 107/110] REmoving the crap annoying git submodule crap --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index bc19b17a7..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "calayer-exporter"] - path = calayer-exporter - url = git://github.com/reklis/calayer-exporter.git From c177c42da85624346eda719f2bb6d0341cf46c99 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Dec 2012 18:36:50 +0000 Subject: [PATCH 108/110] Continuing to fix the crap git crap about submodules (git doesn't really support submodules, way too many bugs in git here :( ) --- SVGKit-iOS.xcodeproj/project.pbxproj | 24 +-- Source/iOS/CALayerExporter.h | 38 ++++ Source/iOS/CALayerExporter.m | 283 +++++++++++++++++++++++++++ 3 files changed, 329 insertions(+), 16 deletions(-) create mode 100644 Source/iOS/CALayerExporter.h create mode 100644 Source/iOS/CALayerExporter.m diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index b1e66d77e..0088782dc 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -125,8 +125,6 @@ 6649E05916172CCC00AFE92A /* CALayerWithChildHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */; }; 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */; }; - 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6649E0921617432700AFE92A /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6649E0931617432700AFE92A /* CALayerExporter.m */; }; 666053231650184000B3B493 /* SVGKFastImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 666053211650184000B3B493 /* SVGKFastImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666053241650184000B3B493 /* SVGKFastImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 666053221650184000B3B493 /* SVGKFastImageView.m */; }; 666414C0165006F80051A356 /* SVGKLayeredImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 666414BE165006F80051A356 /* SVGKLayeredImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -138,6 +136,8 @@ 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133516179F4400359714 /* SVGElementInstance.m */; }; 66C0133B16179FD700359714 /* SVGElementInstanceList.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133916179FD700359714 /* SVGElementInstanceList.m */; }; 66C0133F1617A33000359714 /* SVGKParserDefsAndUse.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C0133D1617A33000359714 /* SVGKParserDefsAndUse.m */; }; + 66E861F3168786900059C9C4 /* CALayerExporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E861F1168786900059C9C4 /* CALayerExporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66E861F4168786900059C9C4 /* CALayerExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66E861F2168786900059C9C4 /* CALayerExporter.m */; }; 66FED67C165FB9C6006A43F6 /* DOMHelperUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 66FED67A165FB9C6006A43F6 /* DOMHelperUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; 66FED67D165FB9C6006A43F6 /* DOMHelperUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FED67B165FB9C6006A43F6 /* DOMHelperUtilities.m */; }; /* End PBXBuildFile section */ @@ -275,8 +275,6 @@ 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAShapeLayerWithHitTest.h; sourceTree = ""; }; 6649DFE516172CCC00AFE92A /* CAShapeLayerWithHitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAShapeLayerWithHitTest.m; sourceTree = ""; }; 6649E05F16172CE200AFE92A /* SVGKit-iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SVGKit-iOS-Prefix.pch"; sourceTree = ""; }; - 6649E0921617432700AFE92A /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CALayerExporter.h; path = "calayer-exporter/CALayerExporter.h"; sourceTree = SOURCE_ROOT; }; - 6649E0931617432700AFE92A /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; 666053211650184000B3B493 /* SVGKFastImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKFastImageView.h; sourceTree = ""; }; 666053221650184000B3B493 /* SVGKFastImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGKFastImageView.m; sourceTree = ""; }; 666414BE165006F80051A356 /* SVGKLayeredImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGKLayeredImageView.h; sourceTree = ""; }; @@ -296,6 +294,8 @@ 66C013401617A52600359714 /* SVGUseElement_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGUseElement_Mutable.h; sourceTree = ""; }; 66C013421617A8FF00359714 /* SVGElementInstance_Mutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstance_Mutable.h; sourceTree = ""; }; 66C013441617AA8600359714 /* SVGElementInstanceList_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementInstanceList_Internal.h; sourceTree = ""; }; + 66E861F1168786900059C9C4 /* CALayerExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerExporter.h; sourceTree = ""; }; + 66E861F2168786900059C9C4 /* CALayerExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CALayerExporter.m; sourceTree = ""; }; 66FED67A165FB9C6006A43F6 /* DOMHelperUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHelperUtilities.h; sourceTree = ""; }; 66FED67B165FB9C6006A43F6 /* DOMHelperUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DOMHelperUtilities.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -347,7 +347,6 @@ 6639633E16145D7700E58CCA /* EXTERNAL REFERENCES */ = { isa = PBXGroup; children = ( - 6649E0911617432700AFE92A /* calayer-exporter */, 6649DF6B16172CCC00AFE92A /* Source */, ); name = "EXTERNAL REFERENCES"; @@ -535,6 +534,8 @@ 6649DFE116172CCC00AFE92A /* iOS */ = { isa = PBXGroup; children = ( + 66E861F1168786900059C9C4 /* CALayerExporter.h */, + 66E861F2168786900059C9C4 /* CALayerExporter.m */, 6649DFE216172CCC00AFE92A /* CALayerWithChildHitTest.h */, 6649DFE316172CCC00AFE92A /* CALayerWithChildHitTest.m */, 6649DFE416172CCC00AFE92A /* CAShapeLayerWithHitTest.h */, @@ -552,15 +553,6 @@ path = "XCodeProjectData/SVGKit-iOS"; sourceTree = ""; }; - 6649E0911617432700AFE92A /* calayer-exporter */ = { - isa = PBXGroup; - children = ( - 6649E0921617432700AFE92A /* CALayerExporter.h */, - 6649E0931617432700AFE92A /* CALayerExporter.m */, - ); - path = "calayer-exporter"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -629,13 +621,13 @@ 6649E05616172CCC00AFE92A /* SVGUtils.h in Headers */, 6649E05816172CCC00AFE92A /* CALayerWithChildHitTest.h in Headers */, 6649E05A16172CCC00AFE92A /* CAShapeLayerWithHitTest.h in Headers */, - 6649E0941617432700AFE92A /* CALayerExporter.h in Headers */, 661008931632E30B00DD3C38 /* SVGKParserDOM.h in Headers */, 6649E04B16172CCC00AFE92A /* SVGKImageView.h in Headers */, 666053231650184000B3B493 /* SVGKFastImageView.h in Headers */, 666414C0165006F80051A356 /* SVGKLayeredImageView.h in Headers */, 666414C416500D900051A356 /* SVGKLayer.h in Headers */, 66FED67C165FB9C6006A43F6 /* DOMHelperUtilities.h in Headers */, + 66E861F3168786900059C9C4 /* CALayerExporter.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -759,7 +751,6 @@ 6649E05716172CCC00AFE92A /* SVGUtils.m in Sources */, 6649E05916172CCC00AFE92A /* CALayerWithChildHitTest.m in Sources */, 6649E05B16172CCC00AFE92A /* CAShapeLayerWithHitTest.m in Sources */, - 6649E0951617432700AFE92A /* CALayerExporter.m in Sources */, 66C0132F16179DCC00359714 /* SVGDefsElement.m in Sources */, 66C0133316179E6F00359714 /* SVGUseElement.m in Sources */, 66C0133716179F4400359714 /* SVGElementInstance.m in Sources */, @@ -770,6 +761,7 @@ 666414C516500D900051A356 /* SVGKLayer.m in Sources */, 666053241650184000B3B493 /* SVGKFastImageView.m in Sources */, 66FED67D165FB9C6006A43F6 /* DOMHelperUtilities.m in Sources */, + 66E861F4168786900059C9C4 /* CALayerExporter.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/iOS/CALayerExporter.h b/Source/iOS/CALayerExporter.h new file mode 100644 index 000000000..8a7230bb9 --- /dev/null +++ b/Source/iOS/CALayerExporter.h @@ -0,0 +1,38 @@ +// +// CALayerExporter.h +// SVGPad +// +// Created by Steven Fusco on 11/28/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import +#import + +@protocol CALayerExporterDelegate; + +@interface CALayerExporter : NSObject +{ + @private + NSMutableDictionary* propertyRegistry; +} + +@property (readwrite,nonatomic,retain) UIView* rootView; +@property (readwrite,nonatomic,assign) id delegate; + +- (CALayerExporter*) initWithView:(UIView*)v; +- (void) startExport; + +@end + + +@protocol CALayerExporterDelegate + +- (void) layerExporter:(CALayerExporter*)exporter didParseLayer:(CALayer*)layer withStatement:(NSString*)statement; + +@optional + +- (void) layerExporterDidFinish:(CALayerExporter*)exporter; + +@end diff --git a/Source/iOS/CALayerExporter.m b/Source/iOS/CALayerExporter.m new file mode 100644 index 000000000..5ba04b602 --- /dev/null +++ b/Source/iOS/CALayerExporter.m @@ -0,0 +1,283 @@ +// +// CALayerExporter.m +// SVGPad +// +// Created by Steven Fusco on 11/28/11. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "CALayerExporter.h" + +typedef struct ExportPathCommandsContext { + NSString* pathName; + NSMutableString* pathCommands; +} ExportPathCommandsContext; + +void exportPathCommands(void *exportPathCommandsConextPtr, const CGPathElement *element) +{ + ExportPathCommandsContext* ctx = (ExportPathCommandsContext*) exportPathCommandsConextPtr; + NSMutableString* pathCommands = ctx->pathCommands; + NSString* pathName = ctx-> pathName; + CGPoint* pathPoints = element->points; + switch (element->type) { + case kCGPathElementMoveToPoint: + [pathCommands appendFormat:@"\nCGPathMoveToPoint(%@, NULL, %f, %f);", pathName, pathPoints[0].x, pathPoints[0].y]; + break; + case kCGPathElementAddLineToPoint: + [pathCommands appendFormat:@"\nCGPathAddLineToPoint(%@, NULL, %f, %f);", pathName, pathPoints[0].x, pathPoints[0].y]; + break; + case kCGPathElementAddQuadCurveToPoint: + { + CGFloat cpx = pathPoints[0].x; + CGFloat cpy = pathPoints[0].y; + CGFloat x = pathPoints[1].x; + CGFloat y = pathPoints[1].y; + [pathCommands appendFormat:@"\nCGPathAddQuadCurveToPoint(%@, NULL, %f, %f, %f, %f);", pathName, cpx, cpy, x, y]; + } + break; + case kCGPathElementAddCurveToPoint: + { + CGFloat cp1x = pathPoints[0].x; + CGFloat cp1y = pathPoints[0].y; + CGFloat cp2x = pathPoints[1].x; + CGFloat cp2y = pathPoints[1].y; + CGFloat x = pathPoints[2].x; + CGFloat y = pathPoints[2].y; + [pathCommands appendFormat:@"\nCGPathAddCurveToPoint(%@, NULL, %f, %f, %f, %f, %f, %f);", pathName, cp1x, cp1y, cp2x, cp2y, x, y]; + } + break; + case kCGPathElementCloseSubpath: + [pathCommands appendFormat:@"\nCGPathCloseSubpath(%@);", pathName]; + break; + + default: + break; + } +} + +@interface CALayerExporter(Private) + +- (void)processLayer:(CALayer *)currentLayer index:(NSInteger)index parent:(NSString*)parentName; + +@end + + +@implementation CALayerExporter + +@synthesize delegate; +@synthesize rootView; + +- (id)initWithView:(UIView*)v +{ + self = [super init]; + if (self) { + self.rootView = v; + + propertyRegistry = [[NSMutableDictionary dictionary] retain]; + + NSArray* CALayerProperties = [NSArray arrayWithObjects:@"name", @"bounds", @"frame", nil]; + [propertyRegistry setObject:CALayerProperties + forKey:NSStringFromClass([CALayer class])]; + + NSArray* CAShapeLayerProperties = [NSArray arrayWithObjects:@"path", @"fillColor", @"fillRule", @"strokeColor", @"lineWidth", @"miterLimit", @"lineCap", @"lineJoin", @"lineDashPhase", @"lineDashPattern", nil]; + [propertyRegistry setObject:CAShapeLayerProperties + forKey:NSStringFromClass([CAShapeLayer class])]; + } + return self; +} + +- (void)dealloc { + [rootView release]; + [super dealloc]; +} + +- (void)startExport +{ + if (nil == rootView) { + return; + } + + [self processLayer:self.rootView.layer index:0 parent:@"root"]; + + if ([self.delegate respondsToSelector:@selector(layerExporterDidFinish:)]) { + [self.delegate layerExporterDidFinish:self]; + } +} + +- (void)processLayer:(CALayer *)currentLayer index:(NSInteger)index parent:(NSString*)parentName +{ + NSString* className = NSStringFromClass([currentLayer class]); + NSString* layerName = [NSString stringWithFormat:@"%@_layer%d", parentName, index]; + NSString* createStatement = [NSString stringWithFormat:@"%@* %@ = [[%@ alloc] init];", className, layerName, className]; + + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:createStatement]; + + for (NSString* registeredClassName in [propertyRegistry allKeys]) { + + Class registeredClass = NSClassFromString(registeredClassName); + if ([currentLayer isKindOfClass:registeredClass]) { + + for (NSString* propertyName in [propertyRegistry objectForKey:registeredClassName]) { + + SEL message = NSSelectorFromString(propertyName); + + NSMethodSignature* methodSig = [currentLayer methodSignatureForSelector:message]; + + NSString* propertyValue = nil; + const char * methodReturnType = [methodSig methodReturnType]; + + if (0 == strcmp("@", methodReturnType)) { + + id v = [currentLayer performSelector:message]; + + if (nil == v) { + propertyValue = @"nil"; + } else if ([v isKindOfClass:[NSString class]]) { + propertyValue = [NSString stringWithFormat:@"@\"%@\"", v]; + } else { + propertyValue = NSStringFromClass([v class]); + } + } else { + NSInvocation *inv = [NSInvocation invocationWithMethodSignature:methodSig]; + [inv setSelector:message]; + [inv setTarget:currentLayer]; + [inv invoke]; + + if (0 == strcmp("f", methodReturnType)) { + float r; + [inv getReturnValue:&r]; + propertyValue = [NSString stringWithFormat:@"%f", r]; + } else if (0 == strcmp("{CGRect={CGPoint=ff}{CGSize=ff}}", methodReturnType)) { + CGRect r; + [inv getReturnValue:&r]; + propertyValue = [NSString stringWithFormat:@"CGRectMake(%f, %f, %f, %f)", r.origin.x, r.origin.y, r.size.width, r.size.height]; + } else if (0 == strcmp("^{CGColor=}", methodReturnType)) { + + CGColorRef color; + [inv getReturnValue:&color]; + + if (0 == color) { + propertyValue = @"0"; + } else { + NSString* colorName = [NSString stringWithFormat:@"%@_%@_colorref", layerName, propertyName]; + NSString* spaceName = [colorName stringByAppendingString:@"_colorSpace"]; + NSString* componentsName = [colorName stringByAppendingString:@"_colorComponents"]; + + CGColorSpaceRef colorSpace = CGColorGetColorSpace(color); + + NSMutableString* colorSpaceCreateStatement = [NSMutableString stringWithFormat:@"CGColorSpaceRef %@ = ", spaceName]; + + CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace); + switch (colorSpaceModel) { + case kCGColorSpaceModelMonochrome: + [colorSpaceCreateStatement appendString:@"CGColorSpaceCreateDeviceGray();"]; + break; + case kCGColorSpaceModelRGB: + [colorSpaceCreateStatement appendString:@"CGColorSpaceCreateDeviceRGB();"]; + break; + case kCGColorSpaceModelCMYK: + [colorSpaceCreateStatement appendString:@"CGColorSpaceCreateDeviceCMYK();"]; + break; + case kCGColorSpaceModelLab: + // CGColorSpaceCreateLab(<#const CGFloat *whitePoint#>, <#const CGFloat *blackPoint#>, <#const CGFloat *range#>) + break; + case kCGColorSpaceModelDeviceN: + // CGColorSpaceCreateWithICCProfile(<#CFDataRef data#>) + break; + case kCGColorSpaceModelIndexed: + // CGColorSpaceCreateIndexed(<#CGColorSpaceRef baseSpace#>, <#size_t lastIndex#>, <#const unsigned char *colorTable#>) + break; + case kCGColorSpaceModelPattern: + // CGColorSpaceCreatePattern(<#CGColorSpaceRef baseSpace#>) + break; + default: + break; + } + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:colorSpaceCreateStatement]; + + const CGFloat* colorComponents = CGColorGetComponents(color); + size_t colorComponentsCount = CGColorGetNumberOfComponents(color); + NSMutableString* colorComponentsCreateStatement = [NSMutableString stringWithFormat:@"CGFloat %@[] = ", componentsName]; + [colorComponentsCreateStatement appendString:@"{"]; + for (int i=0; i != colorComponentsCount; ++i) { + [colorComponentsCreateStatement appendFormat:@"%@%f", ((i != 0) ? @"," : @""), colorComponents[i]]; + } + [colorComponentsCreateStatement appendString:@"};"]; + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:colorComponentsCreateStatement]; + + NSString* colorCreateStatement = [NSString stringWithFormat:@"CGColorRef %@ = CGColorCreate(%@, %@);", colorName, spaceName, componentsName]; + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:colorCreateStatement]; + + propertyValue = colorName; + } + + } else if (0 == strcmp("^{CGPath=}", methodReturnType)) { + CGPathRef path; + [inv getReturnValue:&path]; + + if (0 == path) { + propertyValue = @"0"; + } else { + + NSString* pathName = [NSString stringWithFormat:@"%@_%@_pathref", layerName, propertyName]; + NSString* pathCreateStatement = [NSString stringWithFormat:@"CGMutablePathRef %@ = CGPathCreateMutable();", pathName]; + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:pathCreateStatement]; + + NSMutableString* pathCommands = [NSMutableString string]; + ExportPathCommandsContext exportPathContext; + exportPathContext.pathName = pathName; + exportPathContext.pathCommands = pathCommands; + + CGPathApply(path, &exportPathContext, exportPathCommands); + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:pathCommands]; + + propertyValue = pathName; + } + } else { + propertyValue = [NSString stringWithCString:methodReturnType encoding:NSUTF8StringEncoding]; + } + } + + NSString* propertyAssignmentStatement = [NSString stringWithFormat:@"%@.%@ = %@;", layerName, propertyName, propertyValue]; + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:propertyAssignmentStatement]; + } + } + } + + + NSString* addSublayerStatement = [NSString stringWithFormat:@"[%@ addSublayer:%@];", parentName, layerName]; + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:addSublayerStatement]; + + NSString* releaseStatement = [NSString stringWithFormat:@"[%@ release];", layerName]; + [self.delegate layerExporter:self + didParseLayer:currentLayer + withStatement:releaseStatement]; + + int i = index; + for (CALayer* childLayer in currentLayer.sublayers) { + [self processLayer:childLayer index:++i parent:layerName]; + } +} + + + + + +@end + From febc27210c48ff3aee82b083d8f518e96292b3da Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Dec 2012 18:45:10 +0000 Subject: [PATCH 109/110] UPDATED readme -- submodule has been deleted (phew) --- README.mdown | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.mdown b/README.mdown index 20ce391ad..dd77f2c20 100644 --- a/README.mdown +++ b/README.mdown @@ -92,14 +92,11 @@ Feel free to report any issues or suggest improvements in the issue tracker Installation ----- -Dependencies: - - git submodule init && git submodule update - iOS (iPhone/iPad): 1. Open the project "XcodeProjects/SVGKit/SVGKit" 2. Select the target "SVGKit Library" from the dropdown build selector at top left 3. Build + 4a. (open the Products section on left hand bar in Xcode, right click the product, and select "Show in Finder". THEN GO UP ONE DIRECTORY! You MUST NOT USE the Product that Xcode shows you - it IS WRONG, it is a BUG IN APPLE'S XCODE) 4. Look in your output directory for a folder named "debug-universal" - this contains a library + headers for: iPhone, iPad, iOS Simulator 5. Drag/drop the library file, and the headers folder (should be called "usr") into your iPhone/iPad project. From 03f3b016e53aef967c23fcd1b25dfcfcec74fc61 Mon Sep 17 00:00:00 2001 From: adamgit Date: Sun, 23 Dec 2012 18:45:53 +0000 Subject: [PATCH 110/110] Continuing to fix the crap git crap about submodules (git doesn't really support submodules, way too many bugs in git here :( ) --- calayer-exporter | 1 - 1 file changed, 1 deletion(-) delete mode 160000 calayer-exporter diff --git a/calayer-exporter b/calayer-exporter deleted file mode 160000 index 6d029ac06..000000000 --- a/calayer-exporter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6d029ac06080bee403c3a97bddd9569e4ecb6b51