📄 fillareaset.c
字号:
#include <phigs.h> /* get HP-PHIGS definitions for C */#include <stdio.h> /* get standard I/O definitions */main() /* file "FillAreaSet.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 OutlinePts[4] = {{0.1, 0.2}, {0.9, 0.2}, {0.9, 0.8}, {0.1, 0.8}}; static Ppoint_list OutlineData = {4, OutlinePts}; static Ppoint Hole1Pts[4] = {{0.2, 0.3}, {0.4, 0.3}, {0.4, 0.7}, {0.2, 0.7}}; static Ppoint_list Hole1Data = {4, Hole1Pts}; static Ppoint Hole2Pts[4] = {{0.6, 0.3}, {0.8, 0.3}, {0.8, 0.7}, {0.6, 0.7}}; static Ppoint_list Hole2Data = {4, Hole2Pts}; static Ppoint_list CinderBlockPts[3] = {4, OutlinePts, 4, Hole1Pts, 4, Hole2Pts}; static Ppoint_list_list CinderBlockData = {3, CinderBlockPts}; 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_HATCH); pset_edge_flag(PEDGE_ON); pfill_area_set(&CinderBlockData); 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 + -