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

[BUG] AvatarView clipping on Windows isn't applied correctly to UriImageSource #632

Closed
1 task done
GeorgeLeithead opened this issue Sep 16, 2022 · 8 comments · Fixed by #1344
Closed
1 task done
Assignees
Labels
bug Something isn't working unverified

Comments

@GeorgeLeithead
Copy link
Contributor

GeorgeLeithead commented Sep 16, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When applying a StrokeShape, such as PolyLine to AvatarView, clipping on Windows where the ImageSource is a UriImageSource clipping is not applied correctly.
image

Expected Behavior

On Windwos the image should be clipped to the AvatarView stroke shape.

Steps To Reproduce

  1. Add an AvatarView control.
  2. Set as the ImageSource a Uri.

Link to public reproduction project repository

https://github.com/GeorgeLeithead/CommunityToolkitMaui/tree/632-BUG-AvatarView-clipping-on-Windows

Environment

- .NET MAUI CommunityToolkit: 1.2.0
- OS: windows10.0.19041.0
- .NET MAUI: 6.0.408

Anything else?

No response

@ghost
Copy link

ghost commented Aug 9, 2023

Hi @GeorgeLeithead. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@brminnick
Copy link
Collaborator

Hey @GeorgeLeithead! I just tried the link for the reproduction sample and it looks to be dead.

When you get a chance, could update the link so that we can dig into it? Apologies for not jumping on this sooner.

@GeorgeLeithead
Copy link
Contributor Author

Hey @GeorgeLeithead! I just tried the link for the reproduction sample and it looks to be dead.

When you get a chance, could update the link so that we can dig into it? Apologies for not jumping on this sooner.

@brminnick I'll actually "have" time to look into this next week. Will keep this thread updated accordingly.

@brminnick
Copy link
Collaborator

Oh - no way! Thanks George!!

In the meantime, I'll assign this one to you.

@ghost
Copy link

ghost commented Aug 14, 2023

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 2 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost added the stale The author has not responded in over 30 days label Aug 14, 2023
@pictos pictos removed needs reproduction stale The author has not responded in over 30 days labels Aug 14, 2023
@GeorgeLeithead
Copy link
Contributor Author

Looks like having .NET MAUI upgraded from 6.0.408 to 7.0.200 has solved the clipping issue when using an ImageSource with a Uri.

@GeorgeLeithead
Copy link
Contributor Author

However, the 'Sample' for the AvatarView, specifically for the Rating isn't right as the PolyLine path is incorrect (outside the bounds of the image width/height).
Also, the samples app fails for Windows, see dotnet/maui#4736

@brminnick How would you like me to handle these two issues? For the MAUI issue 4736, it's resolved by adding the splash.svg' to the Resources\Images` folder and adding into the project:

		<!-- Images -->
		<MauiImage Include="Resources\Images\*" />
		<MauiImage Update="Resources\Splash\spash.svg" BaseSize="128,128" />

For the AvatarViewRatingPage.xaml it can be resolved by changing theStrokeShape PolyLine definition to:

StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"

@brminnick
Copy link
Collaborator

brminnick commented Aug 14, 2023

Thanks George! You can open just one PR, fix both issues, link it to this GitHub Issue, and tag me for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants