// //////////////////////////////////////////////////////// #include #include #include #include #define DRAW_POINT 1 int drawing_mode = 1; int width=500, height = 500; // display window width and height int press_x, press_y; int release_x, release_y; int type_list[200]; // primitive buffer // 200: max number of primitives allowed float vertex_list_x[1000]; // x buffer float vertex_list_y[1000]; // y buffer int nop = 0; // number of primitives int nov = 0; // number of vertices ///////////////////////////////////////////// void display_all() { float x, y; int p_idx, next_primitive; int v_idx = 0; if (nop!=0) { // there primitive buffer is not empty for (p_idx = 0; p_idx