xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug][Shapes] RoundRectangleGeometry adds ellipses at rectangle corner. #12284

Open davidbritch opened 4 years ago

davidbritch commented 4 years ago

Description

The RoundRectangleGeometry class has been added to Forms 5.0. The scenario it's tested against is clipping. However, it could also be used in a Path:

            <Path Fill="Blue"
                  Stroke="Red"
                  StrokeThickness="1">
                <Path.Data>
                    <RoundRectangleGeometry CornerRadius="5"
                                            Rect="10,10,150,100" />
                </Path.Data>
            </Path>

This code results in a rounded rectangle that has an ellipse in each corner (presumably because of the EllipseGeometry objects the RoundedRectangleGeometry class adds to the GeometryGroup):

Simulator Screen Shot - iPhone 11 - 2020-09-28 at 12 07 32

Steps to Reproduce

  1. Run the attached sample.
  2. Browse to the "Path geometry demos" page.

Expected Behavior

A rounded rectangle is displayed.

Actual Behavior

A rounded rectangle is displayed, that has four ellipses rendered in its corners, with the top left ellipse being a larger size.

Basic Information

Reproduction Link

ShapesDemos.zip

hartez commented 4 years ago

@brminnick I can't seem to get your repro project to run - every time I try on Android, I'm getting this:

Android.Views.InflateException: 'Binary XML file line #1 in com.companyname.shapesdemos:layout/toolbar: Binary XML file line #1 in com.companyname.shapesdemos:layout/toolbar: Error inflating class android.support.v7.widget.Toolbar'
brminnick commented 4 years ago

@brminnick I can't seem to get your repro project to run

^@davidbritch I think this message is meant for you

davidbritch commented 4 years ago

@hartez This is an issue I've noticed with Forms 5.0. If the Android manifest doesn't set the target Android version to API 29 or higher, you get that error. I'll open a separate issue for it.

thisisthekap commented 3 years ago

@davidortinau As asked for in #14206: Another issue without workaround which makes features fo Xamarin.Forms unusable to us.