Subversion Repositories wimsdev

Rev

Rev 16722 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16722 Rev 17351
Line 43... Line 43...
43
int polynum = -1;
43
int polynum = -1;
44
 
44
 
45
 
45
 
46
if(strncmp(draw_type,"functions",9) == 0){
46
if(strncmp(draw_type,"functions",9) == 0){
47
 draw_num = 58; polynum = (int) (draw_type[9]-'0');found = 1;
47
 draw_num = 58; polynum = (int) (draw_type[9]-'0');found = 1;
48
// fprintf(stdout,"found polys%d<br />",polynum);
48
// fprintf(stdout,"found polys%d<br>",polynum);
49
}
49
}
50
else
50
else
51
{
51
{
52
if(strncmp(draw_type,"polys",5) == 0){
52
if(strncmp(draw_type,"polys",5) == 0){
53
 draw_num = 31; polynum = (int) (draw_type[5]-'0');found = 1;
53
 draw_num = 31; polynum = (int) (draw_type[5]-'0');found = 1;
54
// fprintf(stdout,"found polys%d<br />",polynum);
54
// fprintf(stdout,"found polys%d<br>",polynum);
55
}
55
}
56
else
56
else
57
{
57
{
58
 if( strncmp(draw_type,"poly",4)  == 0 && ( strstr(draw_type,"polygon") == NULL && strstr(draw_type,"polyline") == NULL ) ){
58
 if( strncmp(draw_type,"poly",4)  == 0 && ( strstr(draw_type,"polygon") == NULL && strstr(draw_type,"polyline") == NULL ) ){
59
  draw_num = 30; polynum = (int) (draw_type[4]-'0');found = 1;
59
  draw_num = 30; polynum = (int) (draw_type[4]-'0');found = 1;
60
//  fprintf(stdout,"found poly%d<br />",polynum);
60
//  fprintf(stdout,"found poly%d<br>",polynum);
61
 }
61
 }
62
 else
62
 else
63
 {
63
 {
64
  for( p = 0; p < MAX_USERDRAW_PRIMITIVES ; p++ ){
64
  for( p = 0; p < MAX_USERDRAW_PRIMITIVES ; p++ ){
65
   equal = strncmp(userdraw_primitives[p],draw_type,userdraw_primitives_length[p]);
65
   equal = strncmp(userdraw_primitives[p],draw_type,userdraw_primitives_length[p]);
66
/* remake array:  static int userdraw_primitives_length[MAX_USERDRAW_PRIMITIVES]*/
66
/* remake array:  static int userdraw_primitives_length[MAX_USERDRAW_PRIMITIVES]*/
67
/* fprintf(stdout,"%d,",1+strlen(userdraw_primitives[p]));*/
67
/* fprintf(stdout,"%d,",1+strlen(userdraw_primitives[p]));*/
68
   if( equal == 0 ){
68
   if( equal == 0 ){
69
/*    fprintf(stdout,"found %s p=%d<br />",userdraw_primitives[p],p);*/
69
/*    fprintf(stdout,"found %s p=%d<br>",userdraw_primitives[p],p);*/
70
    draw_num= p;found=1; break;
70
    draw_num= p;found=1; break;
71
   }
71
   }
72
  }
72
  }
73
 }
73
 }
74
}
74
}
Line 1406... Line 1406...
1406
 
1406
 
1407
 */
1407
 */
1408
 case 49 ... 54:
1408
 case 49 ... 54:
1409
/* handling rare case of clickfill using a pattern in stead of a single color...*/
1409
/* handling rare case of clickfill using a pattern in stead of a single color...*/
1410
 add_js_filltoborder(canvas_type);
1410
 add_js_filltoborder(canvas_type);
1411
 /*fprintf(stdout,"USE_FILLED = %d<br />",use_filled);*/
1411
 /*fprintf(stdout,"USE_FILLED = %d<br>",use_filled);*/
1412
 switch(use_filled){
1412
 switch(use_filled){
1413
 case 1:
1413
 case 1:
1414
  p = 1 + snprintf(NULL,0,"var use_pattern_ctx = false;");
1414
  p = 1 + snprintf(NULL,0,"var use_pattern_ctx = false;");
1415
  check_string_length(p);
1415
  check_string_length(p);
1416
  tmp_buffer = my_newmem(p);
1416
  tmp_buffer = my_newmem(p);