Skip to content

Commit

Permalink
Allow null for CGColorSpace.CreatePattern
Browse files Browse the repository at this point in the history
Per Apple docs for the `CGColorSpaceCreatePattern(CGColorSpaceRef baseSpace)`, the `baseSpace` _should_ be null when creating the color pattern. So, allow `null` here.

Fixes xamarin#20293
  • Loading branch information
snechaev authored and vs-mobiletools-engineering-service2 committed Mar 13, 2024
1 parent 8097226 commit 7eb5db9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CoreGraphics/CGColorSpace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public static CGColorSpace CreateDeviceRGB ()
[DllImport (Constants.CoreGraphicsLibrary)]
extern static /* CGColorSpaceRef */ IntPtr CGColorSpaceCreatePattern (/* CGColorSpaceRef */ IntPtr baseSpace);

public static CGColorSpace? CreatePattern (CGColorSpace baseSpace)
public static CGColorSpace? CreatePattern (CGColorSpace? baseSpace)
{
var ptr = CGColorSpaceCreatePattern (baseSpace.GetHandle ());
return FromHandle (ptr, true);
Expand Down

0 comments on commit 7eb5db9

Please sign in to comment.