* [ios11-b1] CoreGraphics bindings
* Updated with feedback from Sebastien
* Fix build, optimize checks
* Add version information
* Address comments
* Tests
* Remove Apply code, add special code for typo
* [CoreGraphics] Add comma after last enum value.
* [CoreGraphics] No need to bind CGColorSpaceGetName.
* [CoreGraphics] Add new field in Xcode 9 beta 5.
* [CoreGraphics] Move kCGPDFContextAccessPermissions to the correct dictionary container and implement the corresponding manual code.
* [CoreGraphics] Adjust nullability acceptance based on new attributes for CGColorSpace.CreateCalibratedGray/RGB functions.
* [CoreGraphics] Bind CGColorSpaceCreateLab, introduced in Xcode 9 beta 5.
* [CoreGraphics] Adjust CGColorSpaceCreateWithICCData and CGColorSpaceCreateWithICCProfile bindings according to Xcode 9 beta 2.
Apple introduced CGColorSpaceCreateWithICCData in b1, and made
CGColorSpaceCreateWithICCProfile a typedef to CGColorSpaceCreateWithICCData.
Apple reversed the typedef in b2 (probably because it creates broken
executables when targetting earlier versions of macOS, since those executables
would use CGColorSpaceCreateWithICCData, which would not exist), and instead
made CGColorSpaceCreateWithICCProfile a normal deprecated method.
So copy this logic in our bindings: deprecate CreateICCProfile, and introduce
CreateICCProfile, with two overloads for NSData and CGDataProvider (since
that's what's accepted according to the documentation).
* [CoreGraphics] Add CGContextPDF constructors to make parity between different overloads.
There are two types of CGContextPDF constructors: the first argument is either
an NSUrl or a CGDataConsumer. Previously the NSUrl type had more overloads,
and also allowed a null CGRect for the second argument. With the overloads are
identical between the two types of CGContextPDF constructors.
Existing constructors:
CGContextPDF (NSUrl, CGRect, CGPDFInfo)
CGContextPDF (NSUrl, CGRect)
CGContextPDF (NSUrl, CGPDFInfo)
CGContextPDF (NSUrl)
CGContextPDF (CGDataConsumer, CGRect, CGPDFInfo)
Added constructors:
CGContextPDF (CGDataConsumer, CGRect)
CGContextPDF (CGDataConsumer, CGPDFInfo)
CGContextPDF (CGDataConsumer)
Additionally the code has been fixed to not throw NullReferenceExceptions if
null is passed for any of the values and instead pass on any null values to
the native `CGPDFContextCreate` method (since `CGPDFContextCreate`'s arguments
are all `__nullable`).
* [tests] Add and improve existing tests for new and some existing CoreGraphics API.
* Undo accidental whitespace noise.
* [tests] Remove random characters in assert message.
* [CoreGraphics] Improve argument exception messages in CGColorSpace according to review.
* [CoreGraphics] Use 'Icc' instead of 'ICC' for new API, and also make the change for XAMCORE_4_0.
* [CoreGraphics] Fix availability attribute for High Sierra.
* [tests] Update monotouch-test after API changes.
Apple has both an Empty and Null constants. Our implementation is largely
done in managed code and, for historical reasons [1], match System.Drawing
behaviour. Still the constant is useful for other (e.g. 3rd party) APIs.
Also add CFRect.Infinite for the missing CGRectInfinite symbol.
[1] In the original classic we only provided RectangleF not CGRect
references:
* https://bugzilla.xamarin.com/show_bug.cgi?id=43628
* xtro
common.unclassified:!missing-field! CGRectNull not bound
common.unclassified:!missing-field! CGRectInfinite not bound
Apple removed CGColorConverter even if it was publicly exposed in iOS 9.3,
not that I recall any API that consumed it...
It was replaced by a new, very close, type named CGColorConversionInfo and
the existing code and tests were updated to the new API.
So for `CGColorConverter` we're
* iOS: Obsoleted + code removal
* tvOS: Obsoleted + code removal
* watchOS: the API can be removed as it was not exposed in a stable release
* macOS: it was not enabled (did not work)
* [tests] Adjust ApiCMAttachmentTest so it knows how to create the new CGColorConversionInfo type
* Added support in DictionaryContainer for CGRect/CGPoint/CGSize and CMTime
* Added support for [StrongDictionary] using CGRect/CGPoint/CGSize and CMTime
* Added tests using DictionaryContainers for CGRect/CGPoint/CGSize and CMTime