::SetBkMode(GetHdc(), TRANSPARENT);
else
::SetBkMode(GetHdc(), OPAQUE);
+ Last change: AC 29 Jan 101 8:54 pm
*/
}
wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
{
- return (wxCoord) (((x) - m_deviceOriginX)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX) - m_logicalOriginX);
+ double xRel = x - m_deviceOriginX;
+ xRel /= m_logicalScaleX*m_userScaleX*m_signX*m_scaleX;
+ return (wxCoord)(xRel + m_logicalOriginX);
}
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
{
- return (wxCoord) (((y) - m_deviceOriginY)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY) - m_logicalOriginY);
+ double yRel = y - m_deviceOriginY;
+ yRel /= m_logicalScaleY*m_userScaleY*m_signY*m_scaleY;
+ return (wxCoord)(yRel + m_logicalOriginY);
}
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
// of the mask which is also contrary to the Windows one)
success = ::MaskBlt(GetHdc(), xdest, ydest, width, height,
GetHdcOf(*source), xsrc, ysrc,
- (HBITMAP)mask->GetMaskBitmap(), 0, 0,
+ (HBITMAP)mask->GetMaskBitmap(), xsrc, ysrc,
MAKEROP4(dwRop, DSTCOPY)) != 0;
if ( !success )