add CC_DLL of DrawPrimitive

This commit is contained in:
Huabing.Xu 2014-07-14 17:40:02 +08:00
parent 952ca0eb75
commit 9806b37398
1 changed files with 20 additions and 20 deletions

View File

@ -79,85 +79,85 @@ class PointArray;
namespace DrawPrimitives namespace DrawPrimitives
{ {
/** Initializes the drawing primitives */ /** Initializes the drawing primitives */
void init(); void CC_DLL init();
/** Frees allocated resources by the drawing primitives */ /** Frees allocated resources by the drawing primitives */
void free(); void CC_DLL free();
/** draws a point given x and y coordinate measured in points */ /** draws a point given x and y coordinate measured in points */
void drawPoint(const Vec2& point); void CC_DLL drawPoint(const Vec2& point);
/** draws an array of points. /** draws an array of points.
@since v0.7.2 @since v0.7.2
*/ */
void drawPoints(const Vec2 *points, unsigned int numberOfPoints); void CC_DLL drawPoints(const Vec2 *points, unsigned int numberOfPoints);
/** draws a line given the origin and destination point measured in points */ /** draws a line given the origin and destination point measured in points */
void drawLine(const Vec2& origin, const Vec2& destination); void CC_DLL drawLine(const Vec2& origin, const Vec2& destination);
/** draws a rectangle given the origin and destination point measured in points. */ /** draws a rectangle given the origin and destination point measured in points. */
void drawRect(Vec2 origin, Vec2 destination); void CC_DLL drawRect(Vec2 origin, Vec2 destination);
/** draws a solid rectangle given the origin and destination point measured in points. /** draws a solid rectangle given the origin and destination point measured in points.
@since 1.1 @since 1.1
*/ */
void drawSolidRect(Vec2 origin, Vec2 destination, Color4F color); void CC_DLL drawSolidRect(Vec2 origin, Vec2 destination, Color4F color);
/** draws a polygon given a pointer to point coordinates and the number of vertices measured in points. /** draws a polygon given a pointer to point coordinates and the number of vertices measured in points.
The polygon can be closed or open The polygon can be closed or open
*/ */
void drawPoly(const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon); void CC_DLL drawPoly(const Vec2 *vertices, unsigned int numOfVertices, bool closePolygon);
/** draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color. /** draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.
*/ */
void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color); void CC_DLL drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, Color4F color);
/** draws a circle given the center, radius and number of segments. */ /** draws a circle given the center, radius and number of segments. */
void drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY); void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY);
void drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter); void CC_DLL drawCircle(const Vec2& center, float radius, float angle, unsigned int segments, bool drawLineToCenter);
/** draws a solid circle given the center, radius and number of segments. */ /** draws a solid circle given the center, radius and number of segments. */
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY); void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY);
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments); void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments);
/** draws a quad bezier path /** draws a quad bezier path
@warning This function could be pretty slow. Use it only for debugging purposes. @warning This function could be pretty slow. Use it only for debugging purposes.
@since v0.8 @since v0.8
*/ */
void drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments); void CC_DLL drawQuadBezier(const Vec2& origin, const Vec2& control, const Vec2& destination, unsigned int segments);
/** draws a cubic bezier path /** draws a cubic bezier path
@warning This function could be pretty slow. Use it only for debugging purposes. @warning This function could be pretty slow. Use it only for debugging purposes.
@since v0.8 @since v0.8
*/ */
void drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments); void CC_DLL drawCubicBezier(const Vec2& origin, const Vec2& control1, const Vec2& control2, const Vec2& destination, unsigned int segments);
/** draws a Catmull Rom path. /** draws a Catmull Rom path.
@warning This function could be pretty slow. Use it only for debugging purposes. @warning This function could be pretty slow. Use it only for debugging purposes.
@since v2.0 @since v2.0
*/ */
void drawCatmullRom(PointArray *arrayOfControlPoints, unsigned int segments); void CC_DLL drawCatmullRom(PointArray *arrayOfControlPoints, unsigned int segments);
/** draws a Cardinal Spline path. /** draws a Cardinal Spline path.
@warning This function could be pretty slow. Use it only for debugging purposes. @warning This function could be pretty slow. Use it only for debugging purposes.
@since v2.0 @since v2.0
*/ */
void drawCardinalSpline(PointArray *config, float tension, unsigned int segments); void CC_DLL drawCardinalSpline(PointArray *config, float tension, unsigned int segments);
/** set the drawing color with 4 unsigned bytes /** set the drawing color with 4 unsigned bytes
@since v2.0 @since v2.0
*/ */
void setDrawColor4B(GLubyte r, GLubyte g, GLubyte b, GLubyte a); void CC_DLL setDrawColor4B(GLubyte r, GLubyte g, GLubyte b, GLubyte a);
/** set the drawing color with 4 floats /** set the drawing color with 4 floats
@since v2.0 @since v2.0
*/ */
void setDrawColor4F(GLfloat r, GLfloat g, GLfloat b, GLfloat a); void CC_DLL setDrawColor4F(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
/** set the point size in points. Default 1. /** set the point size in points. Default 1.
@since v2.0 @since v2.0
*/ */
void setPointSize(GLfloat pointSize); void CC_DLL setPointSize(GLfloat pointSize);
}; };