diff --git a/src/AppKit/NSOpenGLContext.cs b/src/AppKit/NSOpenGLContext.cs index f7ec233a714d..141be940c961 100644 --- a/src/AppKit/NSOpenGLContext.cs +++ b/src/AppKit/NSOpenGLContext.cs @@ -1,7 +1,5 @@ #if !__MACCATALYST__ -#if !NO_SYSTEM_DRAWING using System.Drawing; -#endif #nullable enable @@ -24,7 +22,6 @@ unsafe void SetValue (int /* GLint */ val, NSOpenGLContextParameter par) return ret; } -#if !NO_SYSTEM_DRAWING /// To be added. /// To be added. /// To be added. @@ -38,7 +35,6 @@ unsafe public Rectangle SwapRectangle { SetValues ((IntPtr) (&value), NSOpenGLContextParameter.SwapRectangle); } } -#endif /// To be added. /// To be added. diff --git a/src/CoreGraphics/CGEventTypes.cs b/src/CoreGraphics/CGEventTypes.cs index 73f1af09291f..db2e8dd989f9 100644 --- a/src/CoreGraphics/CGEventTypes.cs +++ b/src/CoreGraphics/CGEventTypes.cs @@ -12,9 +12,8 @@ #if MONOMAC || __MACCATALYST__ -#if !NO_SYSTEM_DRAWING using System.Drawing; -#endif + using CoreFoundation; namespace CoreGraphics { diff --git a/src/CoreGraphics/CGPoint.cs b/src/CoreGraphics/CGPoint.cs index ddcf9733786a..fa6811f5be33 100644 --- a/src/CoreGraphics/CGPoint.cs +++ b/src/CoreGraphics/CGPoint.cs @@ -1,12 +1,9 @@ #nullable enable +using System.Drawing; using System.Globalization; using System.Runtime.CompilerServices; -#if !NO_SYSTEM_DRAWING -using System.Drawing; -#endif - using CoreFoundation; namespace CoreGraphics { @@ -47,7 +44,6 @@ public struct CGPoint : IEquatable { return new CGPoint (l.x - r.Width, l.y - r.Height); } -#if !NO_SYSTEM_DRAWING public static implicit operator CGPoint (PointF point) { return new CGPoint (point.X, point.Y); @@ -67,7 +63,6 @@ public static explicit operator Point (CGPoint point) { return new Point ((int) point.X, (int) point.Y); } -#endif /// To be added. /// To be added. diff --git a/src/CoreGraphics/CGRect.cs b/src/CoreGraphics/CGRect.cs index ec6933bc75bc..16604ff59134 100644 --- a/src/CoreGraphics/CGRect.cs +++ b/src/CoreGraphics/CGRect.cs @@ -1,12 +1,9 @@ #nullable enable +using System.Drawing; using System.Globalization; using System.Runtime.CompilerServices; -#if !NO_SYSTEM_DRAWING -using System.Drawing; -#endif - using CoreFoundation; namespace CoreGraphics { @@ -75,7 +72,6 @@ public static CGRect Infinite { left.Height != right.Height; } -#if !NO_SYSTEM_DRAWING public static implicit operator CGRect (RectangleF rect) { return new CGRect (rect.X, rect.Y, rect.Width, rect.Height); @@ -95,7 +91,6 @@ public static explicit operator Rectangle (CGRect rect) { return new Rectangle ((int) rect.X, (int) rect.Y, (int) rect.Width, (int) rect.Height); } -#endif /// /// A rectangle to intersect. diff --git a/src/CoreGraphics/CGSize.cs b/src/CoreGraphics/CGSize.cs index 042b8587e542..b90f2e664007 100644 --- a/src/CoreGraphics/CGSize.cs +++ b/src/CoreGraphics/CGSize.cs @@ -1,12 +1,9 @@ #nullable enable +using System.Drawing; using System.Globalization; using System.Runtime.CompilerServices; -#if !NO_SYSTEM_DRAWING -using System.Drawing; -#endif - using CoreFoundation; namespace CoreGraphics { @@ -44,7 +41,6 @@ public struct CGSize : IEquatable { return new CGSize (l.width - r.Width, l.height - r.Height); } -#if !NO_SYSTEM_DRAWING public static implicit operator CGSize (SizeF size) { return new CGSize (size.Width, size.Height); @@ -64,7 +60,6 @@ public static explicit operator Size (CGSize size) { return new Size ((int) size.Width, (int) size.Height); } -#endif public static explicit operator CGPoint (CGSize size) { diff --git a/src/Foundation/NSObject2.cs b/src/Foundation/NSObject2.cs index 6c25c77fbd8a..1b16f049f9fe 100644 --- a/src/Foundation/NSObject2.cs +++ b/src/Foundation/NSObject2.cs @@ -25,9 +25,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; -#if !NO_SYSTEM_DRAWING using System.Drawing; -#endif using System.Diagnostics; using System.Runtime.InteropServices.ObjectiveC; @@ -881,14 +879,12 @@ public static NSObject FromObject (object obj) default: if (t == typeof (NativeHandle)) return NSValue.ValueFromPointer ((NativeHandle) obj); -#if !NO_SYSTEM_DRAWING if (t == typeof (SizeF)) return NSValue.FromSizeF ((SizeF) obj); else if (t == typeof (RectangleF)) return NSValue.FromRectangleF ((RectangleF) obj); else if (t == typeof (PointF)) return NSValue.FromPointF ((PointF) obj); -#endif if (t == typeof (nint)) return NSNumber.FromNInt ((nint) obj); else if (t == typeof (nuint)) diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs index baf3d14c00b7..48cc2ba31a39 100644 --- a/src/ObjCRuntime/Dlfcn.cs +++ b/src/ObjCRuntime/Dlfcn.cs @@ -32,14 +32,12 @@ #nullable enable using System.ComponentModel; +using System.Drawing; #if !COREBUILD using CoreFoundation; using CoreGraphics; using CoreMedia; #endif -#if !NO_SYSTEM_DRAWING -using System.Drawing; -#endif namespace ObjCRuntime { diff --git a/src/SpriteKit/SKKeyframeSequence.cs b/src/SpriteKit/SKKeyframeSequence.cs index 443dcdf44d30..f1962300d3cf 100644 --- a/src/SpriteKit/SKKeyframeSequence.cs +++ b/src/SpriteKit/SKKeyframeSequence.cs @@ -8,9 +8,7 @@ // using System.Collections.Generic; -#if !NO_SYSTEM_DRAWING using System.Drawing; -#endif #nullable enable