⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 field.c

📁 linux下的人机对话编程
💻 C
📖 第 1 页 / 共 5 页
字号:
 dot10_2DB=gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","green",		        NULL); Ctr_10_DB=TRUE; /* 两个点已经存在*/ }} gnome_canvas_points_unref(point1); gnome_canvas_points_unref(point2);  }  else if(dir==1){   point1=gnome_canvas_points_new(2);   point1->coords[0]=fx;   point1->coords[1]=fy;   point1->coords[2]=f2x;   point1->coords[3]=f2y;        point2=gnome_canvas_points_new(4);   point2->coords[0]=fx;   point2->coords[1]=fy;   point2->coords[2]=f1x;   point2->coords[3]=f1y;   point2->coords[4]=f3x;   point2->coords[5]=f3y;   point2->coords[6]=f4x;   point2->coords[7]=f4y; if(i==5) {          /*1DG*/     if(Ctr_1_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot1_1DB)); gtk_object_destroy(GTK_OBJECT(dot1_2DB)); Ctr_1_DB=FALSE;     }     if(Ctr_1_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot1_1FB)); gtk_object_destroy(GTK_OBJECT(dot1_2FB)); Ctr_1_FB=FALSE;     }     if(value==FALSE){ line_1DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL); line_1FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);     } if(value==TRUE){ gnome_canvas_item_set( line_1FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_1FB_DG);       gnome_canvas_item_show(line_1FB_DG);       gnome_canvas_item_hide(line_1DB_DG);           } if(Ctr_1_FB==FALSE){c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0;dot1_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);  c3x=f9x-2.0; c3y=f9y-2.0; c4x=f9x+2.0; c4y=f9y+2.0; dot1_2FB= gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","yellow",		        NULL);     Ctr_1_FB=TRUE; /* 两个点已经存在*/ }   }   if(i==6){        /*3DG*/   if(Ctr_3_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot3_1DB)); gtk_object_destroy(GTK_OBJECT(dot3_2DB)); Ctr_3_DB=FALSE;     }     if(Ctr_3_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot3_1FB)); gtk_object_destroy(GTK_OBJECT(dot3_2FB)); Ctr_3_FB=FALSE;     }     if(value==FALSE){ line_3FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);line_3DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);     }if(value==TRUE){ gnome_canvas_item_set( line_3FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_3FB_DG);       gnome_canvas_item_show(line_3FB_DG);       gnome_canvas_item_hide(line_3DB_DG);           }    if(Ctr_3_FB==FALSE){c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0;dot3_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);  c3x=f9x-2.0; c3y=f9y-2.0; c4x=f9x+2.0; c4y=f9y+2.0; dot3_2FB= gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","yellow",		        NULL);     Ctr_3_FB=TRUE; /* 两个点已经存在*/ }   }   if(i==9){     /*13DG*/  if(Ctr_13_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot13_1DB)); gtk_object_destroy(GTK_OBJECT(dot13_2DB)); Ctr_13_DB=FALSE;     }     if(Ctr_13_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot13_1FB)); gtk_object_destroy(GTK_OBJECT(dot13_2FB)); Ctr_13_FB=FALSE;     } if(value==FALSE){ line_13FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL); line_13DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL); }if(value==TRUE){ gnome_canvas_item_set( line_13FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_13FB_DG);       gnome_canvas_item_show(line_13FB_DG);       gnome_canvas_item_hide(line_13DB_DG);           } if(Ctr_13_FB==FALSE){  c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0; dot13_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);  c3x=f9x-2.0; c3y=f9y-2.0; c4x=f9x+2.0; c4y=f9y+2.0; dot13_2FB= gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","yellow",		        NULL);      Ctr_13_FB=TRUE; /* 两个点已经存在*/ }   }if(i==10){ if(Ctr_15_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot15_1DB)); gtk_object_destroy(GTK_OBJECT(dot15_2DB)); Ctr_15_DB=FALSE;     }     if(Ctr_15_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot15_1FB)); gtk_object_destroy(GTK_OBJECT(dot15_2FB)); Ctr_15_FB=FALSE;     }     if(value==FALSE){ line_15FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL); line_15DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);     }if(value==TRUE){ gnome_canvas_item_set( line_15FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_15FB_DG);       gnome_canvas_item_show(line_15FB_DG);       gnome_canvas_item_hide(line_15DB_DG);           } if(Ctr_15_FB==FALSE){ c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0; dot15_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);  c3x=f9x-2.0; c3y=f9y-2.0; c4x=f9x+2.0; c4y=f9y+2.0; dot15_2FB= gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","yellow",		        NULL);    Ctr_15_FB=TRUE; /* 两个点已经存在*/ }}if(i==11){ if(Ctr_17_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot17_1DB)); gtk_object_destroy(GTK_OBJECT(dot17_2DB)); Ctr_17_DB=FALSE;     }     if(Ctr_17_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot17_1FB)); gtk_object_destroy(GTK_OBJECT(dot17_2FB)); Ctr_17_FB=FALSE;     }     if(value==FALSE){  line_17FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);  line_17DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);   }if(value==TRUE){ gnome_canvas_item_set( line_17FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_17FB_DG);       gnome_canvas_item_show(line_17FB_DG);       gnome_canvas_item_hide(line_17DB_DG);           } if(Ctr_17_FB==FALSE){ c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0; dot17_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);  c3x=f9x-2.0; c3y=f9y-2.0; c4x=f9x+2.0; c4y=f9y+2.0; dot17_2FB= gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","yellow",		        NULL);     Ctr_17_FB=TRUE; /* 两个点已经存在*/   }}    if(i==12){ if(Ctr_19_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot19_1DB)); gtk_object_destroy(GTK_OBJECT(dot19_2DB)); Ctr_19_DB=FALSE;     }     if(Ctr_19_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot19_1FB)); gtk_object_destroy(GTK_OBJECT(dot19_2FB)); Ctr_19_FB=FALSE;     }     if(value==FALSE){ line_19FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);line_19DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);     }if(value==TRUE){ gnome_canvas_item_set( line_19FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_19FB_DG);       gnome_canvas_item_show(line_19FB_DG);       gnome_canvas_item_hide(line_19DB_DG);           } if(Ctr_19_FB==FALSE){ c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0; dot19_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);  c3x=f9x-2.0; c3y=f9y-2.0; c4x=f9x+2.0; c4y=f9y+2.0; dot19_2FB= gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c3x,"y1",c3y,"x2",c4x,"y2",c4y,"fill_color","yellow",		        NULL);  Ctr_19_FB=TRUE; /* 两个点已经存在*/ }}if(i==22){  if(Ctr_10_DB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot10_1DB)); gtk_object_destroy(GTK_OBJECT(dot10_2DB)); Ctr_10_DB=FALSE;     }     if(Ctr_10_FB==TRUE){ gtk_object_destroy(GTK_OBJECT(dot10_1FB)); gtk_object_destroy(GTK_OBJECT(dot10_2FB)); Ctr_10_FB=FALSE;     }     if(value==FALSE){ line_10FB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point2,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);line_10DB_DG= gnome_canvas_item_new(group,gnome_canvas_line_get_type(),                      "points",point1,"fill_color", cr,"width_units",4.0,                      "join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);     }if(value==TRUE){ gnome_canvas_item_set( line_10FB_DG,"points",point2,"fill_color", cr,"width_units",                       4.0,"join_style", GDK_CAP_BUTT,"line_style",                      GDK_LINE_SOLID,NULL);       gnome_canvas_item_request_update(line_10FB_DG);       gnome_canvas_item_show(line_10FB_DG);       gnome_canvas_item_hide(line_10DB_DG);           } if(Ctr_10_FB==FALSE){c1x=f1x-2.0; c1y=f1y-2.0; c2x=f1x+2.0; c2y=f1y+2.0; dot10_1FB=  gnome_canvas_item_new(group,                        gnome_canvas_ellipse_get_type(),		        "x1",c1x,"y1",c1y,"x2",c2x,"y2",c2y,"fill_color","yellow",		        NULL);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -