dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

[Shapes] Path render issues #7118

Open viniciuslln opened 2 years ago

viniciuslln commented 2 years ago

Description

The code below renders differently on Android and Windows compared to the result of Xamarin.Forms.

Xamarin.Forms (expected) Screenshot_1652395436

MAUI RC3 Android (Renders wrong image) Screenshot_1652396049

MAUI RC3 Windows (Renders imagem correctly but with layout position issues)

Captura de tela 2022-05-12 194825

Steps to Reproduce

  1. Create a MAUI App
  2. Replace MainPage.Xaml with code:

    
    <ContentPage
    x:Class="MauiApp3.MainPage"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
    <Grid>
    
        <VerticalStackLayout VerticalOptions="Center" BackgroundColor="AliceBlue">
            <Path
                Aspect="Uniform"
                Data="M256 192a96 96 0 1 1 96-96 96 96 0 0 1-96 96z"
                Fill="#333766"
                HeightRequest="40"
                HorizontalOptions="Center"
                VerticalOptions="Start" />
    
            <Path
                Aspect="Uniform"
                Data="M233.59 241.1c-59.33-36.32-155.43-46.3-203.79-49C13.55 191.13 0 203.51 0 219.14v222.8c0 14.33 11.59 26.28 26.49 27.06 43.66 2.29 132 10.68 193 41.43 9.37 4.72 20.48-1.71 20.48-11.87v-246a13.31 13.31 0 0 0-6.38-11.46zm248.61-49c-48.35 2.74-144.46 12.73-203.78 49a13.56 13.56 0 0 0-6.42 11.63v245.79c0 10.19 11.14 16.63 20.54 11.9 61-30.72 149.32-39.11 193-41.4C500.42 468.24 512 456.29 512 442V219.14c0-15.63-13.55-28.01-29.8-27.09z"
                Fill="#333766"
                HeightRequest="64"
                HorizontalOptions="Center"
                VerticalOptions="End" />
        </VerticalStackLayout>
    </Grid>
    </ContentPage>

 3. Run!

### Version with bug

Release Candidate 3 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

Android, Windows

### Affected platform versions

Android 11, Windows 11 build 22000.652 , (iOS not tested)

### Did you find any workaround?

_No response_

### Relevant log output

_No response_
v-longmin commented 2 years ago

Verified repro on Android 12.0 with VS 17.3.0 Preview 1.0 [32427.505.main]. But the image can not load correctly. image Repro with above code.

jsuarezruiz commented 2 years ago

Testing the sample in main branch.

Android Screenshot_1652780982

There have been a couple of fixes related to incorrect use of density and also changes in ArcSegment that have fixed the incorrect rendering.

Windows image

The rendering is correct but the Grid is not aligned to the center. It actually expands to fill the entire space.

cc @hartez

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

XamlTest commented 1 year ago

Verified this on Visual Studio Enterprise 17.6.0 Preview 5.0. Repro on Windows 11, but not repro on Android emulator (13.0-API 33): Project: 7118.zip

Android: Rendering correct. image

Windows: The rendering is correct, but the Grid is not aligned to the center. image