Bug 12712 - System.EntryPointNotFoundException for CGPath.EllipseFromRect
Summary: System.EntryPointNotFoundException for CGPath.EllipseFromRect
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2013-06-16 22:58 UTC by Alek Slater
Modified: 2013-06-17 08:54 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alek Slater 2013-06-16 22:58:19 UTC
I'm getting a crash when I try to create an elliptical path using the function:

CGPath p = CGPath.EllipseFromRect(new RectangleF(0,0,15,15),CGAffineTransform.MakeIdentity());

I'm running:
Xamarin.iOS
Version: 6.2.7.1 (Business Edition)
Hash: 947e664
Comment 1 Sebastien Pouliot 2013-06-17 08:13:08 UTC
Good catch, there's a typo in the pinvoke declaration.
Comment 2 Sebastien Pouliot 2013-06-17 08:54:05 UTC
Fixed in 8f6bf516d8bcb44c2935304dd1b7f113706eec00
QA: unit test added in the same revision


Workaround:

                [DllImport ("/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics")]
               extern static IntPtr CGPathCreateWithEllipseInRect (RectangleF boundingRect, ref CGAffineTransform transform);

		static public CGPath EllipseFromRect (RectangleF boundingRect, CGAffineTransform transform)
		{
			return MakeMutable (CGPathCreateWithEllipseInRect (boundingRect, ref transform));
		}

other methods (e.g. MakeMutable) can be found in [1].

[1] https://github.com/mono/maccore/blob/master/src/CoreGraphics/CGPath.cs