git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32025
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxGraphicPath* wxMacCGContext::CreatePath()
{
wxGraphicPath* wxMacCGContext::CreatePath()
{
- CGContextRef cg = GetNativeContext() ;
// make sure that we now have a real cgref, before doing
// anything with paths
return new wxMacCGPath() ;
// make sure that we now have a real cgref, before doing
// anything with paths
return new wxMacCGPath() ;
-atan2(double(yy2-yyc), double(xx2-xxc)) * RAD2DEG;
}
wxCoord alpha2 = wxCoord(radius2 - radius1);
-atan2(double(yy2-yyc), double(xx2-xxc)) * RAD2DEG;
}
wxCoord alpha2 = wxCoord(radius2 - radius1);
- wxCoord alpha1 = wxCoord(wxConvertWXangleToMACangle(radius1));
if( (xx1 > xx2) || (yy1 > yy2) ) {
alpha2 *= -1;
}
if( (xx1 > xx2) || (yy1 > yy2) ) {
alpha2 *= -1;
}
- Rect r = { yyc - rad, xxc - rad, yyc + rad, xxc + rad };
wxMacCGContext* mctx = ((wxMacCGContext*) m_graphicContext) ;
CGContextRef ctx = mctx->GetNativeContext() ;
AddEllipticArcToPath( ctx , CGPointMake( xxc , yyc ) , rad , rad , 0 , 180 ) ;
wxMacCGContext* mctx = ((wxMacCGContext*) m_graphicContext) ;
CGContextRef ctx = mctx->GetNativeContext() ;
AddEllipticArcToPath( ctx , CGPointMake( xxc , yyc ) , rad , rad , 0 , 180 ) ;
hh = -hh;
yy = yy - hh;
}
hh = -hh;
yy = yy - hh;
}
- Rect rect = { yy , xx , yy + hh , xx + ww } ;
wxMacCGContext* mctx = ((wxMacCGContext*) m_graphicContext) ;
CGContextRef ctx = mctx->GetNativeContext() ;
AddRoundedRectToPath( ctx , CGRectMake( xx , yy , ww , hh ) , 16 ,16 ) ;
wxMacCGContext* mctx = ((wxMacCGContext*) m_graphicContext) ;
CGContextRef ctx = mctx->GetNativeContext() ;
AddRoundedRectToPath( ctx , CGRectMake( xx , yy , ww , hh ) , 16 ,16 ) ;
drawX ,
drawY ) ;
path->AddLineToPoint(
drawX ,
drawY ) ;
path->AddLineToPoint(
- drawX + sin(angle/RAD2DEG) * FixedToInt(ascent + descent) ,
- drawY + cos(angle/RAD2DEG) * FixedToInt(ascent + descent) ) ;
+ (int) (drawX + sin(angle/RAD2DEG) * FixedToInt(ascent + descent)) ,
+ (int) (drawY + cos(angle/RAD2DEG) * FixedToInt(ascent + descent)) ) ;
- drawX + sin(angle/RAD2DEG) * FixedToInt(ascent + descent ) + cos(angle/RAD2DEG) * FixedToInt(textAfter) ,
- drawY + cos(angle/RAD2DEG) * FixedToInt(ascent + descent) - sin(angle/RAD2DEG) * FixedToInt(textAfter) ) ;
+ (int) (drawX + sin(angle/RAD2DEG) * FixedToInt(ascent + descent ) + cos(angle/RAD2DEG) * FixedToInt(textAfter)) ,
+ (int) (drawY + cos(angle/RAD2DEG) * FixedToInt(ascent + descent) - sin(angle/RAD2DEG) * FixedToInt(textAfter)) ) ;
- drawX + cos(angle/RAD2DEG) * FixedToInt(textAfter) ,
- drawY - sin(angle/RAD2DEG) * FixedToInt(textAfter) ) ;
+ (int) (drawX + cos(angle/RAD2DEG) * FixedToInt(textAfter)) ,
+ (int) (drawY - sin(angle/RAD2DEG) * FixedToInt(textAfter)) ) ;
m_graphicContext->FillPath( path , m_textBackgroundColour ) ;
delete path ;
m_graphicContext->FillPath( path , m_textBackgroundColour ) ;
delete path ;