Bug 19354 - RectangleFExtensions.IsInfinite() is broken
Summary: RectangleFExtensions.IsInfinite() is broken
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.2.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2014-04-28 17:25 UTC by Joe Pro
Modified: 2014-07-07 05:51 UTC (History)
4 users (show)

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:

Description Joe Pro 2014-04-28 17:25:34 UTC
The method calls CGRectIsNull() instead of CGRectIsInfinite().

using MonoTouch.ObjCRuntime;
using System;
using System.Drawing;
using System.Runtime.InteropServices;

namespace MonoTouch.CoreGraphics {
	[Since(, )]
	public static class RectangleFExtensions {
		// Static Methods


		private static extern bool CGRectIsInfinite(RectangleF rect);

		private static extern bool CGRectIsNull(RectangleF rect);


		public static bool IsInfinite(this RectangleF self) {
			return RectangleFExtensions.CGRectIsNull(self);

		public static bool IsNull(this RectangleF self) {
			return RectangleFExtensions.CGRectIsNull(self);

Comment 1 Sebastien Pouliot 2014-04-28 17:32:36 UTC
Good catch! Thanks for the report.

Fixed in maccore 2a4d92abdef70289ae1c4d5de213ece1f882edc0
Comment 2 Sebastien Pouliot 2014-04-28 20:38:54 UTC
monotouch/master bumped in db4c3036e3caf3d6638c0681093eeee2cf34d775

QA: unit test added for all CGRect constants (Zero, Null and Infinite).
Comment 3 Ram Chandra 2014-07-07 05:51:22 UTC
I have checked this issue with following builds:

Mac OS X 10.9.3
Xamarin Studio: 5.2 (build 134)

Build Information
Release ID: 502000134
Git revision: 6a12f897678a33f2511ef916e9f4ec218d55f035
Build date: 2014-07-01 13:53:25-04
Xamarin addins: 770bd1f4cdcb0109fbb9ffaeeb46cb52f69bdb3b

I have checked the definition of "IsInfinite()" method. Now "IsInfinite()" method calls CGRectIsInfinite().

New definition of "IsInfinite()" method is:

                public static bool IsInfinite(this RectangleF self)
			return RectangleFExtensions.CGRectIsInfinite(self);

Screencast: http://www.screencast.com/t/0zUn3uuFl5Gp

This issue has been fixed. Hence, I am closing this issue.