You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2019/04/10 03:37:42 UTC

[GitHub] [incubator-weex] YorkShen commented on a change in pull request #2279: [Android] fix OP.REPLACE is not allow above api 26

YorkShen commented on a change in pull request #2279: [Android] fix OP.REPLACE is not allow above api 26
URL: https://github.com/apache/incubator-weex/pull/2279#discussion_r273778943
 
 

 ##########
 File path: android/sdk/src/main/java/com/taobao/weex/utils/BoxShadowUtil.java
 ##########
 @@ -399,7 +399,13 @@ public void draw(Canvas canvas) {
       Rect newRect = new Rect(bounds);
       // Make the Canvas Rect bigger according to the padding.
       newRect.inset(-paddingX * 2, -paddingY * 2);
-      canvas.clipRect(newRect, Region.Op.REPLACE);
+
+      // Region.Op.REPLACE is not allow above api 26
+      if (Build.VERSION.SDK_INT >= 26) {
+        canvas.clipRect(newRect);
 
 Review comment:
   `canvas.clipRect` is the same as `canvas.clipRect(newRect, Region.Op. INTERSECT)`, which is different from `canvas.clipRect(newRect, Region.Op.REPLACE)`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services