react-native-morph-card 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -511,9 +511,13 @@ class MorphCardSourceView(context: Context) : ReactViewGroup(context) {
|
|
|
511
511
|
val bmp = (blockerImg.drawable as? BitmapDrawable)?.bitmap
|
|
512
512
|
if (bmp != null) {
|
|
513
513
|
val clearCanvas = Canvas(bmp)
|
|
514
|
-
val clearPaint = Paint()
|
|
514
|
+
val clearPaint = Paint(Paint.ANTI_ALIAS_FLAG)
|
|
515
515
|
clearPaint.xfermode = PorterDuffXfermode(PorterDuff.Mode.CLEAR)
|
|
516
|
-
|
|
516
|
+
if (cardCornerRadiusPx > 0f) {
|
|
517
|
+
clearCanvas.drawRoundRect(cardLeft, cardTop, cardLeft + cardWidth, cardTop + cardHeight, cardCornerRadiusPx, cardCornerRadiusPx, clearPaint)
|
|
518
|
+
} else {
|
|
519
|
+
clearCanvas.drawRect(cardLeft, cardTop, cardLeft + cardWidth, cardTop + cardHeight, clearPaint)
|
|
520
|
+
}
|
|
517
521
|
blockerImg.invalidate()
|
|
518
522
|
}
|
|
519
523
|
}
|
|
@@ -681,7 +685,7 @@ class MorphCardSourceView(context: Context) : ReactViewGroup(context) {
|
|
|
681
685
|
target.width.toFloat(), target.height.toFloat())
|
|
682
686
|
}
|
|
683
687
|
|
|
684
|
-
target.showSnapshot(bitmap, ImageView.ScaleType.FIT_XY, frame, cornerRadius,
|
|
688
|
+
target.showSnapshot(bitmap, ImageView.ScaleType.FIT_XY, frame, cornerRadius, null)
|
|
685
689
|
Log.d(TAG, "transferSnapshot: handed snapshot to MorphCardTargetView")
|
|
686
690
|
}
|
|
687
691
|
|
package/package.json
CHANGED