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

[WinUI] Shadows shape is wrong when using clipped image #16922

Open
emaf opened this issue Aug 22, 2023 · 4 comments
Open

[WinUI] Shadows shape is wrong when using clipped image #16922

emaf opened this issue Aug 22, 2023 · 4 comments
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@emaf
Copy link
Contributor

emaf commented Aug 22, 2023

Description

When using shadows with a clipped image that has a specific shape (i.e., circular), the shape of the shadow is a square/rectangle.

This is an screenshot from the Maui.Controls.Sample app:
image

The control on the center is an image with an EllipseGeometry Clip.

Steps to Reproduce

  1. Run the Maui.Controls.Sample app
  2. Navigate to Core -> Shadows -> Shadows playground
  3. Check the Clipped View sample

Expected: the shadow should have the same cicular shape as the Clipped View control.

Sample code:

<Image
x:Name="ClippedShadowView"
Grid.Row="5"
Aspect="AspectFill"
Source="header_background.png"
HeightRequest="100"
WidthRequest="100">
<Image.Clip>
<EllipseGeometry
Center="50, 50"
RadiusX="50"
RadiusY="50"/>
</Image.Clip>
<Image.Shadow>
<Shadow
Brush="{Binding Source={x:Reference ShadowColor}, Path=Text, Converter={StaticResource cnvStringToBrush} }"
Radius="{Binding Source={x:Reference ShadowRadiusSlider}, Path=Value }"
Opacity="{Binding Source={x:Reference ShadowOpacitySlider}, Path=Value }"/>
</Image.Shadow>
</Image>

Link to public reproduction project repository

No response

Version with bug

7.0.92

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@rachelkang
Copy link
Member

@emaf did you fix this through the PR linked above? Can we close this now?

@rachelkang rachelkang added this to the Backlog milestone Aug 23, 2023
@ghost
Copy link

ghost commented Aug 23, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@emaf
Copy link
Contributor Author

emaf commented Aug 23, 2023

@rachelkang No, we found this one while testing #16895. This was not introduced by those changes, but we couldn't fix this problem as part of those either, so I just filed a bug to track this problem.

@Eilon Eilon added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Aug 30, 2023
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 23, 2024
@XamlTest
Copy link

Verified on VS 17.10.0 Preview 4.0(8.0.20). Repro on Windows 11, not repro on Android 14.0-API34
with below Project:
16922.zip
Windows:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants