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"...
Status: CONFIRMED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) (show other bugs)
Version: 1.12.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-23 19:36 UTC by troy-dawson
Modified: 2016-09-26 21:59 UTC (History)
3 users (show)

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


Attachments

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
Runtime:
	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: 8.10.0.137 (Business Edition)
Hash: e02ca98
Branch: master
Build date: 2015-03-20 01:01:57-0400

=== Xamarin.Android ===

Version: 5.1.0.78 (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: 2.0.0.141 (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.

Note You need to log in before you can comment on or make changes to this bug.