gdiplus: fix GdipFillRectangleI no effect on memoryDCwhosewindoworiginpoint has changed

Vincent Povirk madewokherd at
Mon Dec 22 11:35:50 CST 2014

The patches look good to me.

On Mon, Dec 22, 2014 at 6:40 AM, Changhui Liu
<liuchanghui at> wrote:
> Hi,
>> I would prefer that you use the expect() macro when comparing integers in
>> tests.
>>If you don't expect a function (in this case GetDIBits, in patch 2) to
>>fail when running a test, use ok() to check that it succeeded. It's OK
>>if the test will crash when the ok() check fails.
>>If GetDIBits really does fail sometimes, we need to understand why
>>that happens and document it in the test.
>>When writing comments about this, make sure you specify that you are
>>talking about gdi32 device coordinates, which are different from
>>gdiplus device coordinates.
> I have modified, please see the new patch file.
>>+    status = GdipSetClipRectI(graphics, rect.left+width/2,
>>+            rect.right, rect.bottom, CombineModeReplace);
>>This looks wrong to me. GdipSetClipRectI takes a width and height, not
>>right and bottom.
> The above statement is setting a clip range:
> (rect.left+width/2, - (rect.left+rect.right+width/2,
> Because the rect is {100, 100, 180, 180}, so the clip range is: (140,140) -
> (320,320).
> In fact GdipSetClipRectI can take any int value to specify a clip region.
> But according to your advice, I have changed to take a width and height .
> For helping review, I attached a BMP file which is the output of each
> test_GdipFillRectangle drawing on Memory DC.
> Thank you.
> ------------------
> Regards.

More information about the wine-devel mailing list