diff --git a/src/CoreFoundation/CGAffineTransformComponents.cs b/src/CoreFoundation/CGAffineTransformComponents.cs new file mode 100644 index 000000000000..1b3eb6ce79a9 --- /dev/null +++ b/src/CoreFoundation/CGAffineTransformComponents.cs @@ -0,0 +1,31 @@ +// Copyright 2022 Microsoft Corporation. + +#nullable enable + +using System; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +using CoreGraphics; + +namespace CoreFoundation { +#if NET + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] +#endif + [StructLayout (LayoutKind.Sequential)] + // The name prefix suggests CoreGraphics and based on CF_DEFINES_CGAFFINETRANSFORMCOMPONENTS + // it could be defined in CoreGraphics but documented as CoreFoundation type + public struct CGAffineTransformComponents + { + public CGSize Scale; + + public nfloat HorizontalShear; + + public nfloat Rotation; + + public CGVector Translation; + } +} diff --git a/src/CoreGraphics/CGAffineTransform.cs b/src/CoreGraphics/CGAffineTransform.cs index 7fe7fd59b2bd..cddb1b75c6e1 100644 --- a/src/CoreGraphics/CGAffineTransform.cs +++ b/src/CoreGraphics/CGAffineTransform.cs @@ -456,6 +456,38 @@ public CGAffineTransform Invert () { return CGAffineTransformInvert (this); } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern CGAffineTransformComponents CGAffineTransformDecompose (CGAffineTransform transform); + + public CGAffineTransformComponents Decompose () + { + return CGAffineTransformDecompose (this); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern CGAffineTransform CGAffineTransformMakeWithComponents (CGAffineTransformComponents components); + + public static CGAffineTransform MakeWithComponents (CGAffineTransformComponents components) + { + return CGAffineTransformMakeWithComponents (components); + } #endif // !COREBUILD } } diff --git a/src/CoreGraphics/CGColorSpace.cs b/src/CoreGraphics/CGColorSpace.cs index 8f48548e933a..3153ba7fca16 100644 --- a/src/CoreGraphics/CGColorSpace.cs +++ b/src/CoreGraphics/CGColorSpace.cs @@ -1038,6 +1038,33 @@ public bool UsesExtendedRange { #endif public CGColorSpace? CreateExtendedLinearized () => Runtime.GetINativeObject (CGColorSpaceCreateExtendedLinearized (Handle), owns: true); +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("tvos16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("maccatalyst16.0")] +#else + [iOS (16,0)] + [TV (16,0)] + [Mac (13,0)] + [MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGColorSpaceCreateCopyWithStandardRange (/* CGColorSpaceRef */ IntPtr s); + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("tvos16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("maccatalyst16.0")] +#else + [iOS (16,0)] + [TV (16,0)] + [Mac (13,0)] + [MacCatalyst (16,0)] +#endif + public CGColorSpace? CreateCopyWithStandardRange () => Runtime.GetINativeObject (CGColorSpaceCreateCopyWithStandardRange (Handle), owns: true); + #if NET [SupportedOSPlatform ("macos12.0")] [SupportedOSPlatform ("ios15.0")] diff --git a/src/CoreGraphics/CGPDFScanner.cs b/src/CoreGraphics/CGPDFScanner.cs index 0938d8633b7b..d6560095c49f 100644 --- a/src/CoreGraphics/CGPDFScanner.cs +++ b/src/CoreGraphics/CGPDFScanner.cs @@ -230,5 +230,29 @@ public bool TryPop (out CGPDFStream? value) return false; } } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + extern static void CGPDFScannerStop (/* CGPDFScannerRef */ IntPtr scanner); + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + public void Stop () + { + CGPDFScannerStop (Handle); + } } } diff --git a/src/CoreGraphics/CGPath.cs b/src/CoreGraphics/CGPath.cs index 9e9562cf6c5d..d263c1c7e87f 100644 --- a/src/CoreGraphics/CGPath.cs +++ b/src/CoreGraphics/CGPath.cs @@ -29,6 +29,9 @@ #nullable enable using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using CoreFoundation; @@ -529,6 +532,170 @@ public void Apply (ApplierFunction func) gch.Free (); } +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyByNormalizing (IntPtr path, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateByNormalizing (bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyByNormalizing (Handle, evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyByUnioningPath (IntPtr path, IntPtr maskPath, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateByUnioningPath (CGPath? maskPath, bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyByUnioningPath (Handle, maskPath.GetHandle (), evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyByIntersectingPath (IntPtr path, IntPtr maskPath, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateByIntersectingPath (CGPath? maskPath, bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyByIntersectingPath (Handle, maskPath.GetHandle (), evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyBySubtractingPath (IntPtr path, IntPtr maskPath, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateBySubtractingPath (CGPath? maskPath, bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyBySubtractingPath (Handle, maskPath.GetHandle (), evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyBySymmetricDifferenceOfPath (IntPtr path, IntPtr maskPath, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateBySymmetricDifferenceOfPath (CGPath? maskPath, bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyBySymmetricDifferenceOfPath (Handle, maskPath.GetHandle (), evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyOfLineBySubtractingPath (IntPtr path, IntPtr maskPath, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateLineBySubtractingPath (CGPath? maskPath, bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyOfLineBySubtractingPath (Handle, maskPath.GetHandle (), evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyOfLineByIntersectingPath (IntPtr path, IntPtr maskPath, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath? CreateLineByIntersectingPath (CGPath? maskPath, bool evenOddFillRule) + { + return Runtime.GetINativeObject(CGPathCreateCopyOfLineByIntersectingPath (Handle, maskPath.GetHandle (), evenOddFillRule), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern unsafe /* CFArrayRef __nullable */ IntPtr CGPathCreateSeparateComponents (IntPtr path, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public CGPath[] GetSeparateComponents (bool evenOddFillRule) + { + var cfArrayRef = CGPathCreateSeparateComponents (Handle, evenOddFillRule); + if (cfArrayRef == IntPtr.Zero) + return Array.Empty (); + return NSArray.ArrayFromHandle (cfArrayRef); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + static extern IntPtr CGPathCreateCopyByFlattening (IntPtr path, nfloat flatteningThreshold); + + public CGPath? CreateByFlattening (nfloat flatteningThreshold) + { + return Runtime.GetINativeObject(CGPathCreateCopyByFlattening (Handle, flatteningThreshold), owns: true); + } + +#if NET + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] +#else + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] +#endif + [DllImport (Constants.CoreGraphicsLibrary)] + [return: MarshalAs (UnmanagedType.I1)] + static extern bool CGPathIntersectsPath (IntPtr path1, IntPtr path2, [MarshalAs (UnmanagedType.I1)] bool evenOddFillRule); + + public bool DoesIntersect (CGPath? maskPath, bool evenOddFillRule) + { + return CGPathIntersectsPath (Handle, maskPath.GetHandle (), evenOddFillRule); + } + static CGPath MakeMutable (IntPtr source, bool owns) { var mutable = CGPathCreateMutableCopy (source); diff --git a/src/coregraphics.cs b/src/coregraphics.cs index 8f451dd87409..fa7b40f956fd 100644 --- a/src/coregraphics.cs +++ b/src/coregraphics.cs @@ -133,6 +133,10 @@ interface CGColorSpaceNames { [Field ("kCGColorSpaceITUR_709_PQ")] NSString ItuR_709_PQ { get; } + [Mac (13,0), iOS (16,0), TV (16,0), MacCatalyst (16,0)] + [Field ("kCGColorSpaceITUR_709_HLG")] + NSString ItuR_709_Hlg { get; } + [Mac (10,11)] [Field ("kCGColorSpaceITUR_2020")] NSString ItuR_2020 { get; } diff --git a/src/frameworks.sources b/src/frameworks.sources index 0195bdf02b58..85af14b6333a 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -450,6 +450,7 @@ COREFOUNDATION_CORE_SOURCES = \ CoreFoundation/DispatchData.cs \ CoreFoundation/NativeObject.cs \ CoreFoundation/Architecture.cs \ + CoreFoundation/CGAffineTransformComponents.cs \ COREFOUNDATION_SOURCES = \ CoreFoundation/CFAllocator.cs \ diff --git a/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs b/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs index 6b4675f0f0bc..ddb415166c6b 100644 --- a/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs +++ b/tests/monotouch-test/CoreGraphics/AffineTransformTest.cs @@ -12,6 +12,7 @@ using System.Runtime.InteropServices; using Foundation; using CoreGraphics; +using CoreFoundation; using ObjCRuntime; using NUnit.Framework; @@ -499,6 +500,38 @@ public void Invert () #endif } + [Test] + public void Decompose () + { + TestRuntime.AssertXcodeVersion (14, 0); + + var components = new CGAffineTransform (1, 2, 3, 4, 5, 6).Decompose (); + Assert.AreNotEqual (0.0, components.Scale); + Assert.AreNotEqual (0.0, components.HorizontalShear); + Assert.AreNotEqual (0.0, components.Rotation); + Assert.AreNotEqual (new CGVector ((nfloat)0, (nfloat)0), components.Translation); + } + + [Test] + public void MakeWithComponents () + { + TestRuntime.AssertXcodeVersion (14, 0); + + var components = new CGAffineTransformComponents () { + Scale = new CGSize (1.0, 2.0), + HorizontalShear = (nfloat)3.0, + Rotation = (nfloat)4.0, + Translation = new CGVector ((nfloat)5.0, (nfloat)6.0), + }; + var transform = CGAffineTransform.MakeWithComponents (components); + Assert.AreNotEqual (0.0, transform.A); + Assert.AreNotEqual (0.0, transform.B); + Assert.AreNotEqual (0.0, transform.C); + Assert.AreNotEqual (0.0, transform.D); + Assert.AreNotEqual (0.0, transform.Tx); + Assert.AreNotEqual (0.0, transform.Ty); + } + [Test] public void NSValueRoundtrip () { diff --git a/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs b/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs index 6926f02131a3..da08c4697103 100644 --- a/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs +++ b/tests/monotouch-test/CoreGraphics/ColorSpaceTest.cs @@ -476,6 +476,14 @@ public void CreateExtendedLinearizedTest () Assert.That ((nint) TestRuntime.CFGetRetainCount (csl.Handle), Is.EqualTo ((nint) 1).Or.EqualTo ((nint) 2)); } } + + [Test] + public void CreateCopyWithStandardRange () + { + TestRuntime.AssertXcodeVersion (14, 0); + using var cs = CGColorSpace.CreateWithName (CGColorSpaceNames.GenericRgb); + Assert.NotNull (cs.CreateCopyWithStandardRange()); + } [Test] public void IsHlgBasedTest () diff --git a/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs b/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs index 6fb345d1914e..d00d105e0778 100644 --- a/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs +++ b/tests/monotouch-test/CoreGraphics/PDFScannerTest.cs @@ -133,6 +133,9 @@ public void Tamarin () Assert.True (scanner.Scan (), "Scan"); Assert.That (bt_count, Is.EqualTo (45), "new paragraph"); Assert.That (do_checks, Is.EqualTo (0), "found the image"); + if (TestRuntime.CheckXcodeVersion (14, 0)) { + scanner.Stop (); + } } } } diff --git a/tests/monotouch-test/CoreGraphics/PathTest.cs b/tests/monotouch-test/CoreGraphics/PathTest.cs index 1ae2a8379d93..800444b2540f 100644 --- a/tests/monotouch-test/CoreGraphics/PathTest.cs +++ b/tests/monotouch-test/CoreGraphics/PathTest.cs @@ -236,6 +236,153 @@ public void AddPath () } } + [Test] + public void Normalizing () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + Assert.IsNotNull (p1.CreateByNormalizing (false)); + Assert.IsNotNull (p1.CreateByNormalizing (true)); + } + } + + [Test] + public void Union () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (2, 2); + p2.AddLineToPoint (0, 0); + Assert.IsNotNull (p1.CreateByUnioningPath (p2, false)); + Assert.IsNotNull (p1.CreateByUnioningPath (p2, true)); + } + } + } + + [Test] + public void Intersecting () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (2, 2); + p2.AddLineToPoint (0, 0); + Assert.IsNotNull (p1.CreateByIntersectingPath (p2, false)); + Assert.IsNotNull (p1.CreateByIntersectingPath (p2, true)); + } + } + } + + [Test] + public void Subtracting () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (2, 2); + p2.AddLineToPoint (0, 0); + Assert.IsNotNull (p1.CreateBySubtractingPath (p2, false)); + Assert.IsNotNull (p1.CreateBySubtractingPath (p2, true)); + } + } + } + + [Test] + public void SymmetricDifference () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (2, 2); + p2.AddLineToPoint (0, 0); + Assert.IsNotNull (p1.CreateBySymmetricDifferenceOfPath (p2, false)); + Assert.IsNotNull (p1.CreateBySymmetricDifferenceOfPath (p2, true)); + } + } + } + + [Test] + public void LineBySubtracting () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (2, 2); + p2.AddLineToPoint (0, 0); + Assert.IsNotNull (p1.CreateLineBySubtractingPath (p2, false)); + Assert.IsNotNull (p1.CreateLineBySubtractingPath (p2, true)); + } + } + } + + [Test] + public void LineByIntersecting () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (2, 2); + p2.AddLineToPoint (0, 0); + Assert.IsNotNull (p1.CreateLineByIntersectingPath (p2, false)); + Assert.IsNotNull (p1.CreateLineByIntersectingPath (p2, true)); + } + } + } + + [Test] + public void GetSeparateComponents () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + Assert.AreEqual (0, p1.GetSeparateComponents (true).Length); + Assert.AreEqual (0, p1.GetSeparateComponents (false).Length); + } + } + + [Test] + public void CreateByFlattening () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (1, 1); + Assert.IsNotNull (p1.CreateByFlattening (new nfloat(0.5))); + } + } + + [Test] + public void DoesIntersect () + { + TestRuntime.AssertXcodeVersion (14, 0); + using (CGPath p1 = new CGPath ()) { + p1.MoveToPoint (0, 0); + p1.AddLineToPoint (2, 2); + using (CGPath p2 = new CGPath ()) { + p2.MoveToPoint (0, 2); + p2.AddLineToPoint (2, 0); + Assert.IsFalse (p1.DoesIntersect (p2, false)); + Assert.IsFalse (p1.DoesIntersect (p2, false)); + } + } + } + [Test] public void Bug40230 () { diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreGraphics.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreGraphics.todo deleted file mode 100644 index 34428d24db16..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreGraphics.todo +++ /dev/null @@ -1,13 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPathIntersectsPathUsingEvenOdd is not bound -!missing-pinvoke! CGPDFScannerStop is not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreGraphics.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreGraphics.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreGraphics.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound diff --git a/tests/xtro-sharpie/iOS-CoreGraphics.todo b/tests/xtro-sharpie/iOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/iOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound diff --git a/tests/xtro-sharpie/macOS-CoreGraphics.todo b/tests/xtro-sharpie/macOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/macOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound diff --git a/tests/xtro-sharpie/tvOS-CoreGraphics.todo b/tests/xtro-sharpie/tvOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/tvOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound diff --git a/tests/xtro-sharpie/watchOS-CoreGraphics.todo b/tests/xtro-sharpie/watchOS-CoreGraphics.todo deleted file mode 100644 index 29955597c892..000000000000 --- a/tests/xtro-sharpie/watchOS-CoreGraphics.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-field! kCGColorSpaceITUR_709_HLG not bound -!missing-pinvoke! CGColorSpaceCreateCopyWithStandardRange is not bound -!missing-pinvoke! CGPathCreateCopyByFlattening is not bound -!missing-pinvoke! CGPathCreateCopyByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyByNormalizing is not bound -!missing-pinvoke! CGPathCreateCopyBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateCopyBySymmetricDifferenceOfPath is not bound -!missing-pinvoke! CGPathCreateCopyByUnioningPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineByIntersectingPath is not bound -!missing-pinvoke! CGPathCreateCopyOfLineBySubtractingPath is not bound -!missing-pinvoke! CGPathCreateSeparateComponents is not bound -!missing-pinvoke! CGPDFScannerStop is not bound -!missing-pinvoke! CGAffineTransformDecompose is not bound -!missing-pinvoke! CGAffineTransformMakeWithComponents is not bound -!missing-pinvoke! CGPathIntersectsPath is not bound