add ccDrawCircle overloaded function, for jsbinding

This commit is contained in:
dualface 2012-09-20 11:55:12 +08:00
parent 2e900da66d
commit 72e1bdc8cd
2 changed files with 7 additions and 1 deletions

View File

@ -291,6 +291,11 @@ void ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned in
CC_INCREMENT_GL_DRAWS(1);
}
void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter)
{
ccDrawCircle(center, radius, angle, segments, drawLineToCenter, 1.0f, 1.0f);
}
void ccDrawQuadBezier(const CCPoint& origin, const CCPoint& control, const CCPoint& destination, unsigned int segments)
{
lazy_init();

View File

@ -88,7 +88,8 @@ void CC_DLL ccDrawPoly( const CCPoint *vertices, unsigned int numOfVertices, boo
void CC_DLL ccDrawSolidPoly( const CCPoint *poli, unsigned int numberOfPoints, ccColor4F color );
/** draws a circle given the center, radius and number of segments. */
void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX = 1.0f, float scaleY = 1.0f);
void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY);
void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter);
/** draws a quad bezier path
@warning This function could be pretty slow. Use it only for debugging purposes.