It seems that DrawRect() renders a rectangle 1 pixel smaller in both directions than it should.
If you copy and paste the following code in the Minimal application you will see the phenomenon immediately. The red line and the white pixel appear under the rectangle however they should overlap it. I don't know if it is my problem of understanding the RECT structure or it is really a bug. Please advise.
If you copy and paste the following code in the Minimal application you will see the phenomenon immediately. The red line and the white pixel appear under the rectangle however they should overlap it. I don't know if it is my problem of understanding the RECT structure or it is really a bug. Please advise.
- Code:
RECT rect;
::SetRect(&rect, 30,30,100,100);
backbuffer.DrawRect(&rect, RGB(255,0,0), 0,0);
backbuffer.DrawLine(0,100,100,100,RGB(255,255,0),0,0);
backbuffer.SetPixel(100,100,RGB(255,255,255));