Bug 28349 - [APIBreak] It would be nice if CTFont constructor's matrix parameter was "in" instead of "ref"
Summary: [APIBreak] It would be nice if CTFont constructor's matrix parameter was "in"...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.12.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Bugzilla
Depends on:
Reported: 2015-03-23 19:36 UTC by troy-dawson
Modified: 2016-09-26 21:59 UTC (History)
3 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 for Bug 28349 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 original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description troy-dawson 2015-03-23 19:36:02 UTC
This might be a problem throughout Xamarin.Mac and Monotouch, but CTFont constructor is currently defined as:

public CTFont(CTFontDescriptor descriptor, nfloat size, CTFontOptions options, ref CGAffineTransform matrix);

whereas the native side is:

CTFontRef CTFontCreateWithName ( CFStringRef name, CGFloat size, const CGAffineTransform *matrix );

not being an "in" parameter means I can't pass a temporary object to the constructor, which is a very minor but avoidable PITA, if the native API was bound better.
Comment 1 Rajneesh Kumar 2015-03-24 05:11:08 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the instruction provided in bug description.

Steps I followed:

1. Create a Xam.Mac application in XS.
2. Go to assembly browser and search 'CTFont' class.
3. Go to class definition and observed that constructor is currently defined as:
"public CTFont (CTFontDescriptor descriptor, nfloat size, CTFontOptions options, 
ref CGAffineTransform matrix);"

Screencast: http://www.screencast.com/t/mwG7aDj6df
Ide logs: https://gist.github.com/Rajneesh360Logica/949aa3dadaf83a7138d9

Environment Info:

=== Xamarin Studio ===

Version 5.9 (build 292)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
	Mono 4.0.0 ((detached/b1c6715)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000089

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: e02ca98
Branch: master
Build date: 2015-03-20 01:01:57-0400

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 509000292
Git revision: a82bec7920c0619e5955f2ea3726502c0c924e84
Build date: 2015-03-20 18:57:36-04
Xamarin addins: f92815124b28f285cc1b7559eadeb573e2b11a99

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Chris Hamons 2015-03-25 16:40:37 UTC
This is a nice API suggestion, but too late for 2.0 consideration. Moving to next release if we have time.