图6.3 draw程序的过程性体系结构
Pseudocode Algorithm ����������// 算法的伪码表示
��(1) Initialize system; ��������// 系统初始化
��(2) Create and draw interface; ����// 建立和显示界面
��(3) while QUIT not selected do���� // 操作循环
� case��������������� //
������Mouse event: ���������// 鼠标器事件
�����create shape structure; ��// 建立形状结构
������� read mouse movements for data; // 读鼠标器移动数据
������� store newly created shape on list of shape records;
���������������������// 存储新建立的形状到形状记录表中
KeyPress event: ������� // 按键事件
if key = 'q' then exit loop;// 按'q'则跳出循环
�������else ignore;� // 不顾
��Ecpose event: // 显示事件
��refresh display by drawing each shape structure;
���������������������// 通过画出各形状结构来刷新显示
(4) Shut down system; ����������// 系统停工
��