diff --git a/Framework/IJSVG/IJSVG/Source/Core/IJSVG.m b/Framework/IJSVG/IJSVG/Source/Core/IJSVG.m index ac982d7..56abbcf 100644 --- a/Framework/IJSVG/IJSVG/Source/Core/IJSVG.m +++ b/Framework/IJSVG/IJSVG/Source/Core/IJSVG.m @@ -746,16 +746,18 @@ context:(CGContextRef)ref error:(NSError**)error { + BOOL transaction = IJSVGBeginTransaction(); CGContextSaveGState(ref); // make sure we setup a transaction - IJSVGBeginTransaction(); CGFloat backingScale = [self backingScaleFactor]; [self.rootLayer renderInContext:ref viewPort:rect backingScale:backingScale quality:_renderQuality]; - IJSVGEndTransaction(); CGContextRestoreGState(ref); + if(transaction) { + IJSVGEndTransaction(); + } return YES; } diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.h b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.h index 1690434..a9ebe24 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.h +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.h @@ -15,7 +15,6 @@ @interface IJSVGImageLayer : IJSVGLayer { @private - IJSVGTransformLayer* _transformLayer; IJSVGLayer* _imageLayer; } diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.m b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.m index 92be5c8..a2584ab 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.m +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGImageLayer.m @@ -14,7 +14,6 @@ { (void)[_image release], _image = nil; (void)[_imageLayer release], _imageLayer = nil; - (void)[_transformLayer release], _transformLayer = nil; [super dealloc]; } @@ -39,27 +38,15 @@ - (void)reloadContent { - if(_transformLayer == nil) { - _transformLayer = [IJSVGTransformLayer layer].retain; - [self addSublayer:_transformLayer]; - } - - CGRect imageBounds = _image.intrinsicBounds; - CGRect bounds = self.bounds; - _transformLayer.frame = CGRectMake(-((imageBounds.size.width / 2.f) - (bounds.size.width / 2.f)), - -((imageBounds.size.height / 2.f) - (bounds.size.height / 2.f)), - imageBounds.size.width, imageBounds.size.height); - CGAffineTransform transform = CGAffineTransformMakeScale(1.f, -1.f); - _transformLayer.affineTransform = transform; - if(_imageLayer == nil) { _imageLayer = [IJSVGLayer layer].retain; - CGRect bounds = _image.intrinsicBounds; - _imageLayer.frame = bounds; - _imageLayer.affineTransform = _image.intrinsicTransform; - [_transformLayer addSublayer:_imageLayer]; + _imageLayer.contentsGravity = kCAGravityResize; + _imageLayer.backgroundColor = NSColor.redColor.CGColor; + [self addSublayer:_imageLayer]; } + _imageLayer.frame = self.bounds; + _imageLayer.affineTransform = CGAffineTransformMakeScale(1.f, -1.f); _imageLayer.contents = (id)_image.CGImage; [self setNeedsDisplay]; } diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.h b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.h index daf355b..d46f337 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.h +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.h @@ -90,8 +90,8 @@ typedef NS_OPTIONS(NSUInteger, IJSVGLayerTraits) { + (IJSVGLayerFillType)fillTypeForFill:(id)fill; + (NSArray*)deepestSublayersOfLayer:(CALayer*)layer; -+ (void)recursivelyWalkLayer:(CALayer*)layer - withBlock:(void (^)(CALayer* layer, BOOL* stop))block; ++ (void)recursivelyWalkLayer:(CALayer*)layer + withBlock:(void (^)(CALayer* layer, BOOL* stop))block; - (void)applySublayerMaskToContext:(CGContextRef)context forSublayer:(IJSVGLayer*)sublayer diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.m b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.m index 85a7a55..6dd7dc6 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.m +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGLayer.m @@ -25,6 +25,14 @@ [super dealloc]; } +- (instancetype)init +{ + if((self = [super init]) != nil) { + _boundingBox = CGRectNull; + } + return self; +} + - (CAShapeLayerFillRule)fillRule { return kCAFillRuleNonZero; @@ -188,6 +196,7 @@ drawingBlock:(dispatch_block_t)drawingBlock { CGRect bounds = layer.bounds; + CGRect maskFrame = maskLayer.frame; CGFloat scale = layer.backingScaleFactor; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); CGContextRef offscreenContext = CGBitmapContextCreate(NULL, ceilf(bounds.size.width * scale), @@ -196,17 +205,21 @@ CGContextSaveGState(ctx); CGContextScaleCTM(offscreenContext, scale, scale); - CGContextTranslateCTM(offscreenContext, maskLayer.frame.origin.x, maskLayer.frame.origin.y); + CGContextTranslateCTM(offscreenContext, maskFrame.origin.x, maskFrame.origin.y); [maskLayer renderInContext:offscreenContext]; CGImageRef maskImage = CGBitmapContextCreateImage(offscreenContext); CGContextClipToMask(ctx, bounds, maskImage); + drawingBlock(); + +// CGContextSetAlpha(ctx, .5f); +// CGContextDrawImage(ctx, bounds, maskImage); + CGImageRelease(maskImage); CGContextRelease(offscreenContext); CGColorSpaceRelease(colorSpace); - drawingBlock(); CGContextRestoreGState(ctx); } @@ -245,8 +258,8 @@ return arr; } -+ (void)recursivelyWalkLayer:(CALayer*)layer - withBlock:(void (^)(CALayer* layer, BOOL* stop))block ++ (void)recursivelyWalkLayer:(CALayer*)layer + withBlock:(void (^)(CALayer* layer, BOOL* stop))block { // call for layer and mask if there is one BOOL stop = NO; @@ -256,7 +269,7 @@ } // sublayers!! - for (CALayer* aLayer in layer.sublayers) { + for (CALayer* aLayer in layer.sublayers) { [self recursivelyWalkLayer:aLayer withBlock:block]; } @@ -271,9 +284,11 @@ + (void)logLayer:(CALayer*)layer depth:(NSUInteger)depth { - NSLog(@"%@ %@",[@"" stringByPaddingToLength:depth + NSLog(@"%@ %@ frame: %@ transform: %@",[@"" stringByPaddingToLength:depth withString:@"- - " - startingAtIndex:0], layer.debugDescription); + startingAtIndex:0], layer, + NSStringFromRect(layer.frame), + [IJSVGTransform affineTransformToSVGTransformComponentString:layer.affineTransform]); for(CALayer* sublayer in layer.debugLayers) { [self logLayer:sublayer depth:depth+1]; @@ -287,7 +302,7 @@ CGRect layerFrame = layer.frame; // if we are a transform layer, we can just apply its transform // to its sublayers and keep going down the tree - if([layer isKindOfClass:IJSVGTransformLayer.class]) { + if([layer isKindOfClass:IJSVGTransformLayer.class] == YES) { CGRect frame = [self calculateFrameForSublayers:layer.sublayers]; frame = CGRectApplyAffineTransform(frame, layer.affineTransform); layerFrame = frame; @@ -306,6 +321,7 @@ if (_backingScaleFactor == newFactor) { return; } + _backingScaleFactor = newFactor; self.contentsScale = newFactor; self.rasterizationScale = newFactor; @@ -427,7 +443,7 @@ - (CGRect)boundingBox { - return self.frame; + return CGRectIsNull(_boundingBox) == NO ? _boundingBox : self.frame; } - (CGRect)boundingBoxBounds diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGPatternLayer.m b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGPatternLayer.m index 5730d82..b68c42a 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGPatternLayer.m +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGPatternLayer.m @@ -108,18 +108,9 @@ void IJSVGPatternDrawingCallBack(void* info, CGContextRef ctx) // of it anyway if(_patternNode.viewBox != nil && _patternNode.viewBox.isZeroRect == NO) { if(_patternNode.units == IJSVGUnitObjectBoundingBox) { - IJSVGUnitRect* viewBox = [[_patternNode.viewBox copyByConvertingToUnitsLengthType:IJSVGUnitLengthTypePercentage] autorelease]; - - // values at this poit need to be decimal based as they are - // bounding box, I think this is correct (not sure...) -// viewBox.origin.x.value /= 100.f; -// viewBox.origin.y.value /= 100.f; -// viewBox.size.width.value /= 100.f; -// viewBox.size.height.value /= 100.f; -// -// // work out the transform - CGRect transformedRect = [viewBox computeValue:rect.size]; - _viewBox = transformedRect; + IJSVGUnitRect* viewBox = nil; + viewBox = [[_patternNode.viewBox copyByConvertingToUnitsLengthType:IJSVGUnitLengthTypePercentage] autorelease]; + _viewBox = [viewBox computeValue:rect.size]; } } diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGRootLayer.m b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGRootLayer.m index 96fa0c6..5fb46c5 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGRootLayer.m +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGRootLayer.m @@ -46,8 +46,7 @@ __block IJSVGRootLayer* weakSelf = self; for(CALayer* layer in self.sublayers) { [IJSVGLayer recursivelyWalkLayer:layer - withBlock:^(CALayer *layer, BOOL *stop) { - IJSVGLayer* propLayer = (IJSVGLayer*)layer; + withBlock:^(CALayer* propLayer, BOOL *stop) { propLayer.renderQuality = weakSelf.renderQuality; propLayer.backingScaleFactor = weakSelf.backingScaleFactor; }]; diff --git a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGShapeLayer.m b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGShapeLayer.m index f28e97b..02fa904 100644 --- a/Framework/IJSVG/IJSVG/Source/Layers/IJSVGShapeLayer.m +++ b/Framework/IJSVG/IJSVG/Source/Layers/IJSVGShapeLayer.m @@ -55,9 +55,10 @@ - (void)setBackingScaleFactor:(CGFloat)newFactor { - if (self.backingScaleFactor == newFactor) { + if (_backingScaleFactor == newFactor) { return; } + _backingScaleFactor = newFactor; self.contentsScale = newFactor; self.rasterizationScale = newFactor; diff --git a/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.h b/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.h index 22f6849..32c8dae 100644 --- a/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.h +++ b/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.h @@ -13,7 +13,6 @@ @interface IJSVGImage : IJSVGNode { CGImageRef CGImage; - IJSVGPath* imagePath; } @property (nonatomic, readonly) CGSize intrinsicSize; diff --git a/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.m b/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.m index 16b9930..3f8d1c7 100644 --- a/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.m +++ b/Framework/IJSVG/IJSVG/Source/Nodes/IJSVGImage.m @@ -15,7 +15,6 @@ - (void)dealloc { (void)(CGImageRelease(CGImage)), CGImage = nil; - (void)([imagePath release]), imagePath = nil; (void)([_image release]), _image = nil; [super dealloc]; } @@ -48,18 +47,6 @@ [self setImage:anImage]; } -- (IJSVGPath*)path -{ - if (imagePath == nil) { - // lazy load the path as it might not be needed - imagePath = [[IJSVGPath alloc] init]; - CGRect rect = CGRectMake(0.f, 0.f, self.width.value, self.height.value); - CGPathAddRect(imagePath.path, NULL, rect); - [imagePath close]; - } - return imagePath; -} - - (void)setImage:(NSImage*)anImage { if (_image != nil) { @@ -89,8 +76,8 @@ - (CGRect)intrinsicBounds { CGRect rect = CGRectZero; - rect.size.width = self.intrinsicSize.width; - rect.size.height = self.intrinsicSize.height; + rect.size.width = _intrinsicSize.width; + rect.size.height = _intrinsicSize.height; return rect; } diff --git a/Framework/IJSVG/IJSVG/Source/Parsing/IJSVGParser.m b/Framework/IJSVG/IJSVG/Source/Parsing/IJSVGParser.m index fdceafd..2c06b79 100644 --- a/Framework/IJSVG/IJSVG/Source/Parsing/IJSVGParser.m +++ b/Framework/IJSVG/IJSVG/Source/Parsing/IJSVGParser.m @@ -432,7 +432,7 @@ static NSDictionary* _IJSVGAttributeDictionaryTransforms = nil; } return transforms; }); -// + // we need to change how transforms work if our unit space is not userSpaceOnUse for(IJSVGTransform* transform in node.transforms) { [transform applyBounds:computedBounds diff --git a/Framework/IJSVG/IJSVG/Source/Rendering/IJSVGLayerTree.m b/Framework/IJSVG/IJSVG/Source/Rendering/IJSVGLayerTree.m index a8cee8d..2d9aed8 100644 --- a/Framework/IJSVG/IJSVG/Source/Rendering/IJSVGLayerTree.m +++ b/Framework/IJSVG/IJSVG/Source/Rendering/IJSVGLayerTree.m @@ -373,10 +373,13 @@ sublayers:(NSArray*>*)sublayers { IJSVGGroupLayer* layer = [IJSVGGroupLayer layer]; - CGRect rect = [IJSVGLayer calculateFrameForSublayers:sublayers]; - layer.frame = rect; - CGAffineTransform identity = CGAffineTransformMakeTranslation(-rect.origin.x, - -rect.origin.y); + layer.frame = [IJSVGLayer calculateFrameForSublayers:sublayers]; + layer.boundingBox = [IJSVGLayer calculateFrameForSublayers:sublayers]; + layer.sublayers = sublayers; + + CGAffineTransform identity = CGAffineTransformMakeTranslation(-layer.frame.origin.x, + -layer.frame.origin.y); + for(CALayer* sublayer in sublayers) { CGAffineTransform transform = sublayer.affineTransform; transform = CGAffineTransformConcat(transform, identity); @@ -503,8 +506,8 @@ #pragma mark Transforms - (CALayer*)applyTransforms:(NSArray*)transforms - toLayer:(CALayer*)layer - fromNode:(IJSVGNode*)node + toLayer:(CALayer*)layer + fromNode:(IJSVGNode*)node { // any x and y? diff --git a/Framework/IJSVG/IJSVG/Source/Utils/IJSVGTransform.m b/Framework/IJSVG/IJSVG/Source/Utils/IJSVGTransform.m index 1e68d44..21e6ae7 100644 --- a/Framework/IJSVG/IJSVG/Source/Utils/IJSVGTransform.m +++ b/Framework/IJSVG/IJSVG/Source/Utils/IJSVGTransform.m @@ -207,9 +207,7 @@ void IJSVGApplyTransform(NSArray* transforms, IJSVGTransformApp switch(self.command) { case IJSVGTransformCommandTranslate: { - NSLog(@"%f",self.parameters[0]); self.parameters[0] *= bounds.size.width; - NSLog(@"%f - %@",self.parameters[0],self.description); if(self.parameterCount == 2) { self.parameters[1] *= bounds.size.height; } @@ -627,7 +625,7 @@ void IJSVGApplyTransform(NSArray* transforms, IJSVGTransformApp - (NSString*)description { return [NSString stringWithFormat:@"%@ %@", [super description], - [self.class affineTransformToSVGMatrixString:self.CGAffineTransform]]; + [self.class affineTransformToSVGTransformComponentString:self.CGAffineTransform]]; } @end diff --git a/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj b/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj index 7b38b70..de61f2e 100644 --- a/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj +++ b/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj @@ -92,6 +92,7 @@ 59265CE71C4F840400F333F0 /* css.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = css.svg; sourceTree = ""; }; 59265CE91C4F843E00F333F0 /* SVGExampleView6.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGExampleView6.h; sourceTree = ""; }; 59265CEA1C4F843E00F333F0 /* SVGExampleView6.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGExampleView6.m; sourceTree = ""; }; + 5934D504280C933300BEF20F /* IJSVGExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = IJSVGExample.entitlements; sourceTree = ""; }; 59459CEB19B906FE00CE493B /* clipped.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = clipped.svg; sourceTree = ""; }; 59459CED19B9074F00CE493B /* SVGExampleView4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGExampleView4.h; sourceTree = ""; }; 59459CEE19B9074F00CE493B /* SVGExampleView4.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGExampleView4.m; sourceTree = ""; }; @@ -171,6 +172,7 @@ 5956657919B62F4600D805FF /* IJSVGExample */ = { isa = PBXGroup; children = ( + 5934D504280C933300BEF20F /* IJSVGExample.entitlements */, 5956657E19B62F4600D805FF /* AppDelegate.h */, 5956657F19B62F4600D805FF /* AppDelegate.m */, 5956658119B62F4600D805FF /* Images.xcassets */, @@ -523,6 +525,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = IJSVGExample/IJSVGExample.entitlements; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = IJSVGExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; @@ -534,6 +537,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = IJSVGExample/IJSVGExample.entitlements; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = IJSVGExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; diff --git a/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcuserdata/curtishard.xcuserdatad/UserInterfaceState.xcuserstate b/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcuserdata/curtishard.xcuserdatad/UserInterfaceState.xcuserstate index f0d16f9..45abb4b 100644 Binary files a/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcuserdata/curtishard.xcuserdatad/UserInterfaceState.xcuserstate and b/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcuserdata/curtishard.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index c8984e0..1695a6a 100644 --- a/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -20,5 +20,21 @@ landmarkType = "7"> + + + + diff --git a/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcschemes/IJSVGExample.xcscheme b/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcschemes/IJSVGExample.xcscheme index 0bf1251..4fd9516 100644 --- a/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcschemes/IJSVGExample.xcscheme +++ b/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcschemes/IJSVGExample.xcscheme @@ -87,7 +87,7 @@ + isEnabled = "YES"> diff --git a/IJSVGExample/IJSVGExample/AJ_Digital_Camera.svg b/IJSVGExample/IJSVGExample/AJ_Digital_Camera.svg index 00f5143..d3eeb4b 100644 --- a/IJSVGExample/IJSVGExample/AJ_Digital_Camera.svg +++ b/IJSVGExample/IJSVGExample/AJ_Digital_Camera.svg @@ -1,7415 +1,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/IJSVGExample/IJSVGExample/IJSVGExample.entitlements b/IJSVGExample/IJSVGExample/IJSVGExample.entitlements new file mode 100644 index 0000000..7a2230d --- /dev/null +++ b/IJSVGExample/IJSVGExample/IJSVGExample.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/IJSVGExample/IJSVGExample/Info.plist b/IJSVGExample/IJSVGExample/Info.plist index c2bcfae..f6e3ee1 100644 --- a/IJSVGExample/IJSVGExample/Info.plist +++ b/IJSVGExample/IJSVGExample/Info.plist @@ -24,6 +24,8 @@ 1 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) + NSAppTransportSecurity + NSHumanReadableCopyright Copyright © 2014 Curtis Hard. All rights reserved. NSMainNibFile diff --git a/IJSVGExample/IJSVGExample/SVGView.m b/IJSVGExample/IJSVGExample/SVGView.m index 39901e1..c023732 100644 --- a/IJSVGExample/IJSVGExample/SVGView.m +++ b/IJSVGExample/IJSVGExample/SVGView.m @@ -31,7 +31,7 @@ - (IJSVG *)svg { - return [IJSVG svgNamed:@"NewTux"]; + return [IJSVG svgNamed:@"AJ_Digital_Camera"]; } - (void)drawRect:(NSRect)dirtyRect diff --git a/IJSVGExample/IJSVGExample/test.svg b/IJSVGExample/IJSVGExample/test.svg index da930e5..5cb0304 100755 --- a/IJSVGExample/IJSVGExample/test.svg +++ b/IJSVGExample/IJSVGExample/test.svg @@ -1,7415 +1,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Rectangle + Created with Sketch. + + + + + + + + + + + + + + \ No newline at end of file