<div><div>Hi, </div><div><br></div><div>> I would prefer that you use the expect() macro when comparing integers in tests.</div><div>></div><div>>If you don't expect a function (in this case GetDIBits, in patch 2) to</div><div>>fail when running a test, use ok() to check that it succeeded. It's OK</div><div>>if the test will crash when the ok() check fails.</div><div>></div><div>>If GetDIBits really does fail sometimes, we need to understand why</div><div>>that happens and document it in the test.</div><div>></div><div>>When writing comments about this, make sure you specify that you are</div><div>>talking about gdi32 device coordinates, which are different from</div><div>>gdiplus device coordinates.  </div><div><br></div><div>I have modified, please see the new patch file.</div><div><br></div><div>>+    status = GdipSetClipRectI(graphics, rect.left+width/2, rect.top+height/2,</div><div>>+            rect.right, rect.bottom, CombineModeReplace);</div><div>></div><div>>This looks wrong to me. GdipSetClipRectI takes a width and height, not</div><div>>right and bottom.</div><div>The above statement is setting a clip range:</div><div>(rect.left+width/2, rect.top+height/2) - (rect.left+rect.right+width/2, rect.top+rect.bottom+height/2).</div><div>Because the rect is {100, 100, 180, 180}, so the clip range is: (140,140) - (320,320).</div><div>In fact GdipSetClipRectI can take any int value to specify a clip region.  </div><div>But according to your advice, I have changed to take a width and height .  </div><div><br></div><div>For helping review, I attached a BMP file which is the output of each test_GdipFillRectangle <span style="line-height: 1.5;">drawing on Memory DC.</span></div><div>Thank you.</div><div><br></div></div><div><sign signid="0"><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;"><div>Regards.</div>
</div></sign></div><div><br></div><!--<![endif]-->