You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by xi...@apache.org on 2018/12/18 15:19:12 UTC

[incubator-weex] branch master updated: [iOS] Fix bug with borderRadius's calculation. (#1929)

This is an automated email from the ASF dual-hosted git repository.

xifang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new c1ae9bd  [iOS] Fix bug with borderRadius's calculation. (#1929)
c1ae9bd is described below

commit c1ae9bd576b64c4c19ae05ba528faa980ae0634c
Author: Douma Fang <do...@gmail.com>
AuthorDate: Tue Dec 18 23:19:07 2018 +0800

    [iOS] Fix bug with borderRadius's calculation. (#1929)
---
 ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m b/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
index 6190836..0d5a2d7 100644
--- a/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
+++ b/ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m
@@ -581,7 +581,9 @@ do {\
 - (CAShapeLayer *)drawBorderRadiusMaskLayer:(CGRect)rect
 {
     if ([self hasBorderRadiusMaskLayer]) {
-        UIBezierPath *bezierPath = [UIBezierPath wx_bezierPathWithRoundedRect:rect topLeft:_borderTopLeftRadius topRight:_borderTopRightRadius bottomLeft:_borderBottomLeftRadius bottomRight:_borderBottomRightRadius];
+        WXRoundedRect *borderRect = [[WXRoundedRect alloc] initWithRect:rect topLeft:_borderTopLeftRadius topRight:_borderTopRightRadius bottomLeft:_borderBottomLeftRadius bottomRight:_borderBottomRightRadius];
+        WXRadii *radii = borderRect.radii;
+        UIBezierPath *bezierPath = [UIBezierPath wx_bezierPathWithRoundedRect:rect topLeft:radii.topLeft topRight:radii.topRight bottomLeft:radii.bottomLeft bottomRight:radii.bottomRight];
         CAShapeLayer *maskLayer = [CAShapeLayer layer];
         maskLayer.path = bezierPath.CGPath;
         return maskLayer;