fillarea.c

来自「Intro/: Directory containing introducto」· C语言 代码 · 共 31 行

C
31
字号
#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 + =
减小字号Ctrl + -
显示快捷键?