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

fix(android): getCircleBitmap not displaying image #311

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

erisu
Copy link

@erisu erisu commented Nov 21, 2024

Description

Set the xfermode after the circle is drawn so that the source bitmap is clipped correctly inside the circle.

Previously, the xfermode was applied during the creation of the paint object, which caused a timing issue. As a result, the image was not clipped inside the circle properly, making it appear as though there was no image.

Related Issue

Resolves #199

Motivation and Context

Fix the issue where getCircleBitmap was not displaying the image correctly.

How Has This Been Tested?

  • Build app
  • Tested pushing payload before and after changes

Payload contained

  • image pointing to a square image on web (square so I can confirm the circle effect)
  • image-type set to circle

I also tried without setting the image-type to confirm default behavior.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@erisu erisu merged commit b334d33 into master Nov 21, 2024
7 checks passed
@erisu erisu deleted the fix/gh-199 branch November 21, 2024 04:23
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.

Notification icon not seen after applying getCircleBitmap
1 participant