Subversion Repositories wimsdev

Rev

Rev 7739 | Rev 7747 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7739 Rev 7746
Line 1087... Line 1087...
1087
            else
1087
            else
1088
            if(strcmp(draw_type,"polygon") == 0){
1088
            if(strcmp(draw_type,"polygon") == 0){
1089
                if( js_function[DRAW_PATHS] != 1 ){ js_function[DRAW_PATHS] = 1;}
1089
                if( js_function[DRAW_PATHS] != 1 ){ js_function[DRAW_PATHS] = 1;}
1090
                if(reply_format < 1){reply_format = 2;}
1090
                if(reply_format < 1){reply_format = 2;}
1091
                add_js_poly(js_include_file,-1,draw_type,line_width,stroke_color,stroke_opacity,use_filled,fill_color,fill_opacity,use_dashed,dashtype[0],dashtype[1]);
1091
                add_js_poly(js_include_file,-1,draw_type,line_width,stroke_color,stroke_opacity,use_filled,fill_color,fill_opacity,use_dashed,dashtype[0],dashtype[1]);
-
 
1092
                if( use_input_xy > 0 ){
-
 
1093
                    add_textarea_polygon(js_include_file);
-
 
1094
                    if( use_input_xy == 2 ){
-
 
1095
                        add_textarea_xy(js_include_file,canvas_root_id);
-
 
1096
                    }
-
 
1097
                    else
-
 
1098
                    {
1092
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1099
                        add_input_xy(js_include_file,canvas_root_id);
-
 
1100
                    }
-
 
1101
                }
1093
            }
1102
            }
1094
            else
1103
            else
1095
            if(strncmp(draw_type,"poly",4) == 0){
1104
            if(strncmp(draw_type,"poly",4) == 0){
1096
                if(strlen(draw_type) < 5){canvas_error("use command \"userdraw poly[3-9],color\" eg userdraw poly6,blue");}
1105
                if(strlen(draw_type) < 5){canvas_error("use command \"userdraw poly[3-9],color\" eg userdraw poly6,blue");}
1097
                if( js_function[DRAW_PATHS] != 1 ){ js_function[DRAW_PATHS] = 1;}
1106
                if( js_function[DRAW_PATHS] != 1 ){ js_function[DRAW_PATHS] = 1;}
1098
                if(reply_format < 1){reply_format = 2;}
1107
                if(reply_format < 1){reply_format = 2;}
1099
                add_js_poly(js_include_file,(int) (draw_type[4]-'0'),draw_type,line_width,stroke_color,stroke_opacity,use_filled,fill_color,fill_opacity,use_dashed,dashtype[0],dashtype[1]);
1108
                add_js_poly(js_include_file,(int) (draw_type[4]-'0'),draw_type,line_width,stroke_color,stroke_opacity,use_filled,fill_color,fill_opacity,use_dashed,dashtype[0],dashtype[1]);
1100
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1109
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1101
            }
1110
            }
1102
            else
1111
            else
1103
            if(strcmp(draw_type,"triangle") == 0){
1112
            if(strcmp(draw_type,"triangle") == 0){
1104
                if( js_function[DRAW_PATHS] != 1 ){ js_function[DRAW_PATHS] = 1;}
1113
                if( js_function[DRAW_PATHS] != 1 ){ js_function[DRAW_PATHS] = 1;}
1105
                if(reply_format < 1){reply_format = 2;}
1114
                if(reply_format < 1){reply_format = 2;}
1106
                add_js_poly(js_include_file,3,draw_type,line_width,stroke_color,stroke_opacity,use_filled,fill_color,fill_opacity,use_dashed,dashtype[0],dashtype[1]);
1115
                add_js_poly(js_include_file,3,draw_type,line_width,stroke_color,stroke_opacity,use_filled,fill_color,fill_opacity,use_dashed,dashtype[0],dashtype[1]);
1107
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1116
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1108
            }
1117
            }
1109
            else
1118
            else
1110
            if( strcmp(draw_type,"line") == 0 ){
1119
            if( strcmp(draw_type,"line") == 0 ){
1111
                if( js_function[DRAW_CIRCLES] != 1 ){ js_function[DRAW_CIRCLES] = 1;}
1120
                if( js_function[DRAW_CIRCLES] != 1 ){ js_function[DRAW_CIRCLES] = 1;}
1112
                if( js_function[DRAW_LINES] != 1 ){ js_function[DRAW_LINES] = 1;}
1121
                if( js_function[DRAW_LINES] != 1 ){ js_function[DRAW_LINES] = 1;}
1113
                if(reply_format < 1){reply_format = 11;}
1122
                if(reply_format < 1){reply_format = 11;}
1114
                add_js_lines(js_include_file,1,draw_type,line_width,stroke_color,stroke_opacity,use_dashed,dashtype[0],dashtype[1]);
1123
                add_js_lines(js_include_file,1,draw_type,line_width,stroke_color,stroke_opacity,use_dashed,dashtype[0],dashtype[1]);
1115
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1124
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1116
            }
1125
            }
1117
            else
1126
            else
1118
            if( strcmp(draw_type,"lines") == 0 ){
1127
            if( strcmp(draw_type,"lines") == 0 ){
1119
                if( js_function[DRAW_CIRCLES] != 1 ){ js_function[DRAW_CIRCLES] = 1;}
1128
                if( js_function[DRAW_CIRCLES] != 1 ){ js_function[DRAW_CIRCLES] = 1;}
1120
                if( js_function[DRAW_LINES] != 1 ){ js_function[DRAW_LINES] = 1;}
1129
                if( js_function[DRAW_LINES] != 1 ){ js_function[DRAW_LINES] = 1;}
1121
                if(reply_format < 1){reply_format = 11;}
1130
                if(reply_format < 1){reply_format = 11;}
1122
                add_js_lines(js_include_file,2,draw_type,line_width,stroke_color,stroke_opacity,use_dashed,dashtype[0],dashtype[1]);
1131
                add_js_lines(js_include_file,2,draw_type,line_width,stroke_color,stroke_opacity,use_dashed,dashtype[0],dashtype[1]);
-
 
1132
                if( use_input_xy > 0 ){
-
 
1133
                    add_textarea_line(js_include_file,2);
-
 
1134
                    if( use_input_xy == 2 ){
-
 
1135
                        add_textarea_xy(js_include_file,canvas_root_id);
-
 
1136
                    }
-
 
1137
                    else
-
 
1138
                    {
1123
                if(use_input_xy == 1){ canvas_error("userinput_xy not yet implemented for this userdraw type !");}
1139
                        add_input_x1y1x2y2(js_include_file,canvas_root_id);
-
 
1140
                        /* add_input_xy(js_include_file,canvas_root_id); */
-
 
1141
                    }
-
 
1142
                }
1124
            }
1143
            }
1125
            else
1144
            else
1126
            if( strcmp(draw_type,"rects") == 0){
1145
            if( strcmp(draw_type,"rects") == 0){
1127
                if( js_function[DRAW_RECTS] != 1 ){ js_function[DRAW_RECTS] = 1;}
1146
                if( js_function[DRAW_RECTS] != 1 ){ js_function[DRAW_RECTS] = 1;}
1128
                if(reply_format < 1){reply_format = 2;}
1147
                if(reply_format < 1){reply_format = 2;}