Honour source wxDC coordinate system in wxDC::Blit() in wxMSW.
wxGTK and wxOSX already did this so do it in wxMSW as well. Update the documentation to make this explicit. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -207,6 +207,9 @@ Changes in behaviour not resulting in compilation errors, please read this!
|
|||||||
behaved differently in wxMSW and wxGTK/wxOSX before) if more than one item
|
behaved differently in wxMSW and wxGTK/wxOSX before) if more than one item
|
||||||
is selected in a control with wxDV_MULTIPLE style.
|
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
|
Changes in behaviour which may result in compilation errors
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
@@ -1125,6 +1125,11 @@ public:
|
|||||||
target DCs. If you need to apply scaling while copying, use
|
target DCs. If you need to apply scaling while copying, use
|
||||||
StretchBlit().
|
StretchBlit().
|
||||||
|
|
||||||
|
Notice that source DC coordinates @a xsrc and @a ysrc are interpreted
|
||||||
|
using the current source DC coordinate system, i.e. the scale, origin
|
||||||
|
position and axis directions are taken into account when transforming
|
||||||
|
them to physical (pixel) coordinates.
|
||||||
|
|
||||||
@param xdest
|
@param xdest
|
||||||
Destination device context x position.
|
Destination device context x position.
|
||||||
@param ydest
|
@param ydest
|
||||||
@@ -1195,7 +1200,10 @@ public:
|
|||||||
source or target DC but calling this method is simpler and can also be
|
source or target DC but calling this method is simpler and can also be
|
||||||
more efficient if the platform provides a native implementation of it.
|
more efficient if the platform provides a native implementation of it.
|
||||||
|
|
||||||
The meaning of its other parameters is the same as with Blit().
|
The meaning of its other parameters is the same as with Blit(), in
|
||||||
|
particular all source coordinates are interpreted using the source DC
|
||||||
|
coordinate system, i.e. are affected by its scale, origin translation
|
||||||
|
and axis direction.
|
||||||
|
|
||||||
@param xdest
|
@param xdest
|
||||||
Destination device context x position.
|
Destination device context x position.
|
||||||
|
@@ -2246,6 +2246,13 @@ bool wxMSWDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
return false;
|
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);
|
const HDC hdcSrc = GetHdcOf(*implSrc);
|
||||||
|
|
||||||
// if either the source or destination has alpha channel, we must use
|
// if either the source or destination has alpha channel, we must use
|
||||||
|
Reference in New Issue
Block a user