Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 45301 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
When calling the path.ComputeBounds(), the returned bounds are too big when using a cubic bezier curve like described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=495278.
path.CubicTo(48.9356f, 24.164f, 42.0671f, 25.7204f, 38.0992f, 31.3618f);
path.CubicTo(33.0737f, 25.3024f, 27.0713f, 24.164f, 23.7257f, 27.8072f);
path.CubicTo(14.4142f, 37.9485f, 34.3451f, 52.5246f, 37.9599f, 54.1634f);
path.CubicTo(41.6554f, 52.5246f, 61.5832f, 37.9485f, 52.2716f, 27.8072f);
This gives bounds of the outmost control points (14.4142, 24.164, 61.5832, 54.2109), where in fact the curve is much tighter.
Please attach a small, self-contained project which demonstrates and reproduces the issue and then reopen the bug, thanks!
Created attachment 18052 [details]
Expected and actual bounds of the shape
When calling the Android.Graphics.Path.ComputeBounds, the black rectangle is returned as bounds (caused by the control points of the cubic curves).
When doing the same on iOS, the blue rectangle is returned (giving the actual bounds of the path, as expected)
Created attachment 18053 [details]
Test-application including workaround
The test applications draws the path 2 times and calculates the bounds once with the built-in computeBounds and once with a custom computeBounds.
Then the path is stretched to fill the containing View, where the difference between the two calculation methods get visible (built-in path is rendered too small).
Attached a project to demonstrate the bug/issue.
As far as i found out, this is concerned to the Android.Graphics.Path.computeBounds implementation, because the second parameter "exact" is now ignored.