**Note:** This PR is almost entirely of manual (but simple) bindings, and the documentation of these CG methods is non-existent. I had to add add MarshalAs and change pointers to IntPtr by hand, so please review carefully.
I wrote "did not crash/return null" manual tests, which I could improve upon if desired, but I'd have to re-learn some matrix math and figure out what each method does under the hood (Alex thought this would likely be fine).
A few important notes:
- CGAffineTransformComponents is in CoreFoundation as it was defined (but not used) in those API diffs. There is a define `CF_DEFINES_CGAFFINETRANSFORMCOMPONENTS` which allows CoreGraphics to declare it in the headers, but I'm assuming that is a hack for Apple.
- The headers/docs for kCGColorSpaceITUR_709_HLG lie and claim it's in older OS than it seems to be, so I assumed latest instead.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Use the native `NSStringFrom*` API so we can, eventually, use the
native code to parse them from `NSString` and also ensure increased
compatibility with any code that expects the native string representation
* Add unit tests for `ToString` methods
Also use [`System.HashCode`](https://docs.microsoft.com/en-us/dotnet/api/system.hashcode?view=net-6.0) to generate the hash code
Rename the public fields in CGAffineTransform to:
* Follow our naming convention (public API should always start with an
upper-case letter).
* Use the same names as Apple's version to ease porting Swift/Objective-C
code.
Fixes https://github.com/xamarin/xamarin-macios/issues/13494.
Support for `NSValue`/`CGAffineTransform` exists in iOS/tvOS/watchOS,
from UIKit, but not for macOS. However this will be required for the
new protocols inside CoreImage.
Also add an overload for `StoreValueAtAddress` since the original
one was deprecated but we did not provide the new alternative to
update the code.
- Fixes#4698: CGAffineTransform.Scale does not work like Swift's .scaledBy(x:y:)
(https://github.com/xamarin/xamarin-macios/issues/4698)
- 'Scale' monotouch-test now covers the new overload for the new multiplication order.
- Changed the Scale test's values so we have different values for 'x0' (it was always 0 before) and so it matches the test case from the bug report.
* Same fix for Rotate and Translate