Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ccDrawPoly fill parameter doesn't work #18

Open
quantumtunneling opened this issue Oct 19, 2012 · 0 comments
Open

ccDrawPoly fill parameter doesn't work #18

quantumtunneling opened this issue Oct 19, 2012 · 0 comments

Comments

@quantumtunneling
Copy link

The 'fill' parameter isn't even referenced:

void ccDrawPoly(const CCPoint *poli, int numberOfPoints, bool closePolygon, bool fill)
{

if (closePolygon)
{
    ccVertex2F* vertices = new ccVertex2F[numberOfPoints+1];
    for (int i=0;i<numberOfPoints;i++)
    {
        vertices[i].x = poli[i].x * CC_CONTENT_SCALE_FACTOR();
        vertices[i].y = poli[i].y * CC_CONTENT_SCALE_FACTOR();
    }
    vertices[numberOfPoints].x = poli[0].x * CC_CONTENT_SCALE_FACTOR();
    vertices[numberOfPoints].y = poli[0].y * CC_CONTENT_SCALE_FACTOR();
    CCDrawingPrimitive::Drawing(vertices, numberOfPoints+1,DrawingPolyClosed);
} 
else
{
    ccVertex2F* vertices = new ccVertex2F[numberOfPoints];
    for (int i=0;i<numberOfPoints;i++)
    {
        vertices[i].x = poli[i].x * CC_CONTENT_SCALE_FACTOR();
        vertices[i].y = poli[i].y * CC_CONTENT_SCALE_FACTOR();
    }
    CCDrawingPrimitive::Drawing(vertices, numberOfPoints,DrawingPolyOpened);
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant