2014-06-08 11 views
0

나는 NSReadPixel을 찾으려고합니다. AppKit에서 온 것처럼 보이지만 MonoMac에서 찾을 수 없습니다. 누군가 구현 여부를 알 수 있습니까?MonoMac의 NSReadPixel은 어디에 있습니까?

편집 : 나는 그것을 꼬박 꼬실 수밖에 없었다. 선언은 아래와 같습니다.

답변

0

구현되지 않았습니다. 그래서 여기에 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