behaved differently in wxMSW and wxGTK/wxOSX before) if more than one item
is selected in a control with wxDV_MULTIPLE style.
-- wxDC::Blit() now honours the source DC coordinate system in wxMSW, as in all
- the other ports, do not apply scaling to source coordinates manually any more.
-
Changes in behaviour which may result in compilation errors
-----------------------------------------------------------
- Update stretchable spaces in wxToolBar after tool removal (Catalin Raceanu).
- Add support for horizontal mouse wheel events (Lauri Nurmi).
- Implement wxGraphicsContext::SetInterpolationQuality() (Eric Jensen).
+- Fix coordinate handling in wxDC::Blit() when source DC is a DIB.
OSX:
return false;
}
- // We need to interpret source-related coordinates in source DC
- // coordinate system.
- xsrc = source->LogicalToDeviceX(xsrc);
- ysrc = source->LogicalToDeviceY(ysrc);
- srcWidth = source->LogicalToDeviceXRel(srcWidth);
- srcHeight = source->LogicalToDeviceYRel(srcHeight);
-
const HDC hdcSrc = GetHdcOf(*implSrc);
// if either the source or destination has alpha channel, we must use
{
SET_STRETCH_BLT_MODE(GetHdc());
+ // 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);
+
// Figure out what co-ordinate system we're supposed to specify
// ysrc in.
const LONG hDIB = ds.dsBmih.biHeight;