[CoreGraphics] Add missing nullability for a CGContextPDF constructor and the CGContextPDF.BeginPage method. Fixes #13953. (#13963)
Fixes https://github.com/xamarin/xamarin-macios/issues/13953.
This commit is contained in:
Родитель
4fbe1ba16f
Коммит
adcfcfbe83
|
@ -199,7 +199,7 @@ namespace CoreGraphics {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe CGContextPDF (NSUrl url, CGRect mediaBox, CGPDFInfo info) :
|
public unsafe CGContextPDF (NSUrl url, CGRect mediaBox, CGPDFInfo? info) :
|
||||||
this (url, &mediaBox, info)
|
this (url, &mediaBox, info)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ namespace CoreGraphics {
|
||||||
[DllImport (Constants.CoreGraphicsLibrary)]
|
[DllImport (Constants.CoreGraphicsLibrary)]
|
||||||
extern static void CGPDFContextBeginPage (/* CGContextRef */ IntPtr context, /* CFDictionaryRef */ IntPtr pageInfo);
|
extern static void CGPDFContextBeginPage (/* CGContextRef */ IntPtr context, /* CFDictionaryRef */ IntPtr pageInfo);
|
||||||
|
|
||||||
public void BeginPage (CGPDFPageInfo info)
|
public void BeginPage (CGPDFPageInfo? info)
|
||||||
{
|
{
|
||||||
using (var dict = info?.ToDictionary ())
|
using (var dict = info?.ToDictionary ())
|
||||||
CGPDFContextBeginPage (Handle, dict.GetHandle ());
|
CGPDFContextBeginPage (Handle, dict.GetHandle ());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче