#include #include #include #include #include struct my_stars{ gdPoint point[5]; }; //star[55]; #define PI 3.14159 void usage(void){ printf("Usage:\n"); printf("flag \n"); } //int In_Star(struct star_params *star, int x, int y){ // return 1; //} void draw_star(gdImagePtr im, float union_h, float union_w, int white, float star_diam, float star_x_step, float star_y_step){ float x; float y; float angle; float radius = star_diam / 2; int y_stagger = 0; int point_count; int star_count = 0; //gdPoint points[5]; struct my_stars star[100]; struct my_stars pent[100]; gdPoint tria[3]; gdPoint trib[3]; gdPoint tric[3]; gdPoint trid[3]; gdPoint trie[3]; int x_count; int y_count; int y_max; for(x_count=0; x_count<11; x_count++){ //y=0; x=x_count*star_x_step+star_x_step; if(y_stagger){ y=star_y_step; y_max=4; y_stagger=0; }else{ y=0; //y=star_y_step; y_max=5; y_stagger=1; } for(y_count=0; y_count