From 82f6acf8a92785e4ebea8de9c68c796913172e60 Mon Sep 17 00:00:00 2001 From: Horcrux Date: Thu, 12 Jan 2017 21:25:32 +0800 Subject: [PATCH] Change default strokeWidth to 1 --- ios/RNSVGRenderable.m | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ios/RNSVGRenderable.m b/ios/RNSVGRenderable.m index 47bb921b..046c98e8 100644 --- a/ios/RNSVGRenderable.m +++ b/ios/RNSVGRenderable.m @@ -25,7 +25,7 @@ if (self = [super init]) { _fillOpacity = 1; _strokeOpacity = 1; - _strokeWidth = 0; + _strokeWidth = 1; } return self; } @@ -168,9 +168,7 @@ - (void)renderLayerTo:(CGContextRef)context { - BOOL shouldStroke = self.stroke && self.strokeWidth; - - if (!self.fill && !shouldStroke) { + if (!self.fill && !self.stroke) { return; } @@ -199,13 +197,13 @@ ]; CGContextRestoreGState(context); - if (!shouldStroke) { + if (!self.stroke) { return; } } } - if (shouldStroke) { + if (self.stroke) { CGContextSetLineWidth(context, self.strokeWidth); CGContextSetLineCap(context, self.strokeLinecap); CGContextSetLineJoin(context, self.strokeLinejoin);