📄 fillarea.c
字号:
#include <phigs.h> /* get HP-PHIGS definitions for C */#include <stdio.h> /* get standard I/O definitions */main() /* file "FillArea.c" */{ Pint WorkstnID = 1; /* workstation identifier */ Pint ConnID; /* connection identifier */ Pint WorkstnType = POIDDX; /* out/in, direct, dbl bfr, Xwindow */ Pint TheStructure = 1; /* structure ID (chosen by user) */ static Ppoint Obj1Pts[5] = /* points for the filled area */ {0.1, 0.1, 0.4, 0.1, 0.4, 0.5, 0.3, 0.6, 0.1, 0.6}; static Ppoint_list Obj1Data = {5, Obj1Pts}; static Ppoint Obj2Pts[8] = /* points for the filled area */ {0.6, 0.4, 0.8, 0.4, 0.8, 0.8, 0.7, 0.8, 0.7, 0.7, 0.9, 0.7, 0.9, 0.9, 0.6, 0.9}; static Ppoint_list Obj2Data = {8, Obj2Pts}; popen_phigs((char *) stderr, 0); /* errors go to "stderr" */ pescape_u4("/dev/screen/phigs_window", &ConnID); popen_ws(WorkstnID, (void *) ConnID, WorkstnType); popen_struct(TheStructure); pset_int_style(PSTYLE_SOLID); pfill_area(&Obj1Data); pfill_area(&Obj2Data); pclose_struct(); ppost_struct(WorkstnID, TheStructure, 1.0); pupd_ws(WorkstnID, PFLAG_PERFORM); /* (regeneration flag) */ pclose_ws(WorkstnID); pclose_phigs();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -