Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在努力寻找NSReadPixel。好像它来自 AppKit,但我在 MonoMac 中找不到它。有人可以告诉我它是否实施了吗?
NSReadPixel
编辑:我不得不pinvoke它。声明如下。
它没有被实施。所以这里是 PInvoke:
[System.Runtime.InteropServices.DllImport("/System/Library/Frameworks/AppKit.framework/AppKit")] extern static IntPtr NSReadPixel(System.Drawing.PointF point);
例子:
var color = new NSColor(NSReadPixel(aPoint)); // where aPoint is PointF