summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.MacOS/Extensions/NSImageExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.MacOS/Extensions/NSImageExtensions.cs')
-rw-r--r--Xamarin.Forms.Platform.MacOS/Extensions/NSImageExtensions.cs22
1 files changed, 0 insertions, 22 deletions
diff --git a/Xamarin.Forms.Platform.MacOS/Extensions/NSImageExtensions.cs b/Xamarin.Forms.Platform.MacOS/Extensions/NSImageExtensions.cs
deleted file mode 100644
index 09521731..00000000
--- a/Xamarin.Forms.Platform.MacOS/Extensions/NSImageExtensions.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using AppKit;
-
-namespace Xamarin.Forms.Platform.MacOS
-{
- public static class NSImageExtensions
- {
- public static NSImage ResizeTo(this NSImage self, CoreGraphics.CGSize newSize)
- {
- if (self == null)
- return null;
- self.ResizingMode = NSImageResizingMode.Stretch;
- var resizedImage = new NSImage(newSize);
- resizedImage.LockFocus();
- self.Size = newSize;
- NSGraphicsContext.CurrentContext.ImageInterpolation = NSImageInterpolation.High;
- self.Draw(CoreGraphics.CGPoint.Empty, new CoreGraphics.CGRect(0, 0, newSize.Width, newSize.Height),
- NSCompositingOperation.Copy, 1.0f);
- resizedImage.UnlockFocus();
- return resizedImage;
- }
- }
-} \ No newline at end of file