diff --git a/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj b/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj index c8c51b6..81ffad2 100644 --- a/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj +++ b/IJSVGExample/IJSVGExample.xcodeproj/project.pbxproj @@ -51,11 +51,7 @@ 59A3DA6D1E283022003E59A9 /* IJSVGTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = 59A3DA6C1E283022003E59A9 /* IJSVGTransaction.m */; }; 59B93C6D19B7D1840063E823 /* paperplane.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59B93C6C19B7D1840063E823 /* paperplane.svg */; }; 59B93C6F19B7D32C0063E823 /* products.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59B93C6E19B7D32C0063E823 /* products.svg */; }; - 59D1E39E2022577500C54672 /* IJSVGQuartzRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 59D1E39D2022577500C54672 /* IJSVGQuartzRenderer.m */; }; 59D1E3A0202279CA00C54672 /* Group.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59D1E39F202279CA00C54672 /* Group.svg */; }; - 59D6C4142049939800F16F13 /* move.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59D6C4132049939800F16F13 /* move.svg */; }; - 59D6C4162049947E00F16F13 /* sprite-1.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59D6C4152049947E00F16F13 /* sprite-1.svg */; }; - 59D6C4182049977E00F16F13 /* fa-brands.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59D6C4172049977E00F16F13 /* fa-brands.svg */; }; 59E0F5ED1E29964700F757F7 /* IJSVGUnitLength.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E0F5EC1E29964700F757F7 /* IJSVGUnitLength.m */; }; 59E2645119BA240D008A6FDB /* IJSVG.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E2641C19BA240D008A6FDB /* IJSVG.m */; }; 59E2645219BA240D008A6FDB /* IJSVGBezierPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E2641E19BA240D008A6FDB /* IJSVGBezierPathAdditions.m */; }; @@ -90,6 +86,13 @@ 59E8ABF31E2167D90032A80C /* IJSVGImageLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E8ABF21E2167D90032A80C /* IJSVGImageLayer.m */; }; 59E8ABF61E2176340032A80C /* IJSVGGroupLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E8ABF51E2176340032A80C /* IJSVGGroupLayer.m */; }; 59E8ABF91E219C860032A80C /* IJSVGMath.m in Sources */ = {isa = PBXBuildFile; fileRef = 59E8ABF81E219C860032A80C /* IJSVGMath.m */; }; + 59E9863322CF6F2300C717DD /* KORDEUTER-logo-white.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59E9863222CF6F2300C717DD /* KORDEUTER-logo-white.svg */; }; + 59EA311622CF395400DAB3B7 /* IJSVGStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 59EA310F22CF395400DAB3B7 /* IJSVGStringAdditions.m */; }; + 59EA311722CF395400DAB3B7 /* IJSVGRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 59EA311022CF395400DAB3B7 /* IJSVGRendering.m */; }; + 59EA311822CF395400DAB3B7 /* IJSVGImageRep.m in Sources */ = {isa = PBXBuildFile; fileRef = 59EA311322CF395400DAB3B7 /* IJSVGImageRep.m */; }; + 59EA311922CF395400DAB3B7 /* IJSVGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 59EA311422CF395400DAB3B7 /* IJSVGView.m */; }; + 59EA311B22CF397A00DAB3B7 /* test2.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59EA311A22CF397A00DAB3B7 /* test2.svg */; }; + 59EA311D22CF437700DAB3B7 /* test 2.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59EA311C22CF437700DAB3B7 /* test 2.svg */; }; 59F799E219B880CE00096CB7 /* htc_one.svg in Resources */ = {isa = PBXBuildFile; fileRef = 59F799E119B880CE00096CB7 /* htc_one.svg */; }; /* End PBXBuildFile section */ @@ -178,12 +181,7 @@ 59A3DA6C1E283022003E59A9 /* IJSVGTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGTransaction.m; sourceTree = ""; }; 59B93C6C19B7D1840063E823 /* paperplane.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = paperplane.svg; sourceTree = ""; }; 59B93C6E19B7D32C0063E823 /* products.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = products.svg; sourceTree = ""; }; - 59D1E39C2022577500C54672 /* IJSVGQuartzRenderer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJSVGQuartzRenderer.h; sourceTree = ""; }; - 59D1E39D2022577500C54672 /* IJSVGQuartzRenderer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJSVGQuartzRenderer.m; sourceTree = ""; }; 59D1E39F202279CA00C54672 /* Group.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Group.svg; sourceTree = ""; }; - 59D6C4132049939800F16F13 /* move.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = move.svg; sourceTree = ""; }; - 59D6C4152049947E00F16F13 /* sprite-1.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "sprite-1.svg"; sourceTree = ""; }; - 59D6C4172049977E00F16F13 /* fa-brands.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "fa-brands.svg"; sourceTree = ""; }; 59E0F5EB1E29964700F757F7 /* IJSVGUnitLength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVGUnitLength.h; sourceTree = ""; }; 59E0F5EC1E29964700F757F7 /* IJSVGUnitLength.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGUnitLength.m; sourceTree = ""; }; 59E2641B19BA240D008A6FDB /* IJSVG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVG.h; sourceTree = ""; }; @@ -252,6 +250,17 @@ 59E8ABF51E2176340032A80C /* IJSVGGroupLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGGroupLayer.m; sourceTree = ""; }; 59E8ABF71E219C860032A80C /* IJSVGMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVGMath.h; sourceTree = ""; }; 59E8ABF81E219C860032A80C /* IJSVGMath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGMath.m; sourceTree = ""; }; + 59E9863222CF6F2300C717DD /* KORDEUTER-logo-white.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = "KORDEUTER-logo-white.svg"; path = "../../../../../../../../Downloads/KORDEUTER-logo-white.svg"; sourceTree = ""; }; + 59EA310E22CF395300DAB3B7 /* IJSVGImageRep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVGImageRep.h; sourceTree = ""; }; + 59EA310F22CF395400DAB3B7 /* IJSVGStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGStringAdditions.m; sourceTree = ""; }; + 59EA311022CF395400DAB3B7 /* IJSVGRendering.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGRendering.m; sourceTree = ""; }; + 59EA311122CF395400DAB3B7 /* IJSVGRendering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVGRendering.h; sourceTree = ""; }; + 59EA311222CF395400DAB3B7 /* IJSVGView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVGView.h; sourceTree = ""; }; + 59EA311322CF395400DAB3B7 /* IJSVGImageRep.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGImageRep.m; sourceTree = ""; }; + 59EA311422CF395400DAB3B7 /* IJSVGView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJSVGView.m; sourceTree = ""; }; + 59EA311522CF395400DAB3B7 /* IJSVGStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJSVGStringAdditions.h; sourceTree = ""; }; + 59EA311A22CF397A00DAB3B7 /* test2.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = test2.svg; path = ../../../../../../../../Downloads/test2.svg; sourceTree = ""; }; + 59EA311C22CF437700DAB3B7 /* test 2.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = "test 2.svg"; path = "../../../../../../../../Desktop/test 2.svg"; sourceTree = ""; }; 59F799E119B880CE00096CB7 /* htc_one.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = htc_one.svg; sourceTree = ""; }; /* End PBXFileReference section */ @@ -321,13 +330,14 @@ 5956657A19B62F4600D805FF /* Supporting Files */ = { isa = PBXGroup; children = ( - 59D6C4172049977E00F16F13 /* fa-brands.svg */, + 59E9863222CF6F2300C717DD /* KORDEUTER-logo-white.svg */, + 59EA311C22CF437700DAB3B7 /* test 2.svg */, + 59EA311A22CF397A00DAB3B7 /* test2.svg */, 59D1E39F202279CA00C54672 /* Group.svg */, 590C87F5201FD0D4004A1554 /* car.svg */, 590C87F3201FC9E3004A1554 /* radialgradient2.svg */, 590C87F0201FBF27004A1554 /* AJ_Digital_Camera.svg */, 590C87EC201FA08C004A1554 /* intertwingly.svg */, - 59D6C4152049947E00F16F13 /* sprite-1.svg */, 590C87EE201FA092004A1554 /* NewTux.svg */, 590C87EA201F9888004A1554 /* json.svg */, 5991A2AA201E310200913E3B /* heart.svg */, @@ -340,7 +350,6 @@ 595665DD19B6309C00D805FF /* test.svg */, 5986308619BA104800CF15EA /* linecap.svg */, 5986308B19BA180E00CF15EA /* dashed.svg */, - 59D6C4132049939800F16F13 /* move.svg */, 5956657B19B62F4600D805FF /* Info.plist */, 5956657C19B62F4600D805FF /* main.m */, 5956659A19B62F9500D805FF /* IJSVGExample-Prefix.pch */, @@ -377,6 +386,14 @@ 59E2641A19BA240D008A6FDB /* source */ = { isa = PBXGroup; children = ( + 59EA310E22CF395300DAB3B7 /* IJSVGImageRep.h */, + 59EA311322CF395400DAB3B7 /* IJSVGImageRep.m */, + 59EA311122CF395400DAB3B7 /* IJSVGRendering.h */, + 59EA311022CF395400DAB3B7 /* IJSVGRendering.m */, + 59EA311522CF395400DAB3B7 /* IJSVGStringAdditions.h */, + 59EA310F22CF395400DAB3B7 /* IJSVGStringAdditions.m */, + 59EA311222CF395400DAB3B7 /* IJSVGView.h */, + 59EA311422CF395400DAB3B7 /* IJSVGView.m */, 59A3DA6B1E283022003E59A9 /* IJSVGTransaction.h */, 59A3DA6C1E283022003E59A9 /* IJSVGTransaction.m */, 598759F41E242C850024CC3F /* IJSVGExporterPathInstruction.h */, @@ -478,8 +495,6 @@ 597046A11E24352700A60138 /* IJSVGStrokeLayer.m */, 59E0F5EB1E29964700F757F7 /* IJSVGUnitLength.h */, 59E0F5EC1E29964700F757F7 /* IJSVGUnitLength.m */, - 59D1E39C2022577500C54672 /* IJSVGQuartzRenderer.h */, - 59D1E39D2022577500C54672 /* IJSVGQuartzRenderer.m */, ); name = source; path = ../../source; @@ -546,6 +561,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -567,12 +583,12 @@ files = ( 59B93C6D19B7D1840063E823 /* paperplane.svg in Resources */, 5956658219B62F4600D805FF /* Images.xcassets in Resources */, + 59EA311B22CF397A00DAB3B7 /* test2.svg in Resources */, 590C87ED201FA08C004A1554 /* intertwingly.svg in Resources */, - 59D6C4182049977E00F16F13 /* fa-brands.svg in Resources */, 590C87F1201FBF27004A1554 /* AJ_Digital_Camera.svg in Resources */, 590C87EF201FA093004A1554 /* NewTux.svg in Resources */, - 59D6C4162049947E00F16F13 /* sprite-1.svg in Resources */, 59265CE81C4F840400F333F0 /* css.svg in Resources */, + 59E9863322CF6F2300C717DD /* KORDEUTER-logo-white.svg in Resources */, 595665DE19B6309C00D805FF /* test.svg in Resources */, 590C87EB201F9888004A1554 /* json.svg in Resources */, 59D1E3A0202279CA00C54672 /* Group.svg in Resources */, @@ -582,9 +598,9 @@ 5986308719BA104800CF15EA /* linecap.svg in Resources */, 5956658519B62F4600D805FF /* MainMenu.xib in Resources */, 590C87F4201FC9E4004A1554 /* radialgradient2.svg in Resources */, + 59EA311D22CF437700DAB3B7 /* test 2.svg in Resources */, 59459CEC19B906FE00CE493B /* clipped.svg in Resources */, 590C87F6201FD0D4004A1554 /* car.svg in Resources */, - 59D6C4142049939800F16F13 /* move.svg in Resources */, 5991A2AB201E310200913E3B /* heart.svg in Resources */, 5986308C19BA180E00CF15EA /* dashed.svg in Resources */, ); @@ -608,7 +624,7 @@ 59E2646919BA240D008A6FDB /* IJSVGStyle.m in Sources */, 59E2646419BA240D008A6FDB /* IJSVGLinearGradient.m in Sources */, 595665DC19B6302600D805FF /* README.md in Sources */, - 59D1E39E2022577500C54672 /* IJSVGQuartzRenderer.m in Sources */, + 59EA311922CF395400DAB3B7 /* IJSVGView.m in Sources */, 5941DAFD1CF9BC9B00B3A911 /* IJSVGImage.m in Sources */, 599465DE1C4AA87200A2EEF3 /* IJSVGStyleSheetSelector.m in Sources */, 5948DED61BB2BFE5004156FF /* IJSVGWriter.m in Sources */, @@ -637,6 +653,7 @@ 5956658019B62F4600D805FF /* AppDelegate.m in Sources */, 59E2646519BA240D008A6FDB /* IJSVGNode.m in Sources */, 591A13E11E19838F001D1629 /* IJSVGText.m in Sources */, + 59EA311822CF395400DAB3B7 /* IJSVGImageRep.m in Sources */, 59A11E6C19B89CEA00E44498 /* SVGExampleView1.m in Sources */, 59A3DA6D1E283022003E59A9 /* IJSVGTransaction.m in Sources */, 59E2646A19BA240D008A6FDB /* IJSVGTransform.m in Sources */, @@ -648,6 +665,7 @@ 598759F61E242C850024CC3F /* IJSVGExporterPathInstruction.m in Sources */, 59E2645E19BA240D008A6FDB /* IJSVGCommandSmoothCurve.m in Sources */, 59E2645819BA240D008A6FDB /* IJSVGCommandCommandSmoothQuadraticCurve.m in Sources */, + 59EA311622CF395400DAB3B7 /* IJSVGStringAdditions.m in Sources */, 59E2645D19BA240D008A6FDB /* IJSVGCommandQuadraticCurve.m in Sources */, 59E2646719BA240D008A6FDB /* IJSVGPath.m in Sources */, 59E8ABED1E211EBE0032A80C /* IJSVGLayer.m in Sources */, @@ -656,6 +674,7 @@ 59A11E7219B89D6600E44498 /* SVGExampleView3.m in Sources */, 59E0F5ED1E29964700F757F7 /* IJSVGUnitLength.m in Sources */, 5956657D19B62F4600D805FF /* main.m in Sources */, + 59EA311722CF395400DAB3B7 /* IJSVGRendering.m in Sources */, 59A11E6F19B89D2000E44498 /* SVGExampleView2.m in Sources */, 5948DED51BB2BFE5004156FF /* IJSVGFontConverter.m in Sources */, 59E2646319BA240D008A6FDB /* IJSVGGroup.m in Sources */, diff --git a/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/IJSVGExample/IJSVGExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + 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 fc6bfa7..773694c 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 fe2b454..be500b3 100644 --- a/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/IJSVGExample/IJSVGExample.xcodeproj/xcuserdata/curtishard.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -1,5 +1,6 @@ diff --git a/IJSVGExample/IJSVGExample/SVGView.m b/IJSVGExample/IJSVGExample/SVGView.m index c513faa..37b5384 100644 --- a/IJSVGExample/IJSVGExample/SVGView.m +++ b/IJSVGExample/IJSVGExample/SVGView.m @@ -22,7 +22,7 @@ if( ( self = [super initWithFrame:frameRect] ) != nil ) { svg = [self svg]; - svg.renderQuality = IJSVGRenderQualityLow; + svg.renderQuality = IJSVGRenderQualityFullResolution; svg.renderingBackingScaleHelper = ^{ return self.window.backingScaleFactor; }; @@ -32,7 +32,7 @@ - (IJSVG *)svg { - return [IJSVG svgNamed:@"car"]; + return [IJSVG svgNamed:@"test 2"]; } - (void)drawRect:(NSRect)dirtyRect diff --git a/IJSVGExample/IJSVGExample/linecap.svg b/IJSVGExample/IJSVGExample/linecap.svg index d4d7105..5cc41af 100644 --- a/IJSVGExample/IJSVGExample/linecap.svg +++ b/IJSVGExample/IJSVGExample/linecap.svg @@ -1,20 +1,6 @@ - - + + - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/source/IJSVGLinearGradient.m b/source/IJSVGLinearGradient.m index 7f35c37..4844e06 100644 --- a/source/IJSVGLinearGradient.m +++ b/source/IJSVGLinearGradient.m @@ -22,10 +22,13 @@ // work out each coord, and work out if its a % or not // annoyingly we need to check them all against each other -_- + // also this will only account if this is objectBoundingBox BOOL isPercent = NO; - if((px1 >= 0.f && px1 <= 1.f) && (px2 >= 0.f && px2 <= 1.f) && - (py1 >= 0.f && py1 <= 1.f) && (py2 >= 0.f && py2 <= 1.f)) { - isPercent = YES; + if(aGradient.units == IJSVGUnitObjectBoundingBox) { + if((px1 >= 0.f && px1 <= 1.f) && (px2 >= 0.f && px2 <= 1.f) && + (py1 >= 0.f && py1 <= 1.f) && (py2 >= 0.f && py2 <= 1.f)) { + isPercent = YES; + } } // assume its a vertical / horizonal diff --git a/source/IJSVGParser.m b/source/IJSVGParser.m index bc94196..c2cc032 100644 --- a/source/IJSVGParser.m +++ b/source/IJSVGParser.m @@ -947,26 +947,24 @@ IJSVGLinearGradient * grad = [[[IJSVGLinearGradient alloc] init] autorelease]; grad.type = aType; - grad.gradient = [IJSVGLinearGradient parseGradient:elementCopy - gradient:grad]; - [self _setupDefaultsForNode:grad]; [self _parseElementForCommonAttributes:elementCopy node:grad ignoreAttributes:nil]; + grad.gradient = [IJSVGLinearGradient parseGradient:elementCopy + gradient:grad]; [parentGroup addDef:grad]; break; } IJSVGLinearGradient * gradient = [[[IJSVGLinearGradient alloc] init] autorelease]; gradient.type = aType; - gradient.gradient = [IJSVGLinearGradient parseGradient:element - gradient:gradient]; - [self _setupDefaultsForNode:gradient]; [self _parseElementForCommonAttributes:element node:gradient ignoreAttributes:nil]; + gradient.gradient = [IJSVGLinearGradient parseGradient:element + gradient:gradient]; [parentGroup addDef:gradient]; break; } @@ -986,27 +984,24 @@ NSXMLElement * elementCopy = [self mergedElement:element withReferenceElement:referenceElement]; - - grad.gradient = [IJSVGRadialGradient parseGradient:elementCopy - gradient:grad]; - [self _setupDefaultsForNode:grad]; [self _parseElementForCommonAttributes:elementCopy node:grad ignoreAttributes:nil]; + grad.gradient = [IJSVGRadialGradient parseGradient:elementCopy + gradient:grad]; [parentGroup addDef:grad]; break; } IJSVGRadialGradient * gradient = [[[IJSVGRadialGradient alloc] init] autorelease]; gradient.type = aType; - gradient.gradient = [IJSVGRadialGradient parseGradient:element - gradient:gradient]; - [self _setupDefaultsForNode:gradient]; [self _parseElementForCommonAttributes:element node:gradient ignoreAttributes:nil]; + gradient.gradient = [IJSVGRadialGradient parseGradient:element + gradient:gradient]; [parentGroup addDef:gradient]; break; } diff --git a/source/IJSVGTransform.m b/source/IJSVGTransform.m index beba492..d637942 100644 --- a/source/IJSVGTransform.m +++ b/source/IJSVGTransform.m @@ -155,6 +155,7 @@ void IJSVGApplyTransform(NSArray * transforms, IJSVGTransform return; } + // create the transform NSString * params = [string substringWithRange:[result rangeAtIndex:2]]; IJSVGTransform * transform = [[[self.class alloc] init] autorelease];