[CoreImage] Enabled ImageRepresentation strong dictionary helpers, fixes bugzilla #59294 (#3240)

https://bugzilla.xamarin.com/show_bug.cgi?id=59294

This enables ImageRepresentation strong dictionary helpers.

--- A note about WrapAttribute

Whenever we use the `WrapAttribute` inside a `Category` we need to
include the `This` parameter as the first argument inside the Wrap
signature, like the following example:

```csharp

[Wrap ("WriteTiffRepresentation (This, image, url, format, colorSpace, options?.Dictionary, out error)")]
bool WriteTiffRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, out NSError error);
```
This commit is contained in:
Alex Soto 2018-01-17 07:59:01 -06:00 коммит произвёл Sebastien Pouliot
Родитель 580ad2b826
Коммит daf74d664c
2 изменённых файлов: 16 добавлений и 24 удалений

Просмотреть файл

@ -1916,6 +1916,14 @@ interface XyzPanel {
}
```
When the `WrapAttribute` is used inside a `Category` you need to include `This` as
the first argument inside the `Wrap` signature, for example:
```
[Wrap ("Write (This, image, options?.Dictionary, out error)")]
bool Write (CIImage image, CIImageRepresentationOptions options, out NSError error);
```
The members generated by `[Wrap]` are not `virtual` by default, if you need a `virtual` member you can set to `true` the optional `isVirtual` parameter.
```

Просмотреть файл

@ -399,88 +399,72 @@ namespace XamCore.CoreImage {
[return: NullAllowed]
NSData GetTiffRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, NSDictionary options);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (10,0)][Mac (10,12)]
[Wrap ("GetTiffRepresentation (image, format, colorSpace, options?.Dictionary)")]
[Wrap ("GetTiffRepresentation (This, image, format, colorSpace, options?.Dictionary)")]
[return: NullAllowed]
NSData GetTiffRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options);
#endif
[iOS (10,0)][Mac (10,12)]
[Export ("JPEGRepresentationOfImage:colorSpace:options:")]
[return: NullAllowed]
NSData GetJpegRepresentation (CIImage image, CGColorSpace colorSpace, NSDictionary options);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (10,0)][Mac (10,12)]
[Wrap ("GetJpegRepresentation (image, format, colorSpace, options?.Dictionary)")]
[Wrap ("GetJpegRepresentation (This, image, colorSpace, options?.Dictionary)")]
[return: NullAllowed]
NSData GetJpegRepresentation (CIImage image, CGColorSpace colorSpace, CIImageRepresentationOptions options);
#endif
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Export ("HEIFRepresentationOfImage:format:colorSpace:options:")]
[return: NullAllowed]
NSData GetHeifRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, NSDictionary options);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Wrap ("GetHeifRepresentation (image, format, colorSpace, options?.Dictionary)")]
[Wrap ("GetHeifRepresentation (This, image, format, colorSpace, options?.Dictionary)")]
[return: NullAllowed]
NSData GetHeifRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options);
#endif
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Export ("PNGRepresentationOfImage:format:colorSpace:options:")]
[return: NullAllowed]
NSData GetPngRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, NSDictionary options);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Wrap ("GetPngRepresentation (image, format, colorSpace, options?.Dictionary)")]
[Wrap ("GetPngRepresentation (This, image, format, colorSpace, options?.Dictionary)")]
[return: NullAllowed]
NSData GetPngRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options);
#endif
[iOS (10,0)][Mac (10,12)]
[Export ("writeTIFFRepresentationOfImage:toURL:format:colorSpace:options:error:")]
bool WriteTiffRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, NSDictionary options, out NSError error);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (10,0)][Mac (10,12)]
[Wrap ("WriteTiffRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")]
[Wrap ("WriteTiffRepresentation (This, image, url, format, colorSpace, options?.Dictionary, out error)")]
bool WriteTiffRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, out NSError error);
#endif
[iOS (10,0)][Mac (10,12)]
[Export ("writeJPEGRepresentationOfImage:toURL:colorSpace:options:error:")]
bool WriteJpegRepresentation (CIImage image, NSUrl url, CGColorSpace colorSpace, NSDictionary options, [NullAllowed] out NSError error);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (10,0)][Mac (10,12)]
[Wrap ("WriteJpegRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")]
[Wrap ("WriteJpegRepresentation (This, image, url, colorSpace, options?.Dictionary, out error)")]
bool WriteJpegRepresentation (CIImage image, NSUrl url, CGColorSpace colorSpace, CIImageRepresentationOptions options, [NullAllowed] out NSError error);
#endif
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Export ("writeHEIFRepresentationOfImage:toURL:format:colorSpace:options:error:")]
bool WriteHeifRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, NSDictionary options, [NullAllowed] out NSError error);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Wrap ("WriteHeifRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")]
[Wrap ("WriteHeifRepresentation (This, image, url, format, colorSpace, options?.Dictionary, out error)")]
bool WriteHeifRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, [NullAllowed] out NSError error);
#endif
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Export ("writePNGRepresentationOfImage:toURL:format:colorSpace:options:error:")]
bool WritePngRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, NSDictionary options, [NullAllowed] out NSError error);
#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294
[iOS (11,0)][TV (11,0)][Mac (10,13)]
[Wrap ("WritePngRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")]
[Wrap ("WritePngRepresentation (This, image, url, format, colorSpace, options?.Dictionary, out error)")]
bool WritePngRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, [NullAllowed] out NSError error);
#endif
}
[BaseType (typeof (NSObject))]