+ // Unlike all the other functions used here (i.e. AlphaBlt(),
+ // MaskBlt(), BitBlt() and StretchBlt()), StretchDIBits() does
+ // not take into account the source DC logical coordinates
+ // automatically as it doesn't even work with the source HDC.
+ // So do this manually to ensure that the coordinates are
+ // interpreted in the same way here as in all the other cases.
+ xsrc = source->LogicalToDeviceX(xsrc);
+ ysrc = source->LogicalToDeviceY(ysrc);
+ srcWidth = source->LogicalToDeviceXRel(srcWidth);
+ srcHeight = source->LogicalToDeviceYRel(srcHeight);
+