X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4676948b6814c97b93c431a8cbcd8c0352c87ba9..cb73e6001f891ae46b12a1e4ca39b93649cb6099:/src/msw/dc.cpp?ds=sidebyside diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 7d596522de..2f2d0e54a5 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -17,7 +17,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dc.h" #endif @@ -40,6 +40,8 @@ #include "wx/icon.h" #endif +#include "wx/msw/private.h" // needs to be before #include + #include "wx/sysopt.h" #include "wx/dcprint.h" #include "wx/module.h" @@ -52,8 +54,6 @@ #include #include -#include "wx/msw/private.h" // needs to be before #include - #if wxUSE_COMMON_DIALOGS && !defined(__WXMICROWIN__) #include #endif @@ -158,6 +158,8 @@ private: COLORREF m_colFgOld, m_colBgOld; bool m_changed; + + DECLARE_NO_COPY_CLASS(wxColourChanger) }; // this class saves the old stretch blit mode during its life time @@ -186,6 +188,8 @@ private: const HDC m_hdc; int m_modeOld; + + DECLARE_NO_COPY_CLASS(StretchBltModeChanger) }; // =========================================================================== @@ -626,7 +630,12 @@ void wxDC::DoDrawArc(wxCoord x1, wxCoord y1, wxCoord xc, wxCoord yc) { #ifdef __WXWINCE__ - // FIXME: emulate Arc + // Slower emulation since WinCE doesn't support Pie and Arc + double r = sqrt( (x1-xc)*(x1-xc) + (y1-yc)*(y1-yc) ); + double sa = acos((x1-xc)/r)/M_PI*180; // between 0 and 180 + if( y1>yc ) sa = -sa; // below center + double ea = atan2(yc-y2, x2-xc)/M_PI*180; + DoDrawEllipticArcRot( xc-r, yc-r, 2*r, 2*r, sa, ea ); #else #ifdef __WXMICROWIN__ @@ -917,7 +926,7 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) void wxDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) { #ifdef __WXWINCE__ - // FIXME + DoDrawEllipticArcRot( x, y, w, h, sa, ea ); #else #ifdef __WXMICROWIN__