Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PorterDuff mode prop #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andre-krueger
Copy link

@andre-krueger andre-krueger commented Sep 18, 2020

Summary

This should fix #78.
As masking an image with an alpha mask image didn't work on Android, I added a prop to the MaskedView to set the PorterDuff mode on Android. With SRC_OUT I could successfully mask an image with another image.

Test Plan

What's required for testing (prerequisites)?

Insert an image into the maskElement prop and inside MaskView insert an alpha mask image. Set the porterDuffMode prop to SRC_OUT.

What are the steps to reproduce (after prerequisites)?

The alpha mask image should be correctly applied to the image.

Compatibility

OS Implemented
iOS ❌ (already works on iOS)
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

@albertovasquez
Copy link

This does not seem to fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image as a mask for another image not rendering on Android
2 participants