提交 d1a50814 编写于 作者: A anthony

6989505: java.awt.Robot's getPixelColor treats not fully opaque Window as fully transparent.

Summary: Use ::CreateDC() instead of ::GetDC()
Reviewed-by: art, dcherepanov
上级 63b9c631
......@@ -194,9 +194,9 @@ inline jint AwtRobot::WinToJavaPixel(USHORT r, USHORT g, USHORT b)
jint AwtRobot::GetRGBPixel( jint x, jint y)
{
HDC hdc = GetDC(NULL);
HDC hdc = ::CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
COLORREF ref = ::GetPixel( hdc, x, y );
ReleaseDC(NULL,hdc);
::DeleteDC(hdc);
jint value = WinToJavaPixel(GetRValue(ref), GetGValue(ref), GetBValue(ref));
return value;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册