git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50591
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// otherwise
static bool AlphaBlt(HDC hdcDst,
int x, int y, int dstWidth, int dstHeight,
// otherwise
static bool AlphaBlt(HDC hdcDst,
int x, int y, int dstWidth, int dstHeight,
int srcWidth, int srcHeight,
HDC hdcSrc,
const wxBitmap& bmp);
int srcWidth, int srcHeight,
HDC hdcSrc,
const wxBitmap& bmp);
static void
wxAlphaBlend(HDC hdcDst, int xDst, int yDst,
int dstWidth, int dstHeight,
static void
wxAlphaBlend(HDC hdcDst, int xDst, int yDst,
int dstWidth, int dstHeight,
int srcWidth, int srcHeight,
const wxBitmap& bmpSrc);
int srcWidth, int srcHeight,
const wxBitmap& bmpSrc);
// wxMSWDCImpl
// ---------------------------------------------------------------------------
// wxMSWDCImpl
// ---------------------------------------------------------------------------
-wxMSWDCImpl::wxMSWDCImpl( wxDC *owner, WXHDC hDC ) :
+wxMSWDCImpl::wxMSWDCImpl( wxDC *owner, WXHDC hDC ) :
-{
- Init();
- m_hDC = hDC;
+{
+ Init();
+ m_hDC = hDC;
}
wxMSWDCImpl::~wxMSWDCImpl()
}
wxMSWDCImpl::~wxMSWDCImpl()
wxCoord x2 = x + width;
wxCoord y2 = y + height;
wxCoord x2 = x + width;
wxCoord y2 = y + height;
- if ((m_logicalFunction == wxCOPY) && (m_pen.GetStyle() == wxTRANSPARENT))
- {
- RECT rect;
- rect.left = XLOG2DEV(x);
- rect.top = YLOG2DEV(y);
- rect.right = XLOG2DEV(x2);
- rect.bottom = YLOG2DEV(y2);
- (void)FillRect(GetHdc(), &rect, (HBRUSH)m_brush.GetResourceHandle() );
- }
- else
- {
- // Windows draws the filled rectangles without outline (i.e. drawn with a
- // transparent pen) one pixel smaller in both directions and we want them
- // to have the same size regardless of which pen is used - adjust
+ wxCoord x2dev = XLOG2DEV(x2),
+ y2dev = YLOG2DEV(y2);
- // I wonder if this shouldnt be done after the LOG2DEV() conversions. RR.
- if ( m_pen.GetStyle() == wxTRANSPARENT )
- {
- // Apparently not needed for WinCE (see e.g. Life! demo)
+ // Windows (but not Windows CE) draws the filled rectangles without outline
+ // (i.e. drawn with a transparent pen) one pixel smaller in both directions
+ // and we want them to have the same size regardless of which pen is used
- x2++;
- y2++;
-#endif
- }
-
- (void)Rectangle(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), YLOG2DEV(y2));
+ if ( m_pen.GetStyle() == wxTRANSPARENT )
+ {
+ x2dev++;
+ y2dev++;
+ (void)Rectangle(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), x2dev, y2dev);
CalcBoundingBox(x, y);
CalcBoundingBox(x2, y2);
CalcBoundingBox(x, y);
CalcBoundingBox(x2, y2);
::SetViewportOrgEx(GetHdc(), m_deviceOriginX, m_deviceOriginY, NULL);
::SetWindowOrgEx(GetHdc(), m_logicalOriginX, m_logicalOriginY, NULL);
#endif
::SetViewportOrgEx(GetHdc(), m_deviceOriginX, m_deviceOriginY, NULL);
::SetWindowOrgEx(GetHdc(), m_logicalOriginX, m_logicalOriginY, NULL);
#endif
}
void wxMSWDCImpl::SetMapMode(int mode)
}
void wxMSWDCImpl::SetMapMode(int mode)
wxFAIL_MSG( _T("unknown mapping mode in SetMapMode") );
}
}
wxFAIL_MSG( _T("unknown mapping mode in SetMapMode") );
}
}
RealizeScaleAndOrigin();
}
RealizeScaleAndOrigin();
}
return;
wxDCImpl::SetUserScale(x,y);
return;
wxDCImpl::SetUserScale(x,y);
RealizeScaleAndOrigin();
}
RealizeScaleAndOrigin();
}
int signX = xLeftRight ? 1 : -1,
signY = yBottomUp ? -1 : 1;
int signX = xLeftRight ? 1 : -1,
signY = yBottomUp ? -1 : 1;
if (signX == m_signX && signY == m_signY)
return;
if (signX == m_signX && signY == m_signY)
return;
wxDCImpl::SetAxisOrientation( xLeftRight, yBottomUp );
RealizeScaleAndOrigin();
wxDCImpl::SetAxisOrientation( xLeftRight, yBottomUp );
RealizeScaleAndOrigin();
if ( x == m_deviceOriginX && y == m_deviceOriginY )
return;
if ( x == m_deviceOriginX && y == m_deviceOriginY )
return;
wxDCImpl::SetDeviceOrigin( x, y );
::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL);
wxDCImpl::SetDeviceOrigin( x, y );
::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL);
static bool AlphaBlt(HDC hdcDst,
int x, int y, int dstWidth, int dstHeight,
static bool AlphaBlt(HDC hdcDst,
int x, int y, int dstWidth, int dstHeight,
int srcWidth, int srcHeight,
HDC hdcSrc,
const wxBitmap& bmp)
int srcWidth, int srcHeight,
HDC hdcSrc,
const wxBitmap& bmp)
static void
wxAlphaBlend(HDC hdcDst, int xDst, int yDst,
int dstWidth, int dstHeight,
static void
wxAlphaBlend(HDC hdcDst, int xDst, int yDst,
int dstWidth, int dstHeight,
int srcWidth, int srcHeight,
const wxBitmap& bmpSrc)
{
int srcWidth, int srcHeight,
const wxBitmap& bmpSrc)
{