}
}
-static void processing_polygon(FILE *f, int np, float *xp, float *yp, real line_width, int fill,
- float rr, float gg, float bb){
- int i;
-
- if (np > 0){
- if (fill >= 0){
- // fprintf(f, "beginShape();\n noStroke(); fill(%f, %f, %f);\n", 255*rr, 255*gg, 255*bb);
- fprintf(f, "beginPolygons\ncolor(%f, %f, %f)\n", 255*rr, 255*gg, 255*bb);
- } else {
- //fprintf(f, "beginShape();\n");
- fprintf(f, "beginPolylines\n");
- if (line_width > 0){
- fprintf(f, "strokeWeight(%f);\n", line_width);
- }
- }
- for (i = 0; i < np; i++){
- //fprintf(f, "vertex(%f, %f);\n",xp[i], yp[i]);
- fprintf(f, "%f %f\n",xp[i], yp[i]);
- }
- //fprintf(f, "endShape(CLOSE);\n");
- if (fill >= 0){
- fprintf(f, "endPolygons\n");
- } else {
- fprintf(f, "endPolylines\n");
- }
-
- }
-}
static void dot_one_poly(char **sbuff, int *len, int *len_max, int use_line, real line_width, int fill, int is_river, int np, float *xp, float *yp, char *cstring){
if (use_line){