Are there any ways to get pixel color under mouse cursor? (For not my windows).
I'm looking for cross-platform solutions. But it will be enought to provide mac os solution.
Are there any ways to get pixel color under mouse cursor? (For not my windows).
I'm looking for cross-platform solutions. But it will be enought to provide mac os solution.
If you have id of window you can try this: http://qt-project.org/doc/qt-4.8/qpixmap.html#grabWindow
QPixmap pixmap = QPixmap::grabWindow(QApplication::desktop()->winId(), x, y, 1, 1);
QRgb pixelValue = pixmap.toImage().pixel(0,0);