문제

I am using BitBlt WinAPI to compose a bitmap using C++, and I was wondering what flags do I need to use to invert the colors in it?

도움이 되었습니까?

해결책

What did you try?

BitBlt:

  • DSTINVERT Inverts the destination rectangle.
  • PATINVERT Combines the colors of the brush currently selected in hdcDest, with the colors of the destination rectangle by using the Boolean XOR operator.
  • SRCINVERT Combines the colors of the source and destination rectangles by using the Boolean XOR operator.

다른 팁

You can use : NOTSRCCOPY.

code :

HDC hdc = GetDC(HWND_DESKTOP); BitBlt(hdc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), hdc, NULL, NULL, NOTSRCCOPY);

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top