}
CalcBoundingBox(x, y);
-
+
return success;
#endif
}
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__
if (radius < 0.0)
{
- double smallest = 0.0;
- if (width < height)
- smallest = width;
- else
- smallest = height;
+ double smallest = (width < height) ? width : height;
radius = (- radius * smallest);
}
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__
if ( m_brush.GetResourceHandle() )
{
- HBRUSH b = 0;
- b = (HBRUSH) ::SelectObject(GetHdc(), (HBRUSH)m_brush.GetResourceHandle());
+ HBRUSH b = (HBRUSH) ::SelectObject(GetHdc(), (HBRUSH)m_brush.GetResourceHandle());
if (!m_oldBrush)
m_oldBrush = (WXHBRUSH) b;
}
::SetBkColor(GetHdc(), m_textBackgroundColour.GetPixel() );
}
- DWORD dwRop = SRCCOPY;
+ DWORD dwRop;
switch (rop)
{
case wxXOR: dwRop = SRCINVERT; break;
}
if ( !success && (caps & RC_STRETCHBLT) )
+#endif
+ // __WXWINCE__
{
+#ifndef __WXWINCE__
StretchBltModeChanger changeMode(GetHdc(), COLORONCOLOR);
+#endif
if ( !::StretchBlt
(
success = TRUE;
}
}
-#endif
- // __WXWINCE__
}
::SetTextColor(GetHdc(), old_textground);